summaryrefslogtreecommitdiff
path: root/.expeditor
diff options
context:
space:
mode:
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