X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=blobdiff_plain;f=jjb%2Fglobal%2Freleng-macros.yml;h=b7335fafad8216e9210164e83f79ffde710372bf;hb=d29c3e495aee81b96f653b6a4b5ee72a9bf33976;hp=a12a3c8a58fada67398f0fdaa2164070a4d81848;hpb=11e4d1f751f7e708104528562260a6f3d3d6c9fd;p=releng.git diff --git a/jjb/global/releng-macros.yml b/jjb/global/releng-macros.yml index a12a3c8a5..b7335fafa 100644 --- a/jjb/global/releng-macros.yml +++ b/jjb/global/releng-macros.yml @@ -40,6 +40,54 @@ default: 'refs/heads/{branch}' description: "Default refspec needed for manually triggering." +## +# Reporting Deployment Results +# +# To report deployment results to +# http://testresults.opnfv.org/test/#/deployresults, add the following +# parameters, builders, and publishers to a deployment job: +# +# parameters: +# - testapi-parameter +# +# builders: +# - track-begin-timestamp +# +# publishers: +# - report-provision-result +# +# Note: The following string parameter must also exist, as they are used +# when reporting the provision result: +# +# * INSTALLER +# * INSTALLER_VERSION +# * DEPLOY_SCENARIO +# +# most installers include these but you should verify first before +# adding the publisher, otherwise the deployment build may be marked +# unstable. +# +## +- 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: 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: @@ -58,6 +106,12 @@ branches: - 'origin/$BRANCH' timeout: 15 + per-build-tag: false + shallow-clone: false + use-author: false + ignore-notify: false + wipe-workspace: true + prune: false - scm: name: git-scm-gerrit @@ -318,7 +372,9 @@ - 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" @@ -635,22 +691,6 @@ recipients: > JBuchanan@advaoptical.com -- publisher: - name: 'email-escalator-ptl' - publishers: - - email-ext: - <<: *email_ptl_defaults - recipients: > - kong.wei2@zte.com.cn - -- publisher: - name: 'email-fastpathmetrics-ptl' - publishers: - - email-ext: - <<: *email_ptl_defaults - recipients: > - maryam.tahhan@intel.com - - publisher: name: 'email-fds-ptl' publishers: @@ -715,14 +755,6 @@ recipients: > ruan.he@orange.com -- publisher: - name: 'email-multisite-ptl' - publishers: - - email-ext: - <<: *email_ptl_defaults - recipients: > - joehuang@huawei.com - - publisher: name: 'email-netready-ptl' publishers: @@ -739,14 +771,6 @@ recipients: > ahothan@cisco.com -- publisher: - name: 'email-octopus-ptl' - publishers: - - email-ext: - <<: *email_ptl_defaults - recipients: > - ulrich.kleber@huawei.com - - publisher: name: 'email-onosfw-ptl' publishers: @@ -755,14 +779,6 @@ recipients: > su.wei@huawei.com -- publisher: - name: 'email-openretriever-ptl' - publishers: - - email-ext: - <<: *email_ptl_defaults - recipients: > - jiaxuan@chinamobile.com - - publisher: name: 'email-opera-ptl' publishers: @@ -901,7 +917,7 @@ - email-ext: <<: *email_ptl_defaults recipients: > - ManuelBuilmbuil@suse.com + mbuil@suse.com - publisher: name: 'email-snaps-ptl' @@ -958,15 +974,18 @@ 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