From 2ffaed35fb19c397b1247a22f270d827f12a6c9a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Herv=C3=A9=20Le=20Meur?= Date: Thu, 21 Jul 2022 11:02:41 +0200 Subject: [PATCH] feat: add github-comment-ops chart Ref: https://github.com/jenkins-infra/helpdesk/issues/3060 --- clusters/prodpublick8s.yaml | 12 ++++++ config/ext_github-comment-ops.yaml | 15 +++++++ .../charts/github-comment-ops.yaml | 41 +++++++++++++++++++ 3 files changed, 68 insertions(+) create mode 100644 config/ext_github-comment-ops.yaml create mode 100644 updatecli/updatecli.d/charts/github-comment-ops.yaml diff --git a/clusters/prodpublick8s.yaml b/clusters/prodpublick8s.yaml index 3f82ee5f1..cb88762ca 100644 --- a/clusters/prodpublick8s.yaml +++ b/clusters/prodpublick8s.yaml @@ -22,6 +22,8 @@ repositories: url: https://charts.jetstack.io - name: prometheus-community url: https://prometheus-community.github.io/helm-charts + - name: github-comment-ops + url: https://timja.github.io/github-comment-ops/ releases: - name: datadog namespace: datadog @@ -253,3 +255,13 @@ releases: - public-nginx-ingress/public-nginx-ingress # Required to expose both the UI and the webhooks endpoint values: - "../config/jenkinsisthewayio.yaml" + - name: github-comment-ops + namespace: github-comment-ops + chart: github-comment-ops/github-comment-ops + version: 1.2.0 + needs: + - public-nginx-ingress/public-nginx-ingress # Required to expose the webhooks endpoint + values: + - "../config/ext_github-comment-ops.yaml" + secrets: + - "../secrets/config/github-comment-ops/secrets.yaml" diff --git a/config/ext_github-comment-ops.yaml b/config/ext_github-comment-ops.yaml new file mode 100644 index 000000000..0db84d353 --- /dev/null +++ b/config/ext_github-comment-ops.yaml @@ -0,0 +1,15 @@ +ingress: + enabled: true + className: public-nginx + annotations: + "cert-manager.io/cluster-issuer": "letsencrypt-prod" + "nginx.ingress.kubernetes.io/ssl-redirect": "true" + hosts: + - host: webhook-github-comment-ops.jenkins.io + paths: + - path: / + pathType: ImplementationSpecific + tls: + - secretName: github-comment-ops-tls + hosts: + - webhook-github-comment-ops diff --git a/updatecli/updatecli.d/charts/github-comment-ops.yaml b/updatecli/updatecli.d/charts/github-comment-ops.yaml new file mode 100644 index 000000000..4ec7cc6f9 --- /dev/null +++ b/updatecli/updatecli.d/charts/github-comment-ops.yaml @@ -0,0 +1,41 @@ +title: "Bump github-comment-ops Helm Chart Version" + +scms: + default: + kind: github + spec: + user: "{{ .github.user }}" + email: "{{ .github.email }}" + owner: "{{ .github.owner }}" + repository: "{{ .github.repository }}" + token: "{{ requiredEnv .github.token }}" + username: "{{ .github.username }}" + branch: "{{ .github.branch }}" + +sources: + lastChartVersion: + kind: helmchart + spec: + url: https://timja.github.io/github-comment-ops + name: github-comment-ops + +targets: + updateChartVersion: + name: "Update the chart version for github-comment-ops" + kind: file + spec: + file: clusters/prodpublick8s.yaml + matchpattern: 'chart: github-comment-ops\/github-comment-ops((\r\n|\r|\n)(\s+))version: .*' + replacepattern: 'chart: github-comment-ops/github-comment-ops${1}version: {{ source "lastChartVersion" }}' + scmid: default + +pullrequests: + default: + kind: github + scmid: default + targets: + - updateChartVersion + spec: + labels: + - dependencies + - github-comment-ops