Skip to content

[v1.0.0.beta] feat: Use bundled chart

Shinya Maeda requested to merge feat-use-bundling-chart into beta

Important

  • BREAKING CHANGE: This is not technically a breaking change as AutoDeploy pipelines still use the v0 chart, however, we decided to increment a major version for the safety.

What's changed in this MR?

  • Fix Dockerfile to copy the assets/auto-deploy-app into the auto-deploy image.
  • Fix download_chart function to move the bundled chart for the actual usage (if user-defined chart and chart repository variable do not exist).
  • Implement version detection
  • Add tests

(You can check the whole plan at gitlab-org/charts/auto-deploy-app#70 (moved))

Sample Warning message when it detected major version difference

shinya@shinya-MS-7A34:~/workspace/auto-deploy-image$ src/bin/validate-chart-version "$helm_ls" 'assets/auto-deploy-app' 'production'
Validating chart version...
Fetching the previously deployed chart version... auto-deploy-app-v0.7.0
Fetching the deploying chart version... auto-deploy-app-v1.0.0
*************************************************************************************
                                   [WARNING]                                         
Detected the major version difference between the previously deployed chart (auto-deploy-app-v0.7.0) and the currently deploying chart (auto-deploy-app-v1.0.0).
A new major version likely does not have backward compatibility to the current release (production), therefore the deployment could fail or stuck in an unrecoverable status.
To handle this situation properly, please follow this instruction:

- To proceed with the currently deploying chart version, follow this link
  https://docs.gitlab.com/ee/topics/autodevops/upgrading_chart.html and redeploy.

- Or, to continue using the previously deployed chart, specify a compatible auto-deploy-image version in .gitlab-ci.yml.
  For example,
  '''
  include:
    - template: Auto-DevOps.gitlab-ci.yml

  .auto-deploy:
    image: "registry.gitlab.com/gitlab-org/cluster-integration/auto-deploy-image:v0.17.0"
  '''
  Reference: https://docs.gitlab.com/ee/topics/autodevops/customize.html#customizing-gitlab-ciyml
*************************************************************************************

Reference

Edited by Shinya Maeda

Merge request reports