summaryrefslogtreecommitdiffstats
path: root/jjb/include-docker-blessing.sh
diff options
context:
space:
mode:
authorJulienBe <jb379x@att.com>2017-03-08 13:07:21 -0800
committerJulienBe <jb379x@att.com>2017-03-09 07:44:11 -0800
commita247e9f6f260b463f50fb5af072be9e25c7aec3f (patch)
tree96c677e5e61df93bf38ae1e377e19e551344fe42 /jjb/include-docker-blessing.sh
parent8273b049ede47533600ebbad58a933080d8e962a (diff)
new job to release docker images
pull docker image from release, tag it, push it to release Change-Id: I2418b5ae085fe09ed00f7ebaa6ceed4664c236ed Signed-off-by: JulienBe <jb379x@att.com>
Diffstat (limited to 'jjb/include-docker-blessing.sh')
-rwxr-xr-xjjb/include-docker-blessing.sh28
1 files changed, 28 insertions, 0 deletions
diff --git a/jjb/include-docker-blessing.sh b/jjb/include-docker-blessing.sh
new file mode 100755
index 000000000..3cb67cf95
--- /dev/null
+++ b/jjb/include-docker-blessing.sh
@@ -0,0 +1,28 @@
+#!/bin/bash
+
+if [ -z "$VERSION" ];
+then
+ echo "Error: no version provided"
+ exit 1
+fi
+
+if [ -z "$TIMESTAMP" ];
+then
+ echo "Error: no timestamp provided"
+ exit 1
+fi
+
+if [ -z "$PROJECT" ];
+then
+ echo "Error: no project provided"
+ exit 1
+fi
+
+RELEASE_REPOSITORY="nexus3.openecomp.org:10002"
+SNAPSHOT_REPOSITORY="nexus3.openecomp.org:10003"
+STAGING_IMAGE="openecomp/$PROJECT:$VERSION-STAGING-$TIMESTAMP"
+RELEASE_IMAGE="openecomp/$PROJECT:$VERSION"
+
+docker pull "$SNAPSHOT_REPOSITORY/$STAGING_IMAGE"
+docker tag "$SNAPSHOT_REPOSITORY/$STAGING_IMAGE" "$RELEASE_REPOSITORY/$RELEASE_IMAGE"
+docker push "$RELEASE_REPOSITORY/$RELEASE_IMAGE" \ No newline at end of file