Skip to content

Unit test against upstream chart from any branch/ref

Lucas Li requested to merge unit-test-against-nightly-chart into master

What does this MR do?

Closes #1578 (closed)

  • Add retrieve-charts-custom-ref task to fetch charts from https://gitlab.com/gitlab-org/charts/gitlab.
    • Also retrieve_gitlab_charts_custom+ref.sh script.
    • Set CHARTS_REF to fetch an arbitrary branch, could also be a tag, sha. Defaults to master branch.
    • Chart will be saved to charts/gitlab-X.Y.Z-{short_sha}.tgz, where X.Y.Z is the semver of target ref
    • Will write X.Y.Z-{short_sha} and {ref}@{short_sha} to CHART_NIGHTLY_VERSION, for later use
  • Results of charts.GlobalCatalog().Versions() will be sorted in descending order for better consistency.
    • helm.GetChartVersion() will always return the latest supported version.
  • Add corresponding CI jobs

TODR;

To test against upstream branch 8-0-stable, start manual job unit_tests_custom_ref, or slow_unit_tests_custom_ref, set CHARTS_REF to 8-0-stable.

Further:

  • Test against arbitrary branch?
  • Use dev charts instead?
  • Consider adding jq to the builder image for urlencoding and bumping the yq, task versions.

Checklist

See Definition of done.

For anything in this list which will not be completed, please provide a reason in the MR discussion.

Required

  • Merge Request Title and Description are up to date, accurate, and descriptive
  • MR targeting the appropriate branch
  • MR has a green pipeline on GitLab.com
  • When ready for review, MR is labeled "~workflow::ready for review" per the Distribution MR workflow

Expected (please provide an explanation if not completing)

  • Test plan indicating conditions for success has been posted and passes
  • Documentation created/updated
  • Tests added
  • Integration tests added to GitLab QA
  • Equivalent MR/issue for omnibus-gitlab opened
  • Validate potential values for new configuration settings. Formats such as integer 10, duration 10s, URI scheme://user:passwd@host:port may require quotation or other special handling when rendered in a template and written to a configuration file.

Related issues

#1578 (closed)

Edited by Lucas Li

Merge request reports