Browse Source

automate helm deployment with CI

pull/3747/head
Martin McKeaveney 5 years ago
parent
commit
566d177010
  1. 17
      .github/workflows/release-selfhost.yml
  2. 0
      charts/budibase/.helmignore
  3. 4
      charts/budibase/Chart.yaml
  4. 0
      charts/budibase/README.md
  5. 0
      charts/budibase/charts/couchdb-3.3.4.tgz
  6. 0
      charts/budibase/charts/ingress-nginx-3.35.0.tgz
  7. 0
      charts/budibase/templates/NOTES.txt
  8. 0
      charts/budibase/templates/_helpers.tpl
  9. 0
      charts/budibase/templates/alb-ingress.yaml
  10. 2
      charts/budibase/templates/app-service-deployment.yaml
  11. 0
      charts/budibase/templates/app-service-service.yaml
  12. 4
      charts/budibase/templates/couchdb-backup.yaml
  13. 0
      charts/budibase/templates/hpa.yaml
  14. 0
      charts/budibase/templates/ingress.yaml
  15. 0
      charts/budibase/templates/minio-data-persistentvolumeclaim.yaml
  16. 0
      charts/budibase/templates/minio-service-deployment.yaml
  17. 0
      charts/budibase/templates/minio-service-service.yaml
  18. 0
      charts/budibase/templates/proxy-service-deployment.yaml
  19. 0
      charts/budibase/templates/proxy-service-service.yaml
  20. 0
      charts/budibase/templates/redis-data-persistentvolumeclaim.yaml
  21. 0
      charts/budibase/templates/redis-service-deployment.yaml
  22. 0
      charts/budibase/templates/redis-service-service.yaml
  23. 0
      charts/budibase/templates/secrets.yaml
  24. 0
      charts/budibase/templates/service.yaml
  25. 0
      charts/budibase/templates/serviceaccount.yaml
  26. 0
      charts/budibase/templates/tests/test-connection.yaml
  27. 2
      charts/budibase/templates/worker-service-deployment.yaml
  28. 0
      charts/budibase/templates/worker-service-service.yaml
  29. 1
      charts/budibase/values.yaml
  30. BIN
      docs/budibase-0.1.0.tgz
  31. BIN
      docs/budibase-0.1.1.tgz
  32. BIN
      docs/budibase-0.2.0.tgz
  33. BIN
      docs/budibase-0.2.1.tgz
  34. BIN
      docs/budibase-0.2.2.tgz
  35. 9
      docs/index.html
  36. 158
      docs/index.yaml
  37. 6
      scripts/releaseHelmChart.js

17
.github/workflows/release-selfhost.yml

@ -43,11 +43,6 @@ jobs:
DOCKER_PASSWORD: ${{ secrets.DOCKER_API_KEY }}
BUDIBASE_RELEASE_VERSION: ${{ steps.previoustag.outputs.tag }}
- name: Configure Git
run: |
git config user.name "Budibase Production Bot"
git config user.email "<>"
- uses: azure/setup-helm@v1
id: install
@ -55,10 +50,12 @@ jobs:
env:
BUDIBASE_RELEASE_VERSION: ${{ steps.previoustag.outputs.tag }}
- name: Configure Git
run: |
git config user.name "Budibase Helm Bot"
git config user.email "<>"
- name: Run chart-releaser
uses: helm/chart-releaser-action@v1.1.0
with:
charts_dir: docs
branch: helm-repo
uses: helm/chart-releaser-action@v1.2.0
env:
CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}"

0
hosting/kubernetes/budibase/.helmignore → charts/budibase/.helmignore

4
hosting/kubernetes/budibase/Chart.yaml → charts/budibase/Chart.yaml

@ -11,8 +11,8 @@ sources:
- https://github.com/Budibase/budibase
- https://budibase.com
type: application
version: 0.2.4
appVersion: 1.0.6
version: 0.2.6
appVersion: 1.0.10
dependencies:
- name: couchdb
version: 3.3.4

