From 10cce1376adfe7e0d63f4171b87cece16236837d Mon Sep 17 00:00:00 2001 From: Martin McCaffery Date: Wed, 17 Dec 2025 16:14:14 +0100 Subject: [PATCH] feat(deployment): add ArgoCD deployment stack --- .github/workflows/test.yml | 8 ++-- argocd-stack/docs.yaml | 28 +++++++++++ argocd-stack/helm/.helmignore | 23 +++++++++ argocd-stack/helm/Chart.yaml | 24 ++++++++++ argocd-stack/helm/templates/deploy.yaml | 62 +++++++++++++++++++++++++ argocd-stack/helm/values.yaml | 4 ++ 6 files changed, 145 insertions(+), 4 deletions(-) create mode 100644 argocd-stack/docs.yaml create mode 100644 argocd-stack/helm/.helmignore create mode 100644 argocd-stack/helm/Chart.yaml create mode 100644 argocd-stack/helm/templates/deploy.yaml create mode 100644 argocd-stack/helm/values.yaml diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 26ff785..618b688 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -1,15 +1,15 @@ name: Hugo Site Tests on: - push: - branches: [ main ] +# push: +# branches: [ main ] pull_request: branches: [ main ] jobs: test: runs-on: ubuntu-latest - + steps: - uses: actions/checkout@v4 with: @@ -38,7 +38,7 @@ jobs: npm run test:build npm run test:markdown npm run test:html - + - name: Run link checker run: htmltest continue-on-error: true diff --git a/argocd-stack/docs.yaml b/argocd-stack/docs.yaml new file mode 100644 index 0000000..f298c98 --- /dev/null +++ b/argocd-stack/docs.yaml @@ -0,0 +1,28 @@ +apiVersion: argoproj.io/v1alpha1 +kind: Application +metadata: + name: docs + namespace: argocd + labels: + env: prod +spec: + project: default + syncPolicy: + automated: + selfHeal: true + syncOptions: + - CreateNamespace=true + - ServerSideApply=true + destination: + name: in-cluster + namespace: docs + syncOptions: + - CreateNamespace=true + sources: + - repoURL: https://edp.buildth.ing/DevFW-CICD/website-and-documentation + targetRevision: HEAD + path: argocd-stack/helm + helm: + parameters: + - name: image.tag + value: $ARGOCD_APP_REVISION_SHORT \ No newline at end of file diff --git a/argocd-stack/helm/.helmignore b/argocd-stack/helm/.helmignore new file mode 100644 index 0000000..0e8a0eb --- /dev/null +++ b/argocd-stack/helm/.helmignore @@ -0,0 +1,23 @@ +# Patterns to ignore when building packages. +# This supports shell glob matching, relative path matching, and +# negation (prefixed with !). Only one pattern per line. +.DS_Store +# Common VCS dirs +.git/ +.gitignore +.bzr/ +.bzrignore +.hg/ +.hgignore +.svn/ +# Common backup files +*.swp +*.bak +*.tmp +*.orig +*~ +# Various IDEs +.project +.idea/ +*.tmproj +.vscode/ diff --git a/argocd-stack/helm/Chart.yaml b/argocd-stack/helm/Chart.yaml new file mode 100644 index 0000000..1bf09dc --- /dev/null +++ b/argocd-stack/helm/Chart.yaml @@ -0,0 +1,24 @@ +apiVersion: v2 +name: helm +description: Deploy documentation to edp.buildth.ing + +# A chart can be either an 'application' or a 'library' chart. +# +# Application charts are a collection of templates that can be packaged into versioned archives +# to be deployed. +# +# Library charts provide useful utilities or functions for the chart developer. They're included as +# a dependency of application charts to inject those utilities and functions into the rendering +# pipeline. Library charts do not define any templates and therefore cannot be deployed. +type: application + +# This is the chart version. This version number should be incremented each time you make changes +# to the chart and its templates, including the app version. +# Versions are expected to follow Semantic Versioning (https://semver.org/) +version: 0.1.0 + +# This is the version number of the application being deployed. This version number should be +# incremented each time you make changes to the application. Versions are not expected to +# follow Semantic Versioning. They should reflect the version the application is using. +# It is recommended to use it with quotes. +appVersion: "1.16.0" diff --git a/argocd-stack/helm/templates/deploy.yaml b/argocd-stack/helm/templates/deploy.yaml new file mode 100644 index 0000000..0a7aded --- /dev/null +++ b/argocd-stack/helm/templates/deploy.yaml @@ -0,0 +1,62 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + labels: + app: docs + name: docs +spec: + replicas: 1 + selector: + matchLabels: + app: docs + strategy: {} + template: + metadata: + labels: + app: docs + spec: + containers: + - image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}" + name: docs + ports: + - name: http + containerPort: 80 + protocol: TCP + resources: {} +--- +apiVersion: v1 +kind: Service +metadata: + name: docs +spec: + selector: + app: docs + ports: + - protocol: TCP + port: 80 + targetPort: 80 +--- +apiVersion: networking.k8s.io/v1 +kind: Ingress +metadata: + name: docs + annotations: + cert-manager.io/cluster-issuer: main + nginx.ingress.kubernetes.io/force-ssl-redirect: "true" +spec: + ingressClassName: nginx + rules: + - host: docs.edp.buildth.ing + http: + paths: + - backend: + service: + name: docs + port: + number: 80 + path: / + pathType: Prefix + tls: + - hosts: + - docs.edp.buildth.ing + secretName: docs-edp-buildth-ing-tls diff --git a/argocd-stack/helm/values.yaml b/argocd-stack/helm/values.yaml new file mode 100644 index 0000000..78c3c27 --- /dev/null +++ b/argocd-stack/helm/values.yaml @@ -0,0 +1,4 @@ + +image: + repository: edp.buildth.ing/devfw-cicd/website-and-documentation + tag: "UNKNOWN_TAG"