bugfix on compass building jobs 09/2409/2
authorm00133142 <meimei@huawei.com>
Sat, 10 Oct 2015 04:23:54 +0000 (12:23 +0800)
committerm00133142 <meimei@huawei.com>
Mon, 12 Oct 2015 04:08:07 +0000 (12:08 +0800)
- change daily job's timer
- use publisher to trigger the daily jobs
- some path bugfix

JIRA: COMPASS-87

Change-Id: Ib1eb0a43263178a35f1749c757754e798001af8d
Signed-off-by: m00133142 <meimei@huawei.com>
jjb/compass4nfv/compass4nfv.yml

index 226b335..5d0a5cb 100644 (file)
                 branches:
                     - branch-compare-type: 'ANT'
                       branch-pattern: '**/master'
+
     builders:
         - 'builder-compass-merge'
 
             branch: '{branch}'
 
     triggers:
-        - pollscm: '@midnight'
+        - timed: '@midnight'
 
     logrotate:
         daysToKeep: 30
         artifactNumToKeep: -1
 
     builders:
-        #- 'builder-compass-build-iso'
-        #- 'builder-compass-upload-artifact'
-        #- 'builder-compass-workspace-cleanup'
-        - shell: |
-            echo "Hello world!"
-            echo "compass-deploy-virtual job will be triggered!"
-
-    publishers:
-        - trigger:
-            project: 'compass-build-iso'
-            threshold: SUCCESS
-        - trigger:
-            project: 'compass-deploy-virtual-cluster'
-            threshold: SUCCESS
+        - trigger-builds:
+          - project: 'compass-build'
+            git-revision: true
+            block: true
+        - trigger-builds:
+          - project: 'compass-deploy-virtual-cluster'
+            git-revision: true
+            block: true
 
 - job-template:
     name: 'compass-build-iso'
             default: '{conf}'
             description: ""
 
-    triggers:
-        - pollscm: "H/2 * * * *"
 
     logrotate:
         daysToKeep: 30
         artifactDaysToKeep: -1
         artifactNumToKeep: -1
 
+
     builders:
         - 'builder-compass-ci-preclean-workspace'
         - 'builder-compass-download-artifact'
             name: GS_URL_PROXY
             default: build.opnfv.org/artifacts/$PROJECT/
             description: "URL to Google Storage proxy"
-        - string:
-            name: INTERNAL_REPO_XA
-            default: "root@192.168.127.11:~/xh/work/build/work"
-            description: "Artifact Repository"
-
         - string:
             name: installer_ip
             default: "10.1.0.12"
             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
+            [[ -d $BUILD_DIRECTORY ]] || mkdir -p $BUILD_DIRECTORY
+            curl -s -o $BUILD_DIRECTORY/latest.properties http://$GS_URL/latest.properties
 
             # check if we got the file
-            [[ -f latest.properties ]] || exit 1
+            [[ -f $BUILD_DIRECTORY/latest.properties ]] || exit 1
 
             # source the file so we get OPNFV vars
-            source latest.properties
+            source $BUILD_DIRECTORY/latest.properties
 
             # download the file
-            curl -s -o $WORKSPACE/compass.iso http://$OPNFV_ARTIFACT_URL > gsutil.iso.log 2>&1
+            curl -s -o $BUILD_DIRECTORY/compass.iso http://$OPNFV_ARTIFACT_URL > gsutil.iso.log 2>&1
 
             # list the file
-            ls -al $WORKSPACE/compass.iso
+            ls -al $BUILD_DIRECTORY/compass.iso
 
             echo
             echo "--------------------------------------------------------"