fix: avoid subshell in retag loop
This commit is contained in:
parent
e05d17d26f
commit
2d142594ab
6
Jenkinsfile
vendored
6
Jenkinsfile
vendored
@ -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
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user