Skip to content

Commit

Permalink
Update push steps to use containerized skopeo
Browse files Browse the repository at this point in the history
Signed-off-by: Michael Shen <mshen@redhat.com>
  • Loading branch information
mjlshen committed Mar 29, 2024
1 parent 94bae11 commit a506d20
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ CONTAINER_ENGINE=$(command -v podman || command -v docker)
CONTAINER_ENGINE_SHORT=${CONTAINER_ENGINE##*/}
REPO_ROOT=$(git rev-parse --show-toplevel)
VERSIONS_DIR=${REPO_ROOT}/versions
SKOPEO_IMAGE="quay.io/skopeo/stable:v1.8.0"
SKOPEO_IMAGE="quay.io/skopeo/stable:v1.14.2"

source $REPO_ROOT/boilerplate/_lib/common.sh

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ popd

if [ "$push_catalog" = true ] ; then
# push image
skopeo copy --dest-creds "${QUAY_USER}:${QUAY_TOKEN}" \
${CONTAINER_ENGINE} run ${SKOPEO_IMAGE} -- skopeo copy --dest-creds "${QUAY_USER}:${QUAY_TOKEN}" \
"${SRC_CONTAINER_TRANSPORT}:${registry_image}:${operator_channel}-latest" \
"docker://${registry_image}:${operator_channel}-latest"

Expand All @@ -104,7 +104,7 @@ if [ "$push_catalog" = true ] ; then
exit 1
fi

skopeo copy --dest-creds "${QUAY_USER}:${QUAY_TOKEN}" \
${CONTAINER_ENGINE} run ${SKOPEO_IMAGE} -- skopeo copy --dest-creds "${QUAY_USER}:${QUAY_TOKEN}" \
"${SRC_CONTAINER_TRANSPORT}:${registry_image}:${operator_channel}-latest" \
"docker://${registry_image}:${operator_channel}-${operator_commit_hash}"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

REPO_ROOT=$(git rev-parse --show-toplevel)
source $REPO_ROOT/boilerplate/_lib/common.sh
SKOPEO_IMAGE="quay.io/skopeo/stable:v1.14.2"

function check_mandatory_params() {
local csv_missing_param_error
Expand Down
3 changes: 2 additions & 1 deletion config/app-sre-build-push.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ quay_image=$registry/$namespace/$name

HERE=$(realpath ${0%/*})
container_engine=${CONTAINER_ENGINE:-$(command -v podman || echo docker)}
SKOPEO_IMAGE="quay.io/skopeo/stable:v1.14.2"

build_cumulative() {
local tag=$1
Expand All @@ -26,7 +27,7 @@ build_cumulative() {
push_for_tag() {
local tag=$1
echo "Pushing for tag $tag"
skopeo copy --dest-creds "${QUAY_USER}:${QUAY_TOKEN}" \
${container_engine} run ${SKOPEO_IMAGE} -- skopeo copy --dest-creds "${QUAY_USER}:${QUAY_TOKEN}" \
"docker-daemon:${name}:$tag" \
"docker://${quay_image}:$tag"
}
Expand Down

0 comments on commit a506d20

Please sign in to comment.