Moving blessing job to a X.Y-STAGING-latest model 55/2455/1
authorJulienBe <jb379x@att.com>
Tue, 28 Mar 2017 09:54:51 +0000 (02:54 -0700)
committerJulienBe <jb379x@att.com>
Tue, 28 Mar 2017 09:55:33 +0000 (02:55 -0700)
Change-Id: I4897501e6c392480d760b9eb564df04343127e27
Signed-off-by: JulienBe <jb379x@att.com>
jjb/global-templates-script.yaml
jjb/include-docker-blessing.sh

index 416717b..42cf98d 100644 (file)
 
     parameters:
       - string:
-          name: VERSION
-          description: "VERSION of the STAGING image to bless into this RELEASE VERSION
-            Example : 1.2.3"
+          name: X
+          description: "VERSION of the STAGING image to bless into this RELEASE VERSION
+            Example : 1"
       - string:
-          name: TIMESTAMP
-          description: "TIMESTAMP of the STAGING image to pull
-            Example : 20170308T1332"
+          name: Y
+          description: "y VERSION of the STAGING image to bless into this RELEASE VERSION
+            Example : 2"
+      - string:
+          name: Z
+          description: "z VERSION of the RELEASE VERSION
+            Example : 3"
       - string:
           name: PROJECT
           default: '{project}'
index 3cb67cf..a2b7c8f 100755 (executable)
@@ -1,14 +1,20 @@
 #!/bin/bash
 
-if [ -z "$VERSION" ];
+if [ -z "$X" ];
 then
-    echo "Error: no version provided"
+    echo "Error: no version provided"
     exit 1
 fi
 
-if [ -z "$TIMESTAMP" ];
+if [ -z "$Y" ];
 then
-    echo "Error: no timestamp provided"
+    echo "Error: no Y version provided"
+    exit 1
+fi
+
+if [ -z "$Z" ];
+then
+    echo "Error: no Z version provided"
     exit 1
 fi
 
@@ -20,8 +26,8 @@ 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"
+STAGING_IMAGE="openecomp/$PROJECT:$X.$Y-STAGING-latest"
+RELEASE_IMAGE="openecomp/$PROJECT:$X.$Y.$Z"
 
 docker pull "$SNAPSHOT_REPOSITORY/$STAGING_IMAGE"
 docker tag "$SNAPSHOT_REPOSITORY/$STAGING_IMAGE" "$RELEASE_REPOSITORY/$RELEASE_IMAGE"