chapel icon indicating copy to clipboard operation
chapel copied to clipboard

Set up Docker test job to allow publishing release images

Open riftEmber opened this issue 4 months ago • 0 comments

Refactor the Docker nightly testing script to optionally also push release-tagged images.

Configured by the RELEASE_VERSION environment variable, assumed to get set via Jenkins parameter. If set, the script pushes the images tagged as latest and $RELEASE_VERSION. All nightly build/pushes still run before release-tagged pushes, so we don't push a release if any image variants are broken. Script aborts without building anything if RELEASE_VERSION is set but we're not on the appropriate release branch.

As part of this PR I attempted to change our process to test the image before pushing, rather than build, push, then test. However, on chapelmac-m1 this ran into https://github.com/docker/buildx/issues/59, so I reverted it. Since we only push release images after all nightly images, we're still safe from pushing a broken release-tagged image. Noted this limitation and the requirement to build nightly images first in a comment.

Resolves https://github.com/Cray/chapel-private/issues/6743.

Associated pre-merge tasks:

  • [ ] merge corresponding CI config adjustments PR https://github.hpe.com/hpe/hpc-chapel-ci-config/pull/1291
  • [x] disable unused previous job https://chapel-ci.us.cray.com/job/publish-docker-images/
  • [x] update Docker release best-practices to tell you to use this script (https://github.hpe.com/hpe/hpc-chapel-docs/commit/d159f7e8a0be122660cd8af39e3b49ddb8b59486)
  • [ ] delete temporarily private Docker repositories created for testing

Testing:

  • [ ] manual run in non-release mode still works
  • [ ] manual run in release mode (temporarily modified to push to a scratch repo)

riftEmber avatar Oct 07 '24 16:10 riftEmber