Merge pull request 'dev - create a testing pipeline with kubeconform and k3d' (#2) from dev into main
Reviewed-on: #2
This commit is contained in:
commit
8353299737
3 changed files with 54 additions and 9 deletions
|
|
@ -1,20 +1,18 @@
|
||||||
on:
|
on:
|
||||||
push:
|
pull_request:
|
||||||
branches:
|
|
||||||
- dev
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
validate:
|
validate:
|
||||||
runs-on: docker
|
runs-on: docker
|
||||||
|
defaults:
|
||||||
|
run:
|
||||||
|
shell: sh
|
||||||
|
env:
|
||||||
|
DOCKER_HOST: tcp://172.17.0.1:2375
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Install kubeconform
|
|
||||||
run: |
|
|
||||||
wget -O- https://github.com/yannh/kubeconform/releases/latest/download/kubeconform-linux-amd64.tar.gz | tar xz
|
|
||||||
mv kubeconform /usr/local/bin
|
|
||||||
|
|
||||||
- name: Validate manifests
|
- name: Validate manifests
|
||||||
run: |
|
run: |
|
||||||
kubeconform \
|
kubeconform \
|
||||||
|
|
@ -24,3 +22,46 @@ jobs:
|
||||||
-schema-location default \
|
-schema-location default \
|
||||||
-schema-location 'https://raw.githubusercontent.com/datreeio/CRDs-catalog/main/{{.Group}}/{{.ResourceKind}}_{{.ResourceAPIVersion}}.json' \
|
-schema-location 'https://raw.githubusercontent.com/datreeio/CRDs-catalog/main/{{.Group}}/{{.ResourceKind}}_{{.ResourceAPIVersion}}.json' \
|
||||||
./manifests/
|
./manifests/
|
||||||
|
|
||||||
|
- name: Create test cluster
|
||||||
|
run: k3d cluster create test --wait
|
||||||
|
|
||||||
|
- name: Install ArgoCD
|
||||||
|
run: |
|
||||||
|
kubectl create namespace argocd
|
||||||
|
kubectl apply -n argocd --server-side -f https://raw.githubusercontent.com/argoproj/argo-cd/stable/manifests/install.yaml
|
||||||
|
kubectl apply -f https://github.com/bitnami-labs/sealed-secrets/releases/download/v0.27.0/controller.yaml
|
||||||
|
kubectl wait --for=condition=available --timeout=180s \
|
||||||
|
deployment/argocd-server \
|
||||||
|
deployment/argocd-repo-server \
|
||||||
|
deployment/argocd-applicationset-controller \
|
||||||
|
-n argocd
|
||||||
|
kubectl wait --for=condition=available --timeout=60s \
|
||||||
|
deployment/sealed-secrets-controller -n kube-system
|
||||||
|
|
||||||
|
- name: Import SealedSecrets key
|
||||||
|
env:
|
||||||
|
SEALED_SECRETS_KEY: ${{ secrets.SEALED_SECRETS_KEY }}
|
||||||
|
run: |
|
||||||
|
echo "$SEALED_SECRETS_KEY" | kubectl apply -f -
|
||||||
|
kubectl rollout restart deployment/sealed-secrets-controller -n kube-system
|
||||||
|
kubectl rollout status deployment/sealed-secrets-controller -n kube-system --timeout=60s
|
||||||
|
|
||||||
|
- name: Apply ArgoCD apps
|
||||||
|
run: kubectl apply -f apps/
|
||||||
|
|
||||||
|
- name: Wait for ArgoCD sync
|
||||||
|
run: |
|
||||||
|
sleep 10
|
||||||
|
kubectl wait applications \
|
||||||
|
--all \
|
||||||
|
--namespace argocd \
|
||||||
|
--for=jsonpath='{.status.health.status}'=Healthy \
|
||||||
|
--timeout=300s
|
||||||
|
|
||||||
|
- name: Wait for all deployments
|
||||||
|
run: kubectl wait --for=condition=available --timeout=300s deployment --all --all-namespaces
|
||||||
|
|
||||||
|
- name: Cleanup
|
||||||
|
if: always()
|
||||||
|
run: k3d cluster delete test
|
||||||
|
|
|
||||||
|
|
@ -15,4 +15,4 @@ spec:
|
||||||
syncPolicy:
|
syncPolicy:
|
||||||
automated:
|
automated:
|
||||||
prune: true
|
prune: true
|
||||||
selfheal: true
|
selfHeal: true
|
||||||
|
|
|
||||||
|
|
@ -14,7 +14,11 @@ spec:
|
||||||
spec:
|
spec:
|
||||||
containers:
|
containers:
|
||||||
- name: runner
|
- name: runner
|
||||||
|
<<<<<<< HEAD
|
||||||
image: forgejo.libretalk.eu/jad0s/forgejo-runner:latest
|
image: forgejo.libretalk.eu/jad0s/forgejo-runner:latest
|
||||||
|
=======
|
||||||
|
image: code.forgejo.org/forgejo/runner:3.5.1
|
||||||
|
>>>>>>> e1bf8ad (fix(forgejo): remove extra indentation)
|
||||||
command:
|
command:
|
||||||
- sh
|
- sh
|
||||||
- -c
|
- -c
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue