fix: avoid subshell in retag loop

This commit is contained in:
bstein 2025-12-18 01:42:41 -03:00
parent e05d17d26f
commit 2d142594ab

6
Jenkinsfile vendored
View File

@ -165,8 +165,10 @@ PY
\"redis-photon:harbor-redis\" \\ \"redis-photon:harbor-redis\" \\
\"nginx-photon:harbor-nginx\" \\ \"nginx-photon:harbor-nginx\" \\
\"registry-photon:harbor-registry\"; do \"registry-photon:harbor-registry\"; do
src=\"${IMAGE_NAMESPACE}/\\$(echo \"$pair\" | cut -d: -f1):${env.HARBOR_VERSION_RESOLVED}${TAG_SUFFIX}.${BUILD_NUMBER}\" pair_src=\"${pair%%:*}\"
dst=\"${IMAGE_NAMESPACE}/\\$(echo \"$pair\" | cut -d: -f2):${env.HARBOR_VERSION_RESOLVED}${TAG_SUFFIX}.${BUILD_NUMBER}\" pair_dst=\"${pair##*:}\"
src=\"${IMAGE_NAMESPACE}/${pair_src}:${env.HARBOR_VERSION_RESOLVED}${TAG_SUFFIX}.${BUILD_NUMBER}\"
dst=\"${IMAGE_NAMESPACE}/${pair_dst}:${env.HARBOR_VERSION_RESOLVED}${TAG_SUFFIX}.${BUILD_NUMBER}\"
if podman image exists \"$src\"; then if podman image exists \"$src\"; then
podman tag \"$src\" \"$dst\" || true podman tag \"$src\" \"$dst\" || true
fi fi