summaryrefslogtreecommitdiff
path: root/.expeditor
diff options
context:
space:
mode:
authorNathaniel Kierpiec <nkierpiec@chef.io>2021-07-28 14:50:43 -0400
committerNathaniel Kierpiec <nkierpiec@chef.io>2021-07-28 14:50:43 -0400
commit507d5d55c3aab36a5058f4efbeee7836ce9b2c3d (patch)
tree71b76dd6c115b10a06a2d5d35fb47e3da16e7c6a /.expeditor
parent20567cc22f96a924876c1a2b43c5cf5dfb9f17e7 (diff)
downloadchef-507d5d55c3aab36a5058f4efbeee7836ce9b2c3d.tar.gz
make files readable by buildkite and simplify manifest script
Signed-off-by: Nathaniel Kierpiec <nkierpiec@chef.io>
Diffstat (limited to '.expeditor')
-rwxr-xr-x[-rw-r--r--].expeditor/build-docker-images.sh0
-rwxr-xr-x[-rw-r--r--].expeditor/docker-manifest-create.sh0
-rwxr-xr-x[-rw-r--r--].expeditor/promote-docker-images.sh45
3 files changed, 16 insertions, 29 deletions
diff --git a/.expeditor/build-docker-images.sh b/.expeditor/build-docker-images.sh
index b7da52042f..b7da52042f 100644..100755
--- a/.expeditor/build-docker-images.sh
+++ b/.expeditor/build-docker-images.sh
diff --git a/.expeditor/docker-manifest-create.sh b/.expeditor/docker-manifest-create.sh
index 7a2da6cdd6..7a2da6cdd6 100644..100755
--- a/.expeditor/docker-manifest-create.sh
+++ b/.expeditor/docker-manifest-create.sh
diff --git a/.expeditor/promote-docker-images.sh b/.expeditor/promote-docker-images.sh
index b09a2bc0b8..dcbceefd64 100644..100755
--- a/.expeditor/promote-docker-images.sh
+++ b/.expeditor/promote-docker-images.sh
@@ -1,42 +1,29 @@
#! /bin/bash
-# EXPEDITOR_VERSION exists within the artifact_published workload
-
export DOCKER_CLI_EXPERIMENTAL=enabled
-echo "--- Creating manifest for ${EXPEDITOR_TARGET_CHANNEL}"
-docker manifest create "chef/chef:${EXPEDITOR_TARGET_CHANNEL}" \
- --amend "chef/chef:${EXPEDITOR_VERSION}-arm64" \
- --amend "chef/chef:${EXPEDITOR_VERSION}-amd64"
-
-echo "--- Pushing manifest for ${EXPEDITOR_TARGET_CHANNEL}"
-docker manifest push "chef/chef:${EXPEDITOR_TARGET_CHANNEL}"
-
-if [[ $EXPEDITOR_TARGET_CHANNEL == "stable" ]]; then
- echo "--- Creating manifest for latest"
- docker manifest create "chef/chef:latest" \
+function create_and_push_manifest() {
+ echo "--- Creating manifest for ${1}"
+ docker manifest create "chef/chef:${1}" \
--amend "chef/chef:${EXPEDITOR_VERSION}-arm64" \
--amend "chef/chef:${EXPEDITOR_VERSION}-amd64"
- echo "--- Pushing manifest for latest"
- docker manifest push "chef/chef:latest"
+ echo "--- Pushing manifest for ${1}"
+ docker manifest push "chef/chef:${1}"
+}
- # split the version and add the tags for major and major.minor
- version=(${EXPEDITOR_VERSION//./ })
+# unstable, stable, current
+create_and_push_manifest "${EXPEDITOR_TARGET_CHANNEL}"
- echo "--- Creating manifest for ${version[0]}"
- docker manifest create "chef/chef:${version[0]}" \
- --amend "chef/chef:${EXPEDITOR_VERSION}-arm64" \
- --amend "chef/chef:${EXPEDITOR_VERSION}-amd64"
+if [[ $EXPEDITOR_TARGET_CHANNEL == "stable" ]]; then
+ create_and_push_manifest "latest"
- echo "--- Pushing manifest for ${version[0]}"
- docker manifest push "chef/chef:${version[0]}"
+ # split the version and add the tags for major and major.minor
+ version=(${EXPEDITOR_VERSION//./ })
- echo "--- Creating manifest for ${version[0]}.${version[1]}"
- docker manifest create "chef/chef:${version[0]}.${version[1]}" \
- --amend "chef/chef:${EXPEDITOR_VERSION}-arm64" \
- --amend "chef/chef:${EXPEDITOR_VERSION}-amd64"
+ # major version
+ create_and_push_manifest "${version[0]}"
- echo "--- Pushing manifest for ${version[0]}.${version[1]}"
- docker manifest push "chef/chef:${version[0]}.${version[1]}"
+ # major.minor version
+ create_and_push_manifest "${version[0]}.${version[1]}"
fi \ No newline at end of file