Skip to content

Commit

Permalink
✨(ci) add helmfile linter and fix issue in argocd sync
Browse files Browse the repository at this point in the history
Add a github job to run helmfile linter on PR
Add argocd annotation to fix job syncing issue
  • Loading branch information
rouja authored and AntoLC committed Sep 24, 2024
1 parent 4507903 commit 2775a74
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 3 deletions.
22 changes: 22 additions & 0 deletions .github/workflows/helmfile-linter.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: Helmfile lint
run-name: Helmfile lint

on:
pull_request:
branches:
- 'main'

jobs:
helmfile-lint:
runs-on: ubuntu-latest
container:
image: ghcr.io/helmfile/helmfile:latest
steps:
-
uses: numerique-gouv/action-helmfile-lint@main
with:
app-id: ${{ secrets.APP_ID }}
age-key: ${{ secrets.SOPS_PRIVATE }}
private-key: ${{ secrets.PRIVATE_KEY }}
helmfile-src: "src/helm"
repositories: "impress,secrets"
2 changes: 1 addition & 1 deletion secrets
3 changes: 2 additions & 1 deletion src/helm/impress/templates/backend_job.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,9 @@ kind: Job
metadata:
name: {{ $fullName }}-migrate
namespace: {{ .Release.Namespace | quote }}
{{- with .Values.backend.migrateJobAnnotations }}
annotations:
argocd.argoproj.io/sync-options: Replace=true,Force=true
{{- with .Values.backend.migrateJobAnnotations }}
{{- toYaml . | nindent 4 }}
{{- end }}
labels:
Expand Down
3 changes: 2 additions & 1 deletion src/helm/impress/templates/backend_job_createsuperuser.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,9 @@ kind: Job
metadata:
name: {{ $fullName }}-createsuperuser
namespace: {{ .Release.Namespace | quote }}
{{- with .Values.backend.migrateJobAnnotations }}
annotations:
argocd.argoproj.io/sync-options: Replace=true,Force=true
{{- with .Values.backend.migrateJobAnnotations }}
{{- toYaml . | nindent 4 }}
{{- end }}
labels:
Expand Down

0 comments on commit 2775a74

Please sign in to comment.