Skip to content

Commit acc0e2d

Browse files
committed
docs: update the retagall shell function
local - only works for early versions of Bash Signed-off-by: Maël Valais <[email protected]>
1 parent 57f2d81 commit acc0e2d

File tree

1 file changed

+16
-19
lines changed

1 file changed

+16
-19
lines changed

docs/TESTING-DEPLOYER.md

Lines changed: 16 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -215,18 +215,15 @@ retag() { # Usage: retag FROM_IMAGE_WITH_TAG TO_IMAGE_WITH_TAG
215215
local FROM=$1 TO=$2
216216
docker pull $FROM && docker tag $FROM $TO && docker push $TO
217217
}
218-
retagall() {
219-
# Usage: retagall FROM_REGISTRY FROM_TAG TO_REGISTRY TO_TAG
220-
# Does not retag the deployer, you have to use "retag" directly for the
221-
# deployer.
218+
retagall() { # Usage: retagall FROM_REGISTRY FROM_TAG TO_REGISTRY TO_TAG
222219
local FROM=$1 TO=$2 FROM_TAG=$3 TO_TAG=$4
223-
retag $FROM:$FROM_TAG $TO:$TO_TAG
224-
retag $FROM/cert-manager-acmesolver:$FROM_TAG $TO/cert-manager-acmesolver:$TO_TAG
225-
retag $FROM/cert-manager-cainjector:$FROM_TAG $TO/cert-manager-cainjector:$TO_TAG
226-
retag $FROM/cert-manager-webhook:$FROM_TAG $TO/cert-manager-webhook:$TO_TAG
227-
retag $FROM/cert-manager-google-cas-issuer:$FROM_TAG $TO/cert-manager-google-cas-issuer:$TO_TAG
228-
retag $FROM/preflight:$FROM_TAG $TO/preflight:$TO_TAG
229-
retag gcr.io/cloud-marketplace-tools/metering/ubbagent:latest $TO/ubbagent:$TO_TAG
220+
retag $FROM:$FROM_TAG $TO:$TO_TAG || exit 1
221+
retag $FROM/cert-manager-acmesolver:$FROM_TAG $TO/cert-manager-acmesolver:$TO_TAG || exit 1
222+
retag $FROM/cert-manager-cainjector:$FROM_TAG $TO/cert-manager-cainjector:$TO_TAG || exit 1
223+
retag $FROM/cert-manager-webhook:$FROM_TAG $TO/cert-manager-webhook:$TO_TAG || exit 1
224+
retag $FROM/cert-manager-google-cas-issuer:$FROM_TAG $TO/cert-manager-google-cas-issuer:$TO_TAG || exit 1
225+
retag $FROM/preflight:$FROM_TAG $TO/preflight:$TO_TAG || exit 1
226+
retag gcr.io/cloud-marketplace-tools/metering/ubbagent:latest $TO/ubbagent:$TO_TAG || exit 1
230227
}
231228
APP_VERSION=1.1.0-gcm.2
232229
retagall gcr.io/jetstack-public/jetstack-secure-for-cert-manager{,} google-review $APP_VERSION
@@ -251,14 +248,14 @@ retag() { # Usage: retag FROM_IMAGE_WITH_TAG TO_IMAGE_WITH_TAG
251248
docker pull $FROM && docker tag $FROM $TO && docker push $TO
252249
}
253250
retagall() { # Usage: retagall FROM_REGISTRY FROM_TAG TO_REGISTRY TO_TAG
254-
local FROM=$1 TO=$2 FROM_TAG=$3 TO_TAG=$4; local -; set -eu
255-
retag $FROM:$FROM_TAG $TO:$TO_TAG
256-
retag $FROM/cert-manager-acmesolver:$FROM_TAG $TO/cert-manager-acmesolver:$TO_TAG
257-
retag $FROM/cert-manager-cainjector:$FROM_TAG $TO/cert-manager-cainjector:$TO_TAG
258-
retag $FROM/cert-manager-webhook:$FROM_TAG $TO/cert-manager-webhook:$TO_TAG
259-
retag $FROM/cert-manager-google-cas-issuer:$FROM_TAG $TO/cert-manager-google-cas-issuer:$TO_TAG
260-
retag $FROM/preflight:$FROM_TAG $TO/preflight:$TO_TAG
261-
retag gcr.io/cloud-marketplace-tools/metering/ubbagent:latest $TO/ubbagent:$TO_TAG
251+
local FROM=$1 TO=$2 FROM_TAG=$3 TO_TAG=$4
252+
retag $FROM:$FROM_TAG $TO:$TO_TAG || exit 1
253+
retag $FROM/cert-manager-acmesolver:$FROM_TAG $TO/cert-manager-acmesolver:$TO_TAG || exit 1
254+
retag $FROM/cert-manager-cainjector:$FROM_TAG $TO/cert-manager-cainjector:$TO_TAG || exit 1
255+
retag $FROM/cert-manager-webhook:$FROM_TAG $TO/cert-manager-webhook:$TO_TAG || exit 1
256+
retag $FROM/cert-manager-google-cas-issuer:$FROM_TAG $TO/cert-manager-google-cas-issuer:$TO_TAG || exit 1
257+
retag $FROM/preflight:$FROM_TAG $TO/preflight:$TO_TAG || exit 1
258+
retag gcr.io/cloud-marketplace-tools/metering/ubbagent:latest $TO/ubbagent:$TO_TAG || exit 1
262259
}
263260
264261
PROJECT=$(gcloud config get-value project | tr ':' '/')

0 commit comments

Comments
 (0)