0
hosting/kubernetes/budibase/README.md → charts/budibase/README.md

0
hosting/kubernetes/budibase/charts/couchdb-3.3.4.tgz → charts/budibase/charts/couchdb-3.3.4.tgz

0
hosting/kubernetes/budibase/charts/ingress-nginx-3.35.0.tgz → charts/budibase/charts/ingress-nginx-3.35.0.tgz

0
hosting/kubernetes/budibase/templates/NOTES.txt → charts/budibase/templates/NOTES.txt

0
hosting/kubernetes/budibase/templates/_helpers.tpl → charts/budibase/templates/_helpers.tpl

0
hosting/kubernetes/budibase/templates/alb-ingress.yaml → charts/budibase/templates/alb-ingress.yaml

2
hosting/kubernetes/budibase/templates/app-service-deployment.yaml → charts/budibase/templates/app-service-deployment.yaml

@ -106,7 +106,7 @@ spec:
value: {{ .Values.globals.accountPortalApiKey | quote }}
- name: COOKIE_DOMAIN
value: {{ .Values.globals.cookieDomain | quote }}
image: budibase/apps:{{ .Chart.appVersion }}
image: budibase/apps:{{ .Values.globals.appVersion }}
imagePullPolicy: Always
name: bbapps
ports:

0
hosting/kubernetes/budibase/templates/app-service-service.yaml → charts/budibase/templates/app-service-service.yaml

4
hosting/kubernetes/budibase/templates/couchdb-backup.yaml → charts/budibase/templates/couchdb-backup.yaml

@ -30,9 +30,9 @@ spec:
- name: SOURCE
value: {{ .Values.services.couchdb.url }}
- name: TARGET
value: {{ .Values.services.couchdb.backup.target }}
value: {{ .Values.services.couchdb.backup.target | quote }}
- name: RUN_EVERY_SECS
value: {{ .Values.services.couchdb.backup.interval }}
value: {{ .Values.services.couchdb.backup.interval | quote }}
- name: VERBOSE
value: "true"
image: redgeoff/replicate-couchdb-cluster

0
hosting/kubernetes/budibase/templates/hpa.yaml → charts/budibase/templates/hpa.yaml

0
hosting/kubernetes/budibase/templates/ingress.yaml → charts/budibase/templates/ingress.yaml

0
hosting/kubernetes/budibase/templates/minio-data-persistentvolumeclaim.yaml → charts/budibase/templates/minio-data-persistentvolumeclaim.yaml

0
hosting/kubernetes/budibase/templates/minio-service-deployment.yaml → charts/budibase/templates/minio-service-deployment.yaml

0
hosting/kubernetes/budibase/templates/minio-service-service.yaml → charts/budibase/templates/minio-service-service.yaml

0
hosting/kubernetes/budibase/templates/proxy-service-deployment.yaml → charts/budibase/templates/proxy-service-deployment.yaml

0
hosting/kubernetes/budibase/templates/proxy-service-service.yaml → charts/budibase/templates/proxy-service-service.yaml

0
hosting/kubernetes/budibase/templates/redis-data-persistentvolumeclaim.yaml → charts/budibase/templates/redis-data-persistentvolumeclaim.yaml

0
hosting/kubernetes/budibase/templates/redis-service-deployment.yaml → charts/budibase/templates/redis-service-deployment.yaml

0
hosting/kubernetes/budibase/templates/redis-service-service.yaml → charts/budibase/templates/redis-service-service.yaml

0
hosting/kubernetes/budibase/templates/secrets.yaml → charts/budibase/templates/secrets.yaml

0
hosting/kubernetes/budibase/templates/service.yaml → charts/budibase/templates/service.yaml

0
hosting/kubernetes/budibase/templates/serviceaccount.yaml → charts/budibase/templates/serviceaccount.yaml

0
hosting/kubernetes/budibase/templates/tests/test-connection.yaml → charts/budibase/templates/tests/test-connection.yaml

