Define parameters for triggering jobs
[releng.git] / jjb / global / releng-macros.yml
index a7d947f..205802f 100644 (file)
           default: 'refs/heads/{branch}'
           description: "Default refspec needed for manually triggering."
 
+- parameter:
+    name: testapi-parameter
+    parameters:
+      - string:
+          name: TESTAPI_URL
+          default: 'http://testresults.opnfv.org/test/api/v1'
+          description: "Default TestAPI URL, currently using v1"
+      - string:
+          name: DEPLOY_SCENARIO
+          default: 'os-nosdn-nofeature-ha'
+          description: "OPNFV deployment scenario"
+      - string:
+          name: INSTALLER_VERSION
+          default: 'master'
+          description: "Installer release version"
+      - string:
+          name: UPSTREAM_JOB_NAME
+          default: ''
+          description: "Parent job name in Jenkins"
+      - string:
+          name: UPSTREAM_BUILD_ID
+          default: ''
+          description: "Parent job build_id in Jenkins"
+
 - property:
     name: logrotate-default
     properties:
       - shell: |
           #!/bin/bash
           if [[ -s violation.log ]]; then
-              echo "Reporting lint result..."
+              cat violation.log
+              echo "Reporting lint result...."
+              set -x
               msg="Found syntax error and/or coding style violation(s) in the files modified by your patchset."
               sed -i -e "1s#^#${msg}\n\n#" violation.log
               cmd="gerrit review -p $GERRIT_PROJECT -m \"$(cat violation.log)\" $GERRIT_PATCHSET_REVISION --notify NONE"
       - email-ext:
           <<: *email_ptl_defaults
           recipients: >
-            hongbo.tianhongbo@huawei.com
+            georg.kunz@ericsson.com
 
 - publisher:
     name: 'email-dpacc-ptl'
       - email-ext:
           <<: *email_ptl_defaults
           recipients: >
-            jack.morgan@intel.com
+            zhang.jun3g@zte.com.cn
 - publisher:
     name: 'email-pharos-tools-ptl'
     <<: *email_pharos_ptl_defaults
       - email-ext:
           <<: *email_ptl_defaults
           recipients: >
-            ManuelBuilmbuil@suse.com
+            mbuil@suse.com
 
 - publisher:
     name: 'email-snaps-ptl'
           script-only-if-succeeded: true
           builders:
             - shell: |
-                echo "export PROVISION_RESULT=SUCCEED" >> $WORKSPACE/installer_track.sh
-                echo "export INSTALLER={installer}" >> $WORKSPACE/installer_track.sh
+                echo "export PROVISION_RESULT=PASS" >> $WORKSPACE/installer_track.sh
+                echo "export INSTALLER=$INSTALLER_TYPE" >> $WORKSPACE/installer_track.sh
+                echo "export TIMESTAMP_END="\'`date '+%Y-%m-%d %H:%M:%S.%3N'`\' >> $WORKSPACE/installer_track.sh
             - shell:
-                !include-raw-escape: installer-report.sh
+                !include-raw: installer-report.sh
       - postbuildscript:
+          script-only-if-succeeded: false
           script-only-if-failed: true
           builders:
             - shell: |
                 echo "export PROVISION_RESULT=FAIL" >> $WORKSPACE/installer_track.sh
-                echo "export INSTALLER={installer}" >> $WORKSPACE/installer_track.sh
+                echo "export INSTALLER=$INSTALLER_TYPE" >> $WORKSPACE/installer_track.sh
+                echo "export TIMESTAMP_END="\'`date '+%Y-%m-%d %H:%M:%S.%3N'`\' >> $WORKSPACE/installer_track.sh
             - shell:
-                !include-raw-escape: installer-report.sh
+                !include-raw: installer-report.sh