diff options
author | Nathaniel Kierpiec <nkierpiec@chef.io> | 2021-07-28 16:09:19 -0400 |
---|---|---|
committer | Nathaniel Kierpiec <nkierpiec@chef.io> | 2021-07-28 16:09:19 -0400 |
commit | cdee881b91ab1cfd0d5e5fcf828847c49d09dfa7 (patch) | |
tree | fd9e20d9d72f4856a4ea3ed8e2603c7e82867ae6 | |
parent | 60c8b1ff7347603eedf04bda1634d7a576d3cedd (diff) | |
download | chef-cdee881b91ab1cfd0d5e5fcf828847c49d09dfa7.tar.gz |
update environment variable reference from workload
Signed-off-by: Nathaniel Kierpiec <nkierpiec@chef.io>
-rwxr-xr-x | .expeditor/docker-manifest-create.sh | 20 | ||||
-rwxr-xr-x | .expeditor/promote-docker-images.sh | 16 |
2 files changed, 23 insertions, 13 deletions
diff --git a/.expeditor/docker-manifest-create.sh b/.expeditor/docker-manifest-create.sh index 7a2da6cdd6..5040a38d60 100755 --- a/.expeditor/docker-manifest-create.sh +++ b/.expeditor/docker-manifest-create.sh @@ -2,10 +2,18 @@ export DOCKER_CLI_EXPERIMENTAL=enabled -echo "--- Creating chef/chef:${EXPEDITOR_VERSION} multiarch manifest" -docker manifest create "chef/chef:${EXPEDITOR_VERSION}" \ - --amend "chef/chef:${EXPEDITOR_VERSION}-amd64" \ - --amend "chef/chef:${EXPEDITOR_VERSION}-arm64" +function create_and_push_manifest() { + manifest_tag="$1" -echo "--- Pushing chef/chef:${EXPEDITOR_VERSION} multiarch manifest" -docker manifest push "chef/chef:${EXPEDITOR_VERSION}"
\ No newline at end of file + echo "--- Creating manifest for ${manifest_tag}" + docker manifest create "chef/chef:${manifest_tag}" \ + --amend "chef/chef:${EXPEDITOR_VERSION}-arm64" \ + --amend "chef/chef:${EXPEDITOR_VERSION}-amd64" + + echo "--- Pushing manifest for ${manifest_tag}" + docker manifest push "chef/chef:${manifest_tag}" +} + +# create the initial version and initial channel docker images +create_and_push_manifest "${EXPEDITOR_VERSION}" +create_and_push_manifest "${EXPEDITOR_CHANNEL}"
\ No newline at end of file diff --git a/.expeditor/promote-docker-images.sh b/.expeditor/promote-docker-images.sh index dcbceefd64..4fa7e9354b 100755 --- a/.expeditor/promote-docker-images.sh +++ b/.expeditor/promote-docker-images.sh @@ -3,19 +3,21 @@ export DOCKER_CLI_EXPERIMENTAL=enabled function create_and_push_manifest() { - echo "--- Creating manifest for ${1}" - docker manifest create "chef/chef:${1}" \ + manifest_tag="$1" + + echo "--- Creating manifest for ${manifest_tag}" + docker manifest create "chef/chef:${manifest_tag}" \ --amend "chef/chef:${EXPEDITOR_VERSION}-arm64" \ --amend "chef/chef:${EXPEDITOR_VERSION}-amd64" - echo "--- Pushing manifest for ${1}" - docker manifest push "chef/chef:${1}" + echo "--- Pushing manifest for ${manifest_tag}" + docker manifest push "chef/chef:${manifest_tag}" } -# unstable, stable, current -create_and_push_manifest "${EXPEDITOR_TARGET_CHANNEL}" +# create the promoted channel docker image +create_and_push_manifest "${EXPEDITOR_CHANNEL}" -if [[ $EXPEDITOR_TARGET_CHANNEL == "stable" ]]; then +if [[ ${EXPEDITOR_CHANNEL} == "stable" ]]; then create_and_push_manifest "latest" # split the version and add the tags for major and major.minor |