summaryrefslogtreecommitdiffstats
path: root/jjb/include-docker-blessing.sh
diff options
context:
space:
mode:
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