post_push multi tags test
This commit is contained in:
13
3.1-apache/hooks/post_push
Executable file
13
3.1-apache/hooks/post_push
Executable file
@@ -0,0 +1,13 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
|
# Parse image name for repo name
|
||||||
|
tagStart=$(expr index "$IMAGE_NAME" :)
|
||||||
|
repoName=${IMAGE_NAME:0:tagStart-1}
|
||||||
|
|
||||||
|
# Tag and push image for each additional tag
|
||||||
|
for tag in {3,3.1,3-apache,3.1-apache,apache,latest}; do
|
||||||
|
docker tag $IMAGE_NAME ${repoName}:${tag}
|
||||||
|
docker push ${repoName}:${tag}
|
||||||
|
done
|
||||||
Reference in New Issue
Block a user