X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=blobdiff_plain;ds=sidebyside;f=jjb%2Fglobal%2Freleng-macros.yml;h=d70e7e0a5ca59af26e406dc22151d86691984a0a;hb=f445cb5b0d6d31402bb9b986ec20ea888a3a6fc6;hp=3433cee5fb1292b5b4705cc15114d5b1497589e2;hpb=9146b1745bebcea1ae7c0ce76dc1cdf4f3f25bb2;p=releng.git diff --git a/jjb/global/releng-macros.yml b/jjb/global/releng-macros.yml index 3433cee5f..d70e7e0a5 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: @@ -960,16 +1008,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