Loading .gitlab/ci/chart.gitlab-ci.yml +2 −0 Original line number Diff line number Diff line Loading @@ -22,6 +22,7 @@ chart:compile_manifests: script: - mkdir manifests - helm init --client-only - helm repo add stable-archive https://gitlab-org.gitlab.io/cluster-integration/helm-stable-archive - helm dependency build . - helm template -f values.yaml --output-dir manifests . artifacts: Loading @@ -43,6 +44,7 @@ chart:test: script: - apk add --no-cache build-base go - helm init --client-only - helm repo add stable-archive https://gitlab-org.gitlab.io/cluster-integration/helm-stable-archive - helm dependency build . - cd test && GO111MODULE=auto go test . Loading .gitlab/ci/release.gitlab-ci.yml +4 −4 Original line number Diff line number Diff line Loading @@ -53,7 +53,8 @@ publish-dryrun: script: - semantic-release -d |tee output.log # Check if the bundled chart version matches the next auto-deploy-image version. - git diff @..@^ --name-only | grep 'assets/auto-deploy-app' || echo 'This change does not contain changes for the chart. Skip the validation' && exit 0 - git diff @..@^ --name-only | grep 'assets/auto-deploy-app' - if [[ "$?" != "0" ]]; then echo 'This change does not contain changes for the chart. Skip the validation' && exit 0; fi - next_release_version=$(cat output.log | grep -oP "The next release version is \K.*$") || true - bundled_chart_version=$(cat assets/auto-deploy-app/Chart.yaml | grep -oP "version:\s*\K.*$") - echo "next_release_version is $next_release_version" Loading @@ -61,9 +62,8 @@ publish-dryrun: - | if [ -n "${next_release_version}" ] && [ -n "${bundled_chart_version}" ] && [ "${next_release_version}" != "${bundled_chart_version}" ]; then cat <<- EOS [WARN] auto-deploy-app chart version mismatch error. This merge request triggers to create a new release, auto-deploy-image ${next_release_version}. This version must be matched to the auto-deploy-app chart's version, however, currently it's set to ${bundled_chart_version}. [WARN] auto-deploy-app chart version outdated! This merge request changes auto-deploy-app chart, however, the chart version is not updated yet. Please set ${next_release_version} to the version column in assets/auto-deploy-app/Chart.yaml to resovle this error. EOS exit 1 Loading .gitlab/ci/test.gitlab-ci.yml +13 −23 Original line number Diff line number Diff line Loading @@ -62,20 +62,6 @@ test-download-chart: - auto-deploy download_chart - ./test/verify-chart-version 1 test-download-chart-from-repo: <<: *test-job variables: AUTO_DEVOPS_CHART_REPOSITORY: https://charts.gitlab.io AUTO_DEVOPS_CHART_REPOSITORY_NAME: gitlab AUTO_DEVOPS_CHART: gitlab/auto-deploy-app script: - auto-deploy download_chart - ./test/verify-chart-version 0 # test that a custom repo gets added even if the chart/ folder is present - export AUTO_DEVOPS_CHART_REPOSITORY_NAME=custom - auto-deploy download_chart - helm fetch custom/auto-deploy-app test-deploy-name: <<: *test-job variables: Loading Loading @@ -331,6 +317,16 @@ test-deploy-debug: - auto-deploy deploy - cat tiller.log test-deploy-when-stable-chart-repository-is-unreachable: extends: test-deploy variables: <<: *deploy-variables script: - echo "127.0.0.1 kubernetes-charts.storage.googleapis.com" >> /etc/hosts - auto-deploy initialize_tiller - auto-deploy download_chart - auto-deploy deploy test-deploy-postgresql-channel-1: extends: test-deploy variables: Loading Loading @@ -513,18 +509,12 @@ test-delete-canary-postgresql: test-chart-major-version-upgrade: extends: test-deploy variables: AUTO_DEVOPS_CHART_REPOSITORY: https://charts.gitlab.io AUTO_DEVOPS_CHART_REPOSITORY_NAME: gitlab script: - unset ADDITIONAL_HOSTS # The legacy chart is not compatible wildcard hosts on ADDITIONAL_HOSTS - auto-deploy initialize_tiller # Downloading legacy v0 chart from charts.gitlab.io and the deployment should succeed - AUTO_DEVOPS_CHART=gitlab/auto-deploy-app auto-deploy download_chart - auto-deploy deploy - rm -Rf chart # Copying bundled chart from local storage and the deployment should fail # Copying bundled chart from local storage and the deployment should succeed - auto-deploy download_chart - auto-deploy deploy # Modifying the chart version and the deployment should fail - "sed -i 's/version:.*/version: 10.0.0/g' chart/Chart.yaml" - cat chart/Chart.yaml - auto-deploy deploy| tee deploy.log || true Loading assets/auto-deploy-app/Chart.yaml +1 −1 Original line number Diff line number Diff line apiVersion: v1 description: GitLab's Auto-deploy Helm Chart name: auto-deploy-app version: 1.0.3 version: 1.0.6 icon: https://gitlab.com/gitlab-com/gitlab-artwork/raw/master/logo/logo-square.png assets/auto-deploy-app/requirements.lock +3 −3 Original line number Diff line number Diff line dependencies: - name: postgresql repository: https://kubernetes-charts.storage.googleapis.com/ repository: https://gitlab-org.gitlab.io/cluster-integration/helm-stable-archive version: 0.7.1 digest: sha256:358ce85fe4d3461ea6bb96713470a80de9c1324214a2e6f97d800298c02530e2 generated: 2017-08-28T15:22:30.690341342-05:00 digest: sha256:0a7e2f279e3b8063cfe6365a56601227ff8934fa70a0434df0485bce9590be56 generated: "2020-10-21T09:35:20.464079556+07:00" Loading
.gitlab/ci/chart.gitlab-ci.yml +2 −0 Original line number Diff line number Diff line Loading @@ -22,6 +22,7 @@ chart:compile_manifests: script: - mkdir manifests - helm init --client-only - helm repo add stable-archive https://gitlab-org.gitlab.io/cluster-integration/helm-stable-archive - helm dependency build . - helm template -f values.yaml --output-dir manifests . artifacts: Loading @@ -43,6 +44,7 @@ chart:test: script: - apk add --no-cache build-base go - helm init --client-only - helm repo add stable-archive https://gitlab-org.gitlab.io/cluster-integration/helm-stable-archive - helm dependency build . - cd test && GO111MODULE=auto go test . Loading
.gitlab/ci/release.gitlab-ci.yml +4 −4 Original line number Diff line number Diff line Loading @@ -53,7 +53,8 @@ publish-dryrun: script: - semantic-release -d |tee output.log # Check if the bundled chart version matches the next auto-deploy-image version. - git diff @..@^ --name-only | grep 'assets/auto-deploy-app' || echo 'This change does not contain changes for the chart. Skip the validation' && exit 0 - git diff @..@^ --name-only | grep 'assets/auto-deploy-app' - if [[ "$?" != "0" ]]; then echo 'This change does not contain changes for the chart. Skip the validation' && exit 0; fi - next_release_version=$(cat output.log | grep -oP "The next release version is \K.*$") || true - bundled_chart_version=$(cat assets/auto-deploy-app/Chart.yaml | grep -oP "version:\s*\K.*$") - echo "next_release_version is $next_release_version" Loading @@ -61,9 +62,8 @@ publish-dryrun: - | if [ -n "${next_release_version}" ] && [ -n "${bundled_chart_version}" ] && [ "${next_release_version}" != "${bundled_chart_version}" ]; then cat <<- EOS [WARN] auto-deploy-app chart version mismatch error. This merge request triggers to create a new release, auto-deploy-image ${next_release_version}. This version must be matched to the auto-deploy-app chart's version, however, currently it's set to ${bundled_chart_version}. [WARN] auto-deploy-app chart version outdated! This merge request changes auto-deploy-app chart, however, the chart version is not updated yet. Please set ${next_release_version} to the version column in assets/auto-deploy-app/Chart.yaml to resovle this error. EOS exit 1 Loading
.gitlab/ci/test.gitlab-ci.yml +13 −23 Original line number Diff line number Diff line Loading @@ -62,20 +62,6 @@ test-download-chart: - auto-deploy download_chart - ./test/verify-chart-version 1 test-download-chart-from-repo: <<: *test-job variables: AUTO_DEVOPS_CHART_REPOSITORY: https://charts.gitlab.io AUTO_DEVOPS_CHART_REPOSITORY_NAME: gitlab AUTO_DEVOPS_CHART: gitlab/auto-deploy-app script: - auto-deploy download_chart - ./test/verify-chart-version 0 # test that a custom repo gets added even if the chart/ folder is present - export AUTO_DEVOPS_CHART_REPOSITORY_NAME=custom - auto-deploy download_chart - helm fetch custom/auto-deploy-app test-deploy-name: <<: *test-job variables: Loading Loading @@ -331,6 +317,16 @@ test-deploy-debug: - auto-deploy deploy - cat tiller.log test-deploy-when-stable-chart-repository-is-unreachable: extends: test-deploy variables: <<: *deploy-variables script: - echo "127.0.0.1 kubernetes-charts.storage.googleapis.com" >> /etc/hosts - auto-deploy initialize_tiller - auto-deploy download_chart - auto-deploy deploy test-deploy-postgresql-channel-1: extends: test-deploy variables: Loading Loading @@ -513,18 +509,12 @@ test-delete-canary-postgresql: test-chart-major-version-upgrade: extends: test-deploy variables: AUTO_DEVOPS_CHART_REPOSITORY: https://charts.gitlab.io AUTO_DEVOPS_CHART_REPOSITORY_NAME: gitlab script: - unset ADDITIONAL_HOSTS # The legacy chart is not compatible wildcard hosts on ADDITIONAL_HOSTS - auto-deploy initialize_tiller # Downloading legacy v0 chart from charts.gitlab.io and the deployment should succeed - AUTO_DEVOPS_CHART=gitlab/auto-deploy-app auto-deploy download_chart - auto-deploy deploy - rm -Rf chart # Copying bundled chart from local storage and the deployment should fail # Copying bundled chart from local storage and the deployment should succeed - auto-deploy download_chart - auto-deploy deploy # Modifying the chart version and the deployment should fail - "sed -i 's/version:.*/version: 10.0.0/g' chart/Chart.yaml" - cat chart/Chart.yaml - auto-deploy deploy| tee deploy.log || true Loading
assets/auto-deploy-app/Chart.yaml +1 −1 Original line number Diff line number Diff line apiVersion: v1 description: GitLab's Auto-deploy Helm Chart name: auto-deploy-app version: 1.0.3 version: 1.0.6 icon: https://gitlab.com/gitlab-com/gitlab-artwork/raw/master/logo/logo-square.png
assets/auto-deploy-app/requirements.lock +3 −3 Original line number Diff line number Diff line dependencies: - name: postgresql repository: https://kubernetes-charts.storage.googleapis.com/ repository: https://gitlab-org.gitlab.io/cluster-integration/helm-stable-archive version: 0.7.1 digest: sha256:358ce85fe4d3461ea6bb96713470a80de9c1324214a2e6f97d800298c02530e2 generated: 2017-08-28T15:22:30.690341342-05:00 digest: sha256:0a7e2f279e3b8063cfe6365a56601227ff8934fa70a0434df0485bce9590be56 generated: "2020-10-21T09:35:20.464079556+07:00"