fix: escape shell parameter expansion in retag loop
This commit is contained in:
parent
2d142594ab
commit
2d7df564ce
8
Jenkinsfile
vendored
8
Jenkinsfile
vendored
@ -165,10 +165,10 @@ PY
|
||||
\"redis-photon:harbor-redis\" \\
|
||||
\"nginx-photon:harbor-nginx\" \\
|
||||
\"registry-photon:harbor-registry\"; do
|
||||
pair_src=\"${pair%%:*}\"
|
||||
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}\"
|
||||
pair_src=\"\\${pair%%:*}\"
|
||||
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
|
||||
podman tag \"$src\" \"$dst\" || true
|
||||
fi
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user