X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=blobdiff_plain;f=jjb%2Fglobal%2Freleng-macros.yml;h=205802fab19c2d28fc3a4c0137b693e4694781bf;hb=bb2508b0f971de18385fc65b82c5ae0e32c83915;hp=1c74732d555a02aee3de76628972838e14d384c1;hpb=92e57bfbd6e426c733e4687868b7637327c34958;p=releng.git diff --git a/jjb/global/releng-macros.yml b/jjb/global/releng-macros.yml index 1c74732d5..205802fab 100644 --- a/jjb/global/releng-macros.yml +++ b/jjb/global/releng-macros.yml @@ -40,6 +40,30 @@ 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: @@ -307,6 +331,7 @@ name: lint-init builders: - shell: | + #!/bin/bash # Ensure we start with a clean environment rm -f bash-violation.log python-violation.log yaml-violation.log violation.log git --no-pager diff --diff-filter=MCRAT --name-only HEAD^1 > modified_files @@ -315,10 +340,13 @@ name: lint-report builders: - 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 + sed -i -e "1s#^#${msg}\n\n#" violation.log cmd="gerrit review -p $GERRIT_PROJECT -m \"$(cat violation.log)\" $GERRIT_PATCHSET_REVISION --notify NONE" ssh -p 29418 gerrit.opnfv.org "$cmd" @@ -330,6 +358,7 @@ name: lint-bash-code builders: - shell: | + #!/bin/bash echo "Checking bash code..." for f in $(egrep '\.sh$' modified_files) do @@ -344,7 +373,8 @@ name: lint-python-code builders: - shell: | - # Install python packages + #!/bin/bash + # Install python package sudo pip install "flake8==2.6.2" echo "Checking python code..." @@ -361,6 +391,7 @@ name: lint-yaml-code builders: - shell: | + #!/bin/bash # sudo Install python packages sudo pip install "yamllint==1.8.2" @@ -612,7 +643,7 @@ - email-ext: <<: *email_ptl_defaults recipients: > - hongbo.tianhongbo@huawei.com + georg.kunz@ericsson.com - publisher: name: 'email-dpacc-ptl' @@ -820,7 +851,7 @@ - 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 @@ -896,7 +927,7 @@ - email-ext: <<: *email_ptl_defaults recipients: > - ManuelBuilmbuil@suse.com + mbuil@suse.com - publisher: name: 'email-snaps-ptl' @@ -953,15 +984,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