Add a first version of CI

This commit is contained in:
Nikolai Rodionov 2024-09-20 17:20:06 +02:00
parent a1b5b510cc
commit 79cc2b3304
Signed by: allanger
GPG Key ID: 0AA46A90E25592AD
3 changed files with 45 additions and 3 deletions

41
.woodpecker/helmfile.yaml Normal file
View File

@ -0,0 +1,41 @@
when:
event:
- push
matrix:
include:
- NAME: badhouseplants
ENV: badhouseplants
steps:
test:
image: ghcr.io/helmfile/helmfile:latest
commands:
- kubectl get all -A
backend_options:
kubernetes:
serviceAccountName: woodpecker-ci
resources:
requests:
memory: 500Mi
cpu: 200m
limits:
memory: 500Mi
cpu: 200m
build:
image: ghcr.io/helmfile/helmfile:latest
commands:
- mkdir ~/.kube
- echo $K8S_CONFIG | base64 -d > ~/.kube/config
- helmfile -e "${ENV}" diff
secrets:
- k8s_config
- sops_age_key
backend_options:
kubernetes:
serviceAccountName: woodpecker-ci
resources:
requests:
memory: 500Mi
cpu: 200m
limits:
memory: 500Mi
cpu: 200m

View File

@ -1,5 +1,5 @@
{{- if .Values.sa }}
{{- range $sa := .Values.roles }}
{{- range $sa := .Values.sa }}
---
apiVersion: v1
kind: ServiceAccount

View File

@ -13,11 +13,12 @@ bindings:
kind: ClusterRoleBinding
subjects:
- kind: ServiceAccount
name: pipelines
namespace: woodpecker-ci
namespace: pipelines
name: woodpecker-ci
roleRef:
kind: ClusterRole
name: cluster-admin
apiGroup: rbac.authorization.k8s.io
sa:
- name: woodpecker-ci
namespace: pipelines