Skip to content

Commit

Permalink
Manually bump to 1.36.0 (#3060)
Browse files Browse the repository at this point in the history
* Manually bump to 1.36.0

Signed-off-by: Pierangelo Di Pilato <[email protected]>

* Use bundle:latest image for index Dockerfile

Signed-off-by: Pierangelo Di Pilato <[email protected]>

* Add get_bundle_for_version to catalog.sh

Signed-off-by: Pierangelo Di Pilato <[email protected]>

* Recreate index Dockerfile instead of search and replace via dynamic env var

Signed-off-by: Pierangelo Di Pilato <[email protected]>

* Update release process to follow a specific order and remove conflicting updates

Signed-off-by: Pierangelo Di Pilato <[email protected]>

* Remove rootdir from variable

Signed-off-by: Pierangelo Di Pilato <[email protected]>

* Instead of replacing image references, force use quay registry for testing

Replacing as done before doesn't respect per-component versioning and we
don't want to add the pre-requisite that every component is ready to bump
operator metadata.

Signed-off-by: Pierangelo Di Pilato <[email protected]>

* Try multiple mirrors

Signed-off-by: Pierangelo Di Pilato <[email protected]>

* Ensure ImageContentSourcePolicy

Signed-off-by: Pierangelo Di Pilato <[email protected]>

* Fix prefix check

Signed-off-by: Pierangelo Di Pilato <[email protected]>

* skopeo retry-times

Signed-off-by: Pierangelo Di Pilato <[email protected]>

* Run make generated-files

Signed-off-by: Pierangelo Di Pilato <[email protected]>

* Remove channelv2 downgrade migration as it's only for 1.35

Signed-off-by: Pierangelo Di Pilato <[email protected]>

---------

Signed-off-by: Pierangelo Di Pilato <[email protected]>
  • Loading branch information
pierDipi authored Jan 23, 2025
1 parent d2d2f88 commit 56665c6
Show file tree
Hide file tree
Showing 37 changed files with 1,123 additions and 521 deletions.
3 changes: 2 additions & 1 deletion .github/ISSUE_TEMPLATE/release.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,13 @@ assignees: ''
## Cutting the new release branch
- [ ] Create a new branch from `main` with the pattern `release-x.xx`
- [ ] [Approve CI setup for `release-1.X` branch in `openshift/release`](https://github.com/openshift/release/pulls/serverless-qe) and wait for the PR to be merged.
- [ ] [Approve PRs created by GitHub actions bot in `serverless-operator`](https://github.com/openshift-knative/serverless-operator/pulls/app%2Fgithub-actions)
- [ ] [Only for release-1.35+] [Revoke and recreate the token for the Konflux auto apply workflow](https://github.com/openshift-knative/hack/tree/main/cmd/konflux-apply#revoke-and-recreate-token)
- [ ] [Only for release-1.35+] [Approve PRs created by `serverless-qe` bot in `hack`](https://github.com/openshift-knative/hack/pulls/serverless-qe)
- [ ] wait for the PR to be merged
- [ ] wait for the [Generate CI config workflow to succeed](https://github.com/openshift-knative/hack/actions/workflows/release-generate-ci.yaml?query=event%3Apush++)
- [ ] [Approve Konflux-related PRs created by `serverless-qe`](https://github.com/pulls?q=is%3Aopen+is%3Apr+author%3Aserverless-qe+archived%3Afalse+%22Konflux%22) and wait for the PR to be merged.
- [ ] Wait for the PRs to be merged
- [ ] [Approve PRs created by GitHub actions bot in `serverless-operator`](https://github.com/openshift-knative/serverless-operator/pulls/app%2Fgithub-actions)
- [ ] Verify that [`knative-istio-authz-chart`](https://github.com/openshift-knative/knative-istio-authz-chart/branches) has a branch with the same name as the `release-1.X` branch created previously in serverless-operator
- [ ] Verify that [`knative-istio-authz-chart`'s `Chart.yaml`](https://github.com/openshift-knative/knative-istio-authz-chart/blob/main/Chart.yaml) has `version` and `appVersion` set to the next version.

Expand Down
1 change: 1 addition & 0 deletions .github/workflows/validate.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ jobs:
run: make generate-catalog

- name: Regenerate override-snapshot
if: github.event_name == 'workflow_dispatch' || github.event_name == 'schedule' || ( github.event_name == 'push' && !contains(github.ref_name, 'dependabot/') )
working-directory: ./src/github.com/${{ github.repository }}
run: make generate-override-snapshot

Expand Down
5 changes: 1 addition & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -360,17 +360,14 @@ generate-dockerfiles: install-tool-generate
# Generates all files that can be generated, includes release files, code generation
# and updates vendoring.
# Use CURRENT_VERSION_IMAGES="<branch>" if you need to override the defaulting to main
generated-files: update-tekton-pipelines install-tools generate-dockerfiles release-files
generated-files: install-tools generate-dockerfiles release-files
./hack/update-deps.sh
./hack/update-codegen.sh
(cd knative-operator && ./hack/update-manifests.sh)
(cd openshift-knative-operator && ./hack/update-manifests.sh)
(cd olm-catalog/serverless-operator && ./hack/update-manifests.sh)
./hack/update-deps.sh

update-tekton-pipelines:
./hack/generate/update-pipelines.sh

generated-files-release-next: release-files
# Re-generate CSV with release-next images
USE_RELEASE_NEXT=true ./hack/generate/csv.sh \
Expand Down
7 changes: 5 additions & 2 deletions hack/generate/catalog.sh
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ EOF

function upgrade_service_mesh_proxy_image() {
sm_proxy_image=$(yq r olm-catalog/serverless-operator/project.yaml 'dependencies.service_mesh_proxy')
sm_proxy_image_stream=$(skopeo inspect --no-tags=true "docker://${sm_proxy_image}" | jq -r '.Labels.version')
sm_proxy_image_stream=$(skopeo inspect --retry-times=10 --no-tags=true "docker://${sm_proxy_image}" | jq -r '.Labels.version')
sm_proxy_image_stream=${sm_proxy_image_stream%.*}
sm_proxy_image=$(latest_konflux_image_sha "${sm_proxy_image}" "${sm_proxy_image_stream}")
yq w --inplace olm-catalog/serverless-operator/project.yaml 'dependencies.service_mesh_proxy' "${sm_proxy_image}"
Expand Down Expand Up @@ -182,4 +182,7 @@ logger.info "Generating catalog"
generate_catalog

logger.info "Generating ImageContextSourcePolicy"
create_image_content_source_policy "${INDEX_IMAGE}" "$registry_redhat_io" "$registry_quay" "olm-catalog/serverless-operator-index/image_content_source_policy.yaml"

default_serverless_operator_images
# shellcheck disable=SC2154
create_image_content_source_policy "${INDEX_IMAGE}" "$registry_redhat_io" "$registry_quay" "$registry_quay_previous" "olm-catalog/serverless-operator-index/image_content_source_policy.yaml"
3 changes: 3 additions & 0 deletions hack/generate/csv.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ set -Eeuo pipefail

template="${1:?Provide template file as arg[1]}"
target="${2:?Provide a target CSV file as arg[2]}"
force_use_quay_images=${3:-"false"}

export FORCE_USE_QUAY_IMAGES="${force_use_quay_images}"

# shellcheck disable=SC1091,SC1090
source "$(dirname "${BASH_SOURCE[0]}")/../lib/common.bash"
Expand Down
7 changes: 0 additions & 7 deletions hack/generate/dockerfile.sh
Original file line number Diff line number Diff line change
Expand Up @@ -56,13 +56,6 @@ if [[ "$template" =~ index.Dockerfile ]]; then
sed --in-place "/opm render/a registry.ci.openshift.org/knative/release-${current_version}:serverless-bundle \\\\" "$target"
done

# Hacks. Should gradually go away with next versions.
# Workaround for https://issues.redhat.com/browse/SRVCOM-3207
# Use a manually built image for 1.32.0.
# TODO: Remove this when 1.32.0 is not included in index. This is a problem only for 1.32.0.
sed --in-place "s|registry.ci.openshift.org/knative/release-1.32.0:serverless-bundle|quay.io/openshift-knative/serverless-bundle:release-1.32.0|" "$target"
# Replace the old format for 1.31.0 and older.
sed --in-place "s|registry.ci.openshift.org/knative/release-1.31.0:serverless-bundle|registry.ci.openshift.org/knative/openshift-serverless-v1.31.0:serverless-bundle|" "$target"
elif [[ "$template" =~ catalog.Dockerfile ]]; then
while IFS=$'\n' read -r ocp_version; do
values[OCP_VERSION]="${ocp_version}"
Expand Down
7 changes: 0 additions & 7 deletions hack/generate/images-rekt.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,5 @@ target="${2:?Provide a target file as arg[2]}"
source "$(dirname "${BASH_SOURCE[0]}")/../lib/images.bash"

default_knative_eventing_images
default_knative_eventing_istio_images
default_knative_eventing_kafka_broker_images
default_knative_backstage_plugins_images
default_knative_serving_images
default_knative_ingress_images
default_knative_kn_plugin_func_images
default_knative_client_images

envsubst < "$template" > "$target"
2 changes: 1 addition & 1 deletion hack/generate/override-snapshot.sh
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ spec:
EOF

index_image="${registry_quay}-fbc-${ocp_version}/serverless-index-${so_version}-fbc-${ocp_version}"
index_image_digest="$(skopeo inspect --no-tags docker://"${index_image}:latest" | jq -r .Digest)"
index_image_digest="$(skopeo inspect --retry-times=10 --no-tags docker://"${index_image}:latest" | jq -r .Digest)"
add_component "${snapshot_file}" "serverless-index-${so_version}-fbc-${ocp_version}" "${index_image}@${index_image_digest}"

append_hash_to_snapshot_name "${snapshot_file}"
Expand Down
7 changes: 0 additions & 7 deletions hack/generate/update-pipelines.sh

This file was deleted.

1 change: 1 addition & 0 deletions hack/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,5 +23,6 @@ create_namespaces "${SYSTEM_NAMESPACES[@]}"
if [[ $INSTALL_CERTMANAGER == "true" ]]; then
install_certmanager
fi
ensure_content_source_policy
ensure_catalogsource_installed
ensure_serverless_installed
36 changes: 18 additions & 18 deletions hack/lib/catalogsource.bash
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ function install_catalogsource {
# unless overridden by FORCE_KONFLUX_INDEX.
if { [ -n "$OPENSHIFT_CI" ] || [ -n "$DOCKER_REPO_OVERRIDE" ]; } && [ -z "${FORCE_KONFLUX_INDEX:-}" ]; then
index_image=image-registry.openshift-image-registry.svc:5000/$OLM_NAMESPACE/serverless-index:latest
bundle_image=image-registry.openshift-image-registry.svc:5000/$OLM_NAMESPACE/serverless-bundle:latest
rootdir="$(dirname "$(dirname "$(dirname "$(realpath "${BASH_SOURCE[0]}")")")")"

csv="${rootdir}/olm-catalog/serverless-operator/manifests/serverless-operator.clusterserviceversion.yaml"
Expand All @@ -42,13 +43,10 @@ function install_catalogsource {
fi

# Generate CSV from template to properly substitute operator images from env variables.
"${rootdir}/hack/generate/csv.sh" templates/csv.yaml "$csv"

# Replace registry.redhat.io references with Konflux quay.io for test purposes as
#
# Pass "true" to replace registry.redhat.io references with Konflux quay.io for test purposes as
# images in the former location are not published yet.
sed -ri "s#(.*)${registry_redhat_io}/(.*@sha[0-9]+:[a-z0-9]+.*)#\1${registry_quay}/\2#" "$csv"
# Remove rhel suffix.
sed -ri "s#(.*${registry_quay}/.*)-rhel[[:digit:]]+(.*)#\1\2#" "$csv"
"${rootdir}/hack/generate/csv.sh" templates/csv.yaml "$csv" "true"

cat "$csv"

Expand All @@ -73,13 +71,8 @@ function install_catalogsource {
cp "${index_dorkerfile_path}" "${rootdir}/_output/bkp.Dockerfile"

# Replace bundle reference with previously built bundle
bundle="${DEFAULT_SERVERLESS_BUNDLE%:*}" # Remove the tag from the match
bundle="${DEFAULT_SERVERLESS_BUNDLE%@*}" # Remove the sha from the match
if ! grep "${bundle}" "${rootdir}/${index_dorkerfile_path}"; then
logger.error "Bundle ${bundle} not found in Dockerfile."
return 1
fi
sed -ri "s#(.*)(${bundle})(:[a-z0-9]*)?(@sha[0-9]+:[a-z0-9]+)?(.*)#\1image-registry.openshift-image-registry.svc:5000/${OLM_NAMESPACE}/serverless-bundle:latest\5#" "${rootdir}/${index_dorkerfile_path}"
export SERVERLESS_BUNDLE="${bundle_image}"
"${rootdir}/hack/generate/dockerfile.sh" "${rootdir}/templates/index.Dockerfile" "${index_dorkerfile_path}"

build_image "serverless-index" "${rootdir}" "${index_dorkerfile_path}"

Expand All @@ -89,7 +82,8 @@ function install_catalogsource {
tmpfile=$(mktemp /tmp/icsp.XXXXXX.yaml)
# Use ImageContentSourcePolicy only with the FBC from Konflux as
# updating machine config pools takes a while.
create_image_content_source_policy "$index_image" "$registry_redhat_io" "$registry_quay" "$tmpfile"
# shellcheck disable=SC2154
create_image_content_source_policy "$index_image" "$registry_redhat_io" "$registry_quay" "$registry_quay_previous" "$tmpfile"
[ -n "$OPENSHIFT_CI" ] && cat "$tmpfile"
if oc apply -f "$tmpfile"; then
echo "Wait for machineconfigpool update to start"
Expand Down Expand Up @@ -129,7 +123,8 @@ function create_image_content_source_policy {
index="${1:?Pass index image as arg[1]}"
registry_source="${2:?Pass source registry arg[2]}"
registry_target="${3:?Pass target registry arg[3]}"
output_file="${4:?Pass output file arg[4]}"
registry_target_previous="${4:?Pass previous target registry arg[4]}"
output_file="${5:?Pass output file arg[5]}"

logger.info "Install ImageContentSourcePolicy"
cat > "$output_file" <<EOF
Expand Down Expand Up @@ -170,18 +165,23 @@ EOF
target_img=${img%-rhel*}
fi

add_repository_digest_mirrors "$output_file" "${registry_source}/${img}" "${registry_target}/${target_img}"
echo "Processing line: ${line}, image ${img} -> target image: ${target_img}"

local mirror1="${registry_target}/${target_img}"
local mirror2="${registry_target_previous}/${target_img}"

add_repository_digest_mirrors "$output_file" "${registry_source}/${img}" "${mirror1}" "${mirror2}"
fi
done <<< "$mirrors"
}

function add_repository_digest_mirrors {
echo "Add mirror image to '${1}' - $2 = $3"
echo "Add mirror image to '${1}' - $2 = $3, $4"
cat << EOF | yq write --inplace --script - "$1"
- command: update
path: spec.repositoryDigestMirrors[+]
value:
mirrors: [ "${3}" ]
mirrors: [ "${3}", "${4}" ]
source: "${2}"
EOF
}
Expand Down
75 changes: 55 additions & 20 deletions hack/lib/images.bash
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,21 @@ ci_registry="${ci_registry_host}/openshift"

export CURRENT_VERSION_IMAGES=${CURRENT_VERSION_IMAGES:-"main"}
CURRENT_VERSION="$(metadata.get project.version)"
PREVIOUS_VERSION="$(metadata.get olm.replaces)"

quay_registry_app_version=${CURRENT_VERSION/./} # 1.34.0 -> 134.0
quay_registry_app_version=${quay_registry_app_version%.*} # 134.0 -> 134
registry_prefix_quay="quay.io/redhat-user-workloads/ocp-serverless-tenant/serverless-operator-"
registry_quay="${registry_prefix_quay}${quay_registry_app_version}"
registry_redhat_io="registry.redhat.io/openshift-serverless-1"

quay_registry_app_version=${CURRENT_VERSION/./} # 1.36.0 -> 136.0
quay_registry_app_version=${quay_registry_app_version%.*} # 136.0 -> 136

quay_registry_app_version_previous=${PREVIOUS_VERSION/./} # 1.35.0 -> 135.0
quay_registry_app_version_previous=${quay_registry_app_version_previous%.*} # 135.0 -> 135

export registry_quay="${registry_prefix_quay}${quay_registry_app_version}"
export registry_quay_previous="${registry_prefix_quay}${quay_registry_app_version_previous}"
export registry_redhat_io="registry.redhat.io/openshift-serverless-1"

export FORCE_USE_QUAY_IMAGES=${FORCE_USE_QUAY_IMAGES:-"false"}

# Add extra flags to skopeo cmd, in case of MacOS add OS/arch overrides
export SKOPEO_EXTRA_FLAGS="${SKOPE_EXTRA_FLAGS:-}"
Expand All @@ -29,15 +38,27 @@ function default_serverless_operator_images() {
local ocp_version
local serverless_registry="${registry_quay}/serverless"

export SERVERLESS_KNATIVE_OPERATOR=${SERVERLESS_KNATIVE_OPERATOR:-$(latest_registry_redhat_io_image_sha "${serverless_registry}-kn-operator:${CURRENT_VERSION_IMAGES}")}
export SERVERLESS_OPENSHIFT_KNATIVE_OPERATOR=${SERVERLESS_OPENSHIFT_KNATIVE_OPERATOR:-$(latest_registry_redhat_io_image_sha "${serverless_registry}-openshift-kn-operator:${CURRENT_VERSION_IMAGES}")}
export SERVERLESS_INGRESS=${SERVERLESS_INGRESS:-$(latest_registry_redhat_io_image_sha "${serverless_registry}-ingress:${CURRENT_VERSION_IMAGES}")}
export SERVERLESS_MUST_GATHER=${SERVERLESS_MUST_GATHER:-$(latest_registry_redhat_io_image_sha "${serverless_registry}-must-gather:${CURRENT_VERSION_IMAGES}")}
# When we bump the metadata for a major version, images are not yet available for SO components on
# the Konflux registry, so we use the `:latest` tag temporarily by passing "true" as argument to
# various `latest_*` functions.
#
# Eventually, once images are available, SHAs will be replaced/used.

export SERVERLESS_KNATIVE_OPERATOR=${SERVERLESS_KNATIVE_OPERATOR:-$(latest_registry_redhat_io_image_sha "${serverless_registry}-kn-operator:${CURRENT_VERSION_IMAGES}" "true")}
export SERVERLESS_OPENSHIFT_KNATIVE_OPERATOR=${SERVERLESS_OPENSHIFT_KNATIVE_OPERATOR:-$(latest_registry_redhat_io_image_sha "${serverless_registry}-openshift-kn-operator:${CURRENT_VERSION_IMAGES}" "true")}
export SERVERLESS_INGRESS=${SERVERLESS_INGRESS:-$(latest_registry_redhat_io_image_sha "${serverless_registry}-ingress:${CURRENT_VERSION_IMAGES}" "true")}
export SERVERLESS_MUST_GATHER=${SERVERLESS_MUST_GATHER:-$(latest_registry_redhat_io_image_sha "${serverless_registry}-must-gather:${CURRENT_VERSION_IMAGES}" "true")}

# Differentiate between the bundle living on the Konflux quay registry (which is the actually
# pullable URL) and the "final" bundle image URL eventually getting on registry.redhat.io.
#
# The actually pullable URL is used to generate the index images for FBC components and it
# has to be (eventually) pullable.

export SERVERLESS_BUNDLE=${SERVERLESS_BUNDLE:-$(get_bundle_for_version "${CURRENT_VERSION}")}
export DEFAULT_SERVERLESS_BUNDLE=${DEFAULT_SERVERLESS_BUNDLE:-$(get_bundle_for_version "${CURRENT_VERSION}")}

SERVERLESS_BUNDLE_REDHAT_IO=${SERVERLESS_BUNDLE_REDHAT_IO:-$(latest_registry_redhat_io_image_sha "${serverless_registry}-bundle:${CURRENT_VERSION_IMAGES}")}
SERVERLESS_BUNDLE_REDHAT_IO=${SERVERLESS_BUNDLE_REDHAT_IO:-$(latest_registry_redhat_io_image_sha "${serverless_registry}-bundle:${CURRENT_VERSION_IMAGES}" "true")}
# Bundle image is in different locations in quay.io and registry.redhat.io
export SERVERLESS_BUNDLE_REDHAT_IO=${SERVERLESS_BUNDLE_REDHAT_IO//serverless-bundle/serverless-operator-bundle}

Expand All @@ -50,23 +71,25 @@ function default_serverless_operator_images() {
fi
ocp_version=${ocp_version/./} # 4.17 -> 417

export INDEX_IMAGE=${INDEX_IMAGE:-$(latest_konflux_image_sha "${registry_quay}-fbc-${ocp_version}/serverless-index-${quay_registry_app_version}-fbc-${ocp_version}:${CURRENT_VERSION_IMAGES}")}
export INDEX_IMAGE=${INDEX_IMAGE:-$(latest_konflux_image_sha "${registry_quay}-fbc-${ocp_version}/serverless-index-${quay_registry_app_version}-fbc-${ocp_version}:${CURRENT_VERSION_IMAGES}" "latest" "true")}
}

# Bundle image is specific as we need to pull older versions for including in the catalog.
function get_bundle_for_version() {
local version app_version bundle
local version app_version
version=${1:?"Provide version for Bundle image"}

app_version=${version/./} # 1.34.0 -> 134.0
app_version=${app_version%.*} # 134.0 -> 134

bundle="${registry_prefix_quay}${app_version}/serverless-bundle"

image=$(image_with_sha "${bundle}:latest")
# As a backup, try also CI registry. This it temporary until the previous version gets to Konflux.
image=$(image_with_sha "${registry_prefix_quay}${app_version}/serverless-bundle:latest")
# As a backup, try also CI registry.
local ci_bundle="registry.ci.openshift.org/knative/serverless-bundle"
if [[ "${image}" == "" ]]; then
image=$(image_with_sha "${ci_bundle}:release-${version}" || echo "")
fi
if [[ "${image}" == "" ]]; then
image=$(image_with_sha "registry.ci.openshift.org/knative/serverless-bundle:release-${version}")
image=$(image_with_sha "${ci_bundle}:knative-main")
fi

if [[ "${image}" == "" ]]; then
Expand Down Expand Up @@ -293,28 +316,35 @@ function default_knative_backstage_plugins_images() {

function latest_registry_redhat_io_image_sha() {
input=${1:?"Provide image"}
return_input_on_empty=${2:-"false"}

image_without_tag=${input%:*} # Remove tag, if any
image_without_tag=${image_without_tag%@*} # Remove sha, if any

image=$(image_with_sha "${image_without_tag}:latest")
image=$(image_with_sha "${image_without_tag}:latest" "${return_input_on_empty}")

if [ "${image}" = "" ]; then
exit 1
fi

if [ "${FORCE_USE_QUAY_IMAGES}" = "true" ]; then
echo "${image}"
return
fi

rh_registry_image="$(get_rh_registry_image_ref "$image")"
echo "$rh_registry_image"
}

function latest_konflux_image_sha() {
input=${1:?"Provide image"}
tag=${2:-"latest"}
return_input_on_empty=${3:-"false"}

image_without_tag=${input%:*} # Remove tag, if any
image_without_tag=${image_without_tag%@*} # Remove sha, if any

image=$(image_with_sha "${image_without_tag}:${tag}")
image=$(image_with_sha "${image_without_tag}:${tag}" "${return_input_on_empty}")

if [ "${image}" = "" ]; then
exit 1
Expand All @@ -325,11 +355,16 @@ function latest_konflux_image_sha() {

function image_with_sha {
image=${1:?"Provide image"}
return_input_on_empty=${2:-"false"}

# shellcheck disable=SC2086
digest=$(skopeo inspect --no-tags=true ${SKOPEO_EXTRA_FLAGS} "docker://${image}" | jq -r '.Digest')
digest=$(skopeo inspect --retry-times=10 --no-tags=true ${SKOPEO_EXTRA_FLAGS} "docker://${image}" | jq -r '.Digest' || echo "")
if [ "${digest}" = "" ]; then
if [ "${return_input_on_empty}" = "true" ]; then
echo "${image}"
fi
echo ""
return
fi

image_without_tag=${image%:*} # Remove tag, if any
Expand Down Expand Up @@ -382,7 +417,7 @@ function get_rh_registry_image_ref() {
local quay_registry_image_ref
quay_registry_image_ref="${1}"

if [[ $quay_registry_image_ref =~ $registry_quay ]]; then
if [[ $quay_registry_image_ref =~ $registry_prefix_quay ]]; then
image=${quay_registry_image_ref##*/} # Get image name after last slash
image_sha=${image##*@} # Get SHA of image
image_name=${image%@*} # Remove sha
Expand Down
Loading

2 comments on commit 56665c6

@creydr
Copy link
Member

@creydr creydr commented on 56665c6 Jan 23, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/retest serverless-must-gather-136-on-push branch:main

@creydr
Copy link
Member

@creydr creydr commented on 56665c6 Jan 23, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/retest serverless-metadata-webhook-136-on-push branch:main

Please sign in to comment.