2
hosting/kubernetes/budibase/templates/worker-service-deployment.yaml → charts/budibase/templates/worker-service-deployment.yaml

@ -111,7 +111,7 @@ spec:
value: {{ .Values.globals.smtp.from | quote }}
- name: APPS_URL
value: http://app-service:{{ .Values.services.apps.port }}
image: budibase/worker:{{ .Chart.appVersion }}
image: budibase/worker:{{ .Values.globals.appVersion }}
imagePullPolicy: Always
name: bbworker
ports:

0
hosting/kubernetes/budibase/templates/worker-service-service.yaml → charts/budibase/templates/worker-service-service.yaml

1
hosting/kubernetes/budibase/values.yaml → charts/budibase/values.yaml

@ -85,6 +85,7 @@ tolerations: []
affinity: {}
globals:
appVersion: "latest"
budibaseEnv: PRODUCTION
enableAnalytics: true
sentryDSN: ""

BIN
docs/budibase-0.1.0.tgz

Binary file not shown.

BIN
docs/budibase-0.1.1.tgz

Binary file not shown.

BIN
docs/budibase-0.2.0.tgz

Binary file not shown.

BIN
docs/budibase-0.2.1.tgz

Binary file not shown.

BIN
docs/budibase-0.2.2.tgz

Binary file not shown.

9
docs/index.html

@ -1,9 +0,0 @@
<html>
<head>
<title>Budibase Helm Chart Repo</title>
</head>
<body>
<h1>Budibase Charts Repo</h1>
<p>Point Helm at this repo to see charts.</p>
</body>
</html>

158
docs/index.yaml

