Loading .gitlab/ci/build.gitlab-ci.yml +3 −0 Original line number Diff line number Diff line Loading @@ -13,3 +13,6 @@ build: --build-arg "GLIBC_VERSION=$GLIBC_VERSION" --tag "$BUILD_IMAGE_NAME" . - docker push "$BUILD_IMAGE_NAME" - export latest_tag="${CI_REGISTRY_IMAGE}/${CI_COMMIT_REF_SLUG}:latest" - docker tag "$BUILD_IMAGE_NAME" $latest_tag - docker push $latest_tag .gitlab/ci/release.gitlab-ci.yml +3 −0 Original line number Diff line number Diff line Loading @@ -18,12 +18,15 @@ release-tag: - 'echo ${CI_JOB_TOKEN} | docker login --password-stdin -u $CI_REGISTRY_USER $CI_REGISTRY' - export ci_image="${CI_REGISTRY_IMAGE}" - export ci_image_tag=${CI_COMMIT_TAG:-$CI_COMMIT_SHORT_SHA} - export ci_image_tag_major=$(echo $CI_COMMIT_TAG | sed 's/\(v[0-9]\+\)\.[0-9]\+\.[0-9]\+/\1/') - echo "Using tag $ci_image_tag for image" - docker pull "$BUILD_IMAGE_NAME" - docker tag "$BUILD_IMAGE_NAME" $ci_image:latest - docker tag "$BUILD_IMAGE_NAME" $ci_image:$ci_image_tag - docker tag "$BUILD_IMAGE_NAME" $ci_image:$ci_image_tag_major - docker push $ci_image:latest - docker push $ci_image:$ci_image_tag - docker push $ci_image:$ci_image_tag_major rules: - if: $CI_COMMIT_TAG Loading .gitlab/ci/test.gitlab-ci.yml +12 −0 Original line number Diff line number Diff line Loading @@ -64,10 +64,16 @@ test-download-chart: 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 Loading Loading @@ -258,6 +264,7 @@ test-deploy: CI_APPLICATION_TAG: "5d248f6fa69a" CI_ENVIRONMENT_SLUG: production CI_ENVIRONMENT_URL: example.com ADDITIONAL_HOSTS: '*.example.com, extra.host.com' CI_PROJECT_PATH_SLUG: "gitlab-org/cluster-integration/auto-build-image" CI_PROJECT_VISIBILITY: public KUBE_NAMESPACE: default Loading Loading @@ -448,7 +455,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 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: 2.0.0-beta.2 version: 2.0.0-beta.3 icon: https://gitlab.com/gitlab-com/gitlab-artwork/raw/master/logo/logo-square.png assets/auto-deploy-app/templates/_helpers.tpl +1 −1 Original line number Diff line number Diff line Loading @@ -37,7 +37,7 @@ We truncate at 63 chars because some Kubernetes name fields are limited to this Get a hostname from URL */}} {{- define "hostname" -}} {{- . | trimPrefix "http://" | trimPrefix "https://" | trimSuffix "/" | quote -}} {{- . | trimPrefix "http://" | trimPrefix "https://" | trimSuffix "/" | trim | quote -}} {{- end -}} {{/* Loading Loading
.gitlab/ci/build.gitlab-ci.yml +3 −0 Original line number Diff line number Diff line Loading @@ -13,3 +13,6 @@ build: --build-arg "GLIBC_VERSION=$GLIBC_VERSION" --tag "$BUILD_IMAGE_NAME" . - docker push "$BUILD_IMAGE_NAME" - export latest_tag="${CI_REGISTRY_IMAGE}/${CI_COMMIT_REF_SLUG}:latest" - docker tag "$BUILD_IMAGE_NAME" $latest_tag - docker push $latest_tag
.gitlab/ci/release.gitlab-ci.yml +3 −0 Original line number Diff line number Diff line Loading @@ -18,12 +18,15 @@ release-tag: - 'echo ${CI_JOB_TOKEN} | docker login --password-stdin -u $CI_REGISTRY_USER $CI_REGISTRY' - export ci_image="${CI_REGISTRY_IMAGE}" - export ci_image_tag=${CI_COMMIT_TAG:-$CI_COMMIT_SHORT_SHA} - export ci_image_tag_major=$(echo $CI_COMMIT_TAG | sed 's/\(v[0-9]\+\)\.[0-9]\+\.[0-9]\+/\1/') - echo "Using tag $ci_image_tag for image" - docker pull "$BUILD_IMAGE_NAME" - docker tag "$BUILD_IMAGE_NAME" $ci_image:latest - docker tag "$BUILD_IMAGE_NAME" $ci_image:$ci_image_tag - docker tag "$BUILD_IMAGE_NAME" $ci_image:$ci_image_tag_major - docker push $ci_image:latest - docker push $ci_image:$ci_image_tag - docker push $ci_image:$ci_image_tag_major rules: - if: $CI_COMMIT_TAG Loading
.gitlab/ci/test.gitlab-ci.yml +12 −0 Original line number Diff line number Diff line Loading @@ -64,10 +64,16 @@ test-download-chart: 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 Loading Loading @@ -258,6 +264,7 @@ test-deploy: CI_APPLICATION_TAG: "5d248f6fa69a" CI_ENVIRONMENT_SLUG: production CI_ENVIRONMENT_URL: example.com ADDITIONAL_HOSTS: '*.example.com, extra.host.com' CI_PROJECT_PATH_SLUG: "gitlab-org/cluster-integration/auto-build-image" CI_PROJECT_VISIBILITY: public KUBE_NAMESPACE: default Loading Loading @@ -448,7 +455,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 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: 2.0.0-beta.2 version: 2.0.0-beta.3 icon: https://gitlab.com/gitlab-com/gitlab-artwork/raw/master/logo/logo-square.png
assets/auto-deploy-app/templates/_helpers.tpl +1 −1 Original line number Diff line number Diff line Loading @@ -37,7 +37,7 @@ We truncate at 63 chars because some Kubernetes name fields are limited to this Get a hostname from URL */}} {{- define "hostname" -}} {{- . | trimPrefix "http://" | trimPrefix "https://" | trimSuffix "/" | quote -}} {{- . | trimPrefix "http://" | trimPrefix "https://" | trimSuffix "/" | trim | quote -}} {{- end -}} {{/* Loading