Create daily jobs for genesis/fuel for master and arno 10/810/5
authorFatih Degirmenci <fatih.degirmenci@ericsson.com>
Fri, 12 Jun 2015 08:32:42 +0000 (10:32 +0200)
committerFatih Degirmenci <fatih.degirmenci@ericsson.com>
Fri, 12 Jun 2015 09:46:19 +0000 (11:46 +0200)
JIRA: OCTO-89

Change-Id: Ibd1b6976f22e38af42e35473ff0e0d03c32658af
Signed-off-by: Fatih Degirmenci <fatih.degirmenci@ericsson.com>
jjb/genesis/genesis-fuel.yml

index 656f6ca..6dd16ab 100644 (file)
@@ -12,9 +12,9 @@
     jobs:
         - 'genesis-fuel-verify-{stream}'
         - 'genesis-fuel-merge'
-        - 'genesis-fuel-daily-master'
-        - 'genesis-fuel-build'
-        - 'genesis-fuel-deploy'
+        - 'genesis-fuel-daily-{stream}'
+        - 'genesis-fuel-build-{stream}'
+        - 'genesis-fuel-deploy-{stream}'
         - 'genesis-fuel-deploy-virtual'
 
     # stream:    branch with - in place of / (eg. stable-arno)
     stream:
         - master:
             branch: 'master'
+            gs-pathname: ''
         - stable-arno:
             branch: 'stable/arno'
+            gs-pathname: 'arno'
 
 ########################
 # job templates
@@ -56,6 +58,7 @@
             branch: '{branch}'
         - fuel-parameter:
             installer: '{installer}'
+            gs-pathname: '{gs-pathname}'
 
     scm:
         - gerrit-trigger-scm:
             branch: 'master'
         - fuel-parameter:
             installer: '{installer}'
+            gs-pathname: ''
 
     scm:
         - gerrit-trigger-scm:
         - 'fuel-workspace-cleanup'
 
 - job-template:
-    name: 'genesis-fuel-daily-master'
+    name: 'genesis-fuel-daily-{stream}'
 
     project-type: freestyle
 
             project: '{project}'
         - fuel-parameter:
             installer: '{installer}'
+            gs-pathname: '{gs-pathname}'
 
     scm:
         - git-scm:
 
     builders:
         - trigger-builds:
-          - project: 'genesis-fuel-build'
+          - project: 'genesis-fuel-build-{stream}'
             git-revision: true
             block: true
         - trigger-builds:
-          - project: 'genesis-fuel-deploy'
+          - project: 'genesis-fuel-deploy-{stream}'
             git-revision: true
             block: true
         - trigger-builds:
             block: true
 
 - job-template:
-    name: 'genesis-fuel-build'
+    name: 'genesis-fuel-build-{stream}'
 
     project-type: freestyle
 
             project: '{project}'
         - fuel-parameter:
             installer: '{installer}'
+            gs-pathname: '{gs-pathname}'
 
     scm:
         - git-scm:
         - 'fuel-workspace-cleanup'
 
 - job-template:
-    name: 'genesis-fuel-deploy'
+    name: 'genesis-fuel-deploy-{stream}'
 
     project-type: freestyle
 
             project: '{project}'
         - fuel-parameter:
             installer: '{installer}'
+            gs-pathname: '{gs-pathname}'
         - string:
             name: GIT_BASE
             default: ssh://gerrit.opnfv.org:29418/$PROJECT
             project: '{project}'
         - fuel-parameter:
             installer: '{installer}'
+            gs-pathname: ''
 
     scm:
         - git-scm:
             name: GIT_BASE
             default: https://gerrit.opnfv.org/gerrit/$PROJECT
             description: "Used for overriding the GIT URL coming from Global Jenkins configuration in case if the stuff is done on none-LF HW."
+        - string:
+            name: GS_PATHNAME
+            default: '{gs-pathname}'
+            description: "Subdirectory to store artifacts for different branches."
         - string:
             name: GS_URL
-            default: artifacts.opnfv.org/$PROJECT/$INSTALLER
+            default: artifacts.opnfv.org/$PROJECT/$INSTALLER/$GS_PATHNAME
             description: "URL to Google Storage."
 
 ########################
             set -o nounset
             set -o pipefail
 
-            # log info to console
-            echo "Downloading the $INSTALLER artifact. This could take some time..."
-            echo "--------------------------------------------------------"
-            echo
-
             # get the latest.properties file in order to get info regarding latest artifact
             curl -s -o $WORKSPACE/latest.properties http://$GS_URL/latest.properties
 
             # source the file so we get OPNFV vars
             source latest.properties
 
+            # log info to console
+            echo "Downloading the $INSTALLER artifact using URL http://$OPNFV_ARTIFACT_URL"
+            echo "This could take some time..."
+            echo "--------------------------------------------------------"
+            echo
+
             # download the file
             curl -s -o $WORKSPACE/opnfv.iso http://$OPNFV_ARTIFACT_URL > gsutil.iso.log 2>&1