@ -1,158 +0,0 @@
apiVersion: v1
entries:
budibase:
- apiVersion: v2
appVersion: 1.0.6
created: "2021-12-08T16:26:47.061065Z"
dependencies:
- condition: services.couchdb.enabled
name: couchdb
repository: https://apache.github.io/couchdb-helm
version: 3.3.4
- condition: ingress.nginx
name: ingress-nginx
repository: https://github.com/kubernetes/ingress-nginx
version: 3.35.0
description: Budibase is an open source low-code platform, helping thousands of teams build apps for their workplace in minutes.
digest: 9e3d5b600368a4fd65ba827986c943b65d7ffae6544b3fda0418e760866e8929
keywords:
- low-code
- database
- cluster
name: budibase
sources:
- https://github.com/Budibase/budibase
- https://budibase.com
type: application
urls:
- https://budibase.github.io/budibase/budibase-0.2.4.tgz
version: 0.2.4
- apiVersion: v2
appVersion: 0.9.169
created: "2021-12-08T16:26:47.055284Z"
dependencies:
- condition: services.couchdb.enabled
name: couchdb
repository: https://apache.github.io/couchdb-helm
version: 3.3.4
- condition: ingress.nginx
name: ingress-nginx
repository: https://github.com/kubernetes/ingress-nginx
version: 3.35.0
description: Budibase is an open source low-code platform, helping thousands of teams build apps for their workplace in minutes.
digest: 57f365d799fcaace4658883cb8ec961a7905383a68acf065af4f6e57f9878ff8
keywords:
- low-code
- database
- cluster
name: budibase
sources:
- https://github.com/Budibase/budibase
- https://budibase.com
type: application
urls:
- https://budibase.github.io/budibase/budibase-0.2.2.tgz
version: 0.2.2
- apiVersion: v2
appVersion: 0.9.163
created: "2021-12-08T16:26:47.051008Z"
dependencies:
- condition: services.couchdb.enabled
name: couchdb
repository: https://apache.github.io/couchdb-helm
version: 3.3.4
- condition: ingress.nginx
name: ingress-nginx
repository: https://github.com/kubernetes/ingress-nginx
version: 3.35.0
description: Budibase is an open source low-code platform, helping thousands of teams build apps for their workplace in minutes.
digest: ebac6d8631cc38b266c3689508b5123f5afc395f23bdb02738be26c7cae0b0b5
keywords:
- low-code
- database
- cluster
name: budibase
sources:
- https://github.com/Budibase/budibase
- https://budibase.com
type: application
urls:
- https://budibase.github.io/budibase/budibase-0.2.1.tgz
version: 0.2.1
- apiVersion: v2
appVersion: 0.9.163
created: "2021-12-08T16:26:47.046825Z"
dependencies:
- condition: services.couchdb.enabled
name: couchdb
repository: https://apache.github.io/couchdb-helm
version: 3.3.4
- condition: ingress.nginx
name: ingress-nginx
repository: https://github.com/kubernetes/ingress-nginx
version: 3.35.0
description: Budibase is an open source low-code platform, helping thousands of teams build apps for their workplace in minutes.
digest: f369536c0eac1f6959d51e8ce6d74a87a7a9df29ae84fb9cbed0a273ab77429b
keywords:
- low-code
- database
- cluster
name: budibase
sources:
- https://github.com/Budibase/budibase
- https://budibase.com
type: application
urls:
- https://budibase.github.io/budibase/budibase-0.2.0.tgz
version: 0.2.0
- apiVersion: v2
appVersion: 0.9.56
created: "2021-12-08T16:26:47.042113Z"
dependencies:
- condition: services.couchdb.enabled
name: couchdb
repository: https://apache.github.io/couchdb-helm
version: 3.3.4
- name: ingress-nginx
repository: https://github.com/kubernetes/ingress-nginx
version: 3.35.0
description: Budibase is an open source low-code platform, helping thousands of teams build apps for their workplace in minutes.
digest: 8dc4f2ed4d98cad5adf25936aefea680042d3e4e17832f846b961fd8708ad192
keywords:
- low-code
- database
- cluster
name: budibase
sources:
- https://github.com/Budibase/budibase
- https://budibase.com
type: application
urls:
- https://budibase.github.io/budibase/budibase-0.1.1.tgz
version: 0.1.1
- apiVersion: v2
appVersion: 0.9.56
created: "2021-12-08T16:26:47.036016Z"
dependencies:
- condition: services.couchdb.enabled
name: couchdb
repository: https://apache.github.io/couchdb-helm
version: 3.3.4
- name: ingress-nginx
repository: https://github.com/kubernetes/ingress-nginx
version: 3.35.0
description: Budibase is an open source low-code platform, helping thousands of teams build apps for their workplace in minutes.
digest: 08031b0803cce0eff64472e569d454d9176119c8207aa9873a9c95ee66cc7d3f
keywords:
- low-code
- database
- cluster
name: budibase
sources:
- https://github.com/Budibase/budibase
- https://budibase.com
type: application
urls:
- https://budibase.github.io/budibase/budibase-0.1.0.tgz
version: 0.1.0
generated: "2021-12-08T16:26:47.031998Z"

6
scripts/releaseHelmChart.js

@ -1,5 +1,4 @@
const yaml = require("js-yaml")
const { execSync } = require("child_process")
const fs = require("fs")
const path = require("path")
@ -9,7 +8,7 @@ const UpgradeTypes = {
PATCH: "patch"
}
const CHART_PATH = path.join(__dirname, "../", "hosting", "kubernetes", "budibase", "Chart.yaml")
const CHART_PATH = path.join(__dirname, "../", "charts", "budibase", "Chart.yaml")
const UPGRADE_VERSION = process.env.BUDIBASE_RELEASE_VERSION
const UPGRADE_TYPE = process.env.HELM_CHART_UPGRADE_TYPE || UpgradeTypes.PATCH
@ -30,9 +29,6 @@ try {
chart.version = [major, minor, newPatch].join(".")
const updatedChartYaml = yaml.dump(chart)
fs.writeFileSync(CHART_PATH, updatedChartYaml)
// package the chart and write to docs dir
execSync(`helm package hosting/kubernetes/budibase --destination docs`)
} catch (err) {
console.error("Error releasing helm chart")
throw err

Loading…
Cancel
Save