diff --git a/.gitea/workflows/build.yaml b/.gitea/workflows/build.yaml index f9a7ff5..6ee56c2 100644 --- a/.gitea/workflows/build.yaml +++ b/.gitea/workflows/build.yaml @@ -30,4 +30,5 @@ jobs: echo '${{ secrets.KUBECONFIG }}' > ~/.kube/config curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl" install -o root -g root -m 0755 kubectl /usr/local/bin/kubectl - /usr/local/bin/kubectl apply --validate=false -f argo.yaml + sed -i "s/COMMIT_REF/$GITEA_SHA/g" argo.template.yaml + /usr/local/bin/kubectl apply --validate=false -f argo.template.yaml diff --git a/argo.yaml b/argo.yaml deleted file mode 100644 index 16a8a5d..0000000 --- a/argo.yaml +++ /dev/null @@ -1,43 +0,0 @@ ---- -apiVersion: argoproj.io/v1alpha1 -kind: AppProject -metadata: - name: blog - namespace: argocd -spec: - description: Project for the blog application - sourceRepos: - - https://git.vanespen.dev/evanespen/blog - destinations: - - namespace: blog - server: https://kubernetes.default.svc - clusterResourceWhitelist: - - group: "*" - kind: "*" - namespaceResourceWhitelist: - - group: "*" - kind: "*" - syncWindows: [] - roles: [] - ---- -apiVersion: argoproj.io/v1alpha1 -kind: Application -metadata: - name: blog-argo - namespace: argocd -spec: - project: blog - source: - repoURL: "https://git.vanespen.dev/evanespen/blog" - targetRevision: testing-ci - path: "k8s" - destination: - server: "https://kubernetes.default.svc" - namespace: blog - syncPolicy: - automated: - prune: true - selfHeal: true - syncOptions: - - CreateNamespace=true