Enable brahmaputra branch for doc verify and merge jobs 63/5463/2
authorFatih Degirmenci <fatih.degirmenci@ericsson.com>
Mon, 4 Jan 2016 10:23:18 +0000 (11:23 +0100)
committerFatih Degirmenci <fatih.degirmenci@ericsson.com>
Mon, 4 Jan 2016 14:31:12 +0000 (14:31 +0000)
This change also adjusts GS_BASE parameter in releng-macros.yml
and uses GS_BASE in docs-merge job. ONOS builders are also adjusted.

Change-Id: Ic9f28a3a7e283cba6736e96f8f7e18c859099e6c
Signed-off-by: Fatih Degirmenci <fatih.degirmenci@ericsson.com>
jjb/onosfw/onosfw.yml
jjb/opnfv/opnfv-docs.yml
jjb/releng-macros.yaml

index df1fdb7..7dc0241 100644 (file)
         - project-parameter:
             project: '{project}'
         - 'opnfv-build-defaults'
+        - string:
+            name: GS_URL
+            default: '$GS_BASE{gs-pathname}'
+            description: "Directory where the build artifact will be located upon the completion     of the build."
 
     scm:
         - git-scm:
     builders:
         - 'builder-onosfw-helloworld'
 
-
-
 ########################
 # builder macros
 ########################
                 echo "OPNFV_ARTIFACT_VERSION=$OPNFV_ARTIFACT_VERSION"
                 echo "OPNFV_GIT_URL=$(git config --get remote.origin.url)"
                 echo "OPNFV_GIT_SHA1=$(git rev-parse HEAD)"
-                echo "OPNFV_ARTIFACT_URL=$GS_BASE/opnfv-$OPNFV_ARTIFACT_VERSION.iso"
+                echo "OPNFV_ARTIFACT_URL=$GS_URL/opnfv-$OPNFV_ARTIFACT_VERSION.iso"
                 echo "OPNFV_ARTIFACT_MD5SUM=$(md5sum $BUILD_DIRECTORY/onosfw.iso | cut -d' ' -f1)"
                 echo "OPNFV_BUILD_URL=$BUILD_URL"
             ) > $BUILD_DIRECTORY/opnfv.properties
             source $BUILD_DIRECTORY/opnfv.properties
 
             # upload artifact and additional files to google storage
-            gsutil cp $BUILD_DIRECTORY/onosfw.iso gs://$GS_BASE/opnfv-$OPNFV_ARTIFACT_VERSION.iso > gsutil.iso.log 2>&1
-            gsutil cp $BUILD_DIRECTORY/opnfv.properties gs://$GS_BASE/opnfv-$OPNFV_ARTIFACT_VERSION.properties > gsutil.properties.log 2>&1
-            gsutil cp $BUILD_DIRECTORY/opnfv.properties gs://$GS_BASE/latest.properties > gsutil.latest.log 2>&1
+            gsutil cp $BUILD_DIRECTORY/onosfw.iso gs://$GS_URL/opnfv-$OPNFV_ARTIFACT_VERSION.iso > gsutil.iso.log 2>&1
+            gsutil cp $BUILD_DIRECTORY/opnfv.properties gs://$GS_URL/opnfv-$OPNFV_ARTIFACT_VERSION.properties > gsutil.properties.log 2>&1
+            gsutil cp $BUILD_DIRECTORY/opnfv.properties gs://$GS_URL/latest.properties > gsutil.latest.log 2>&1
 
             echo
             echo "--------------------------------------------------------"
             echo "Done!"
-            echo "Artifact is available as http://$GS_BASE/opnfv-$OPNFV_ARTIFACT_VERSION.iso"
+            echo "Artifact is available as http://$GS_URL/opnfv-$OPNFV_ARTIFACT_VERSION.iso"
 
 
 - builder:
index 3574b39..6edd0b0 100644 (file)
         - 'opnfv-docs-verify-{stream}'
         - 'opnfv-docs-merge-{stream}'
 
-    # stream:    branch with - in place of / (eg. stable-arno)
-    # branch:    branch (eg. stable/arno)
     stream:
         - master:
-            branch: 'master'
+            branch: '{stream}'
+            gs-pathname: ''
+        - brahmaputra:
+            branch: 'stable/{stream}'
+            gs-pathname: '/{stream}'
 
 ########################
 # job templates
             project: $GERRIT_PROJECT
         - gerrit-parameter:
             branch: 'master'
+        - string:
+            name: GS_URL
+            default: '$GS_BASE{gs-pathname}'
+            description: "Directory where the build artifact will be located upon the completion     of the build."
 
     scm:
         - gerrit-trigger-scm:
index b94fd8f..787b7ba 100644 (file)
@@ -9,11 +9,11 @@
             description: "JJB configured PROJECT parameter to identify an opnfv Gerrit project"
         - string:
             name: GS_BASE
-            default: artifacts.opnfv.org/$PROJECT/
+            default: artifacts.opnfv.org/$PROJECT
             description: "URL to Google Storage."
         - string:
             name: GS_BASE_PROXY
-            default: build.opnfv.org/artifacts/$PROJECT/
+            default: build.opnfv.org/artifacts/$PROJECT
             description: "URL to Google Storage proxy"
 
 - parameter:
             echo "#####################"
             echo
 
-            if [[ "$GERRIT_BRANCH" == "master" ]] ; then
-                gs_base="artifacts.opnfv.org/$GERRIT_PROJECT"
-            else
-                gs_base="artifacts.opnfv.org/$GERRIT_PROJECT/$GERRIT_BRANCH"
-            fi
-            gs_path="$gs_base/docs"
+            gs_path="$GS_URL/docs"
             local_path="upload/docs"
 
             mkdir -p upload
             mv output "$local_path"
-            gsutil -m cp -r "$local_path" "gs://$gs_base"
+            gsutil -m cp -r "$local_path" "gs://$GS_URL"
 
             if gsutil ls "gs://$gs_path" | grep -e 'html$' > /dev/null 2>&1 ; then
                 gsutil -m setmeta \