summaryrefslogtreecommitdiffstats
path: root/jjb/global
diff options
context:
space:
mode:
authorJulien <zhang.jun3g@zte.com.cn>2018-03-12 09:13:25 +0800
committerJulien <zhang.jun3g@zte.com.cn>2018-03-12 09:13:25 +0800
commitbb2508b0f971de18385fc65b82c5ae0e32c83915 (patch)
tree9cd9a23470bd3e4b4c808b38f0d4f572850c6f11 /jjb/global
parentab834c5f7fd4ed6ba578b6a36a8fd98ae4085823 (diff)
Define parameters for triggering jobs
In https://wiki.jenkins.io/display/JENKINS/Plugins+affected+by+fix+for+SECURITY-170, it indicates that: only build parameters that have been explicitly defined in a job's configuration will be available by default at build time. Any other arbitrary parameters added to a build by plugins will not be available by default. It has been tested in sandbox.opnfv.org that only defined parameters can be passed to the triggered jobs. For parameters required by TESTAPI are common to all the projectes, including installers, Functest, and Yardstick, it is convenient to define a common macro and used by others. Change-Id: Iac1da85445e1b5d75109ccd64b174f35151b9969 Signed-off-by: Julien <zhang.jun3g@zte.com.cn>
Diffstat (limited to 'jjb/global')
-rw-r--r--jjb/global/releng-macros.yml24
1 files changed, 22 insertions, 2 deletions
diff --git a/jjb/global/releng-macros.yml b/jjb/global/releng-macros.yml
index 8f032345e..205802fab 100644
--- a/jjb/global/releng-macros.yml
+++ b/jjb/global/releng-macros.yml
@@ -39,10 +39,30 @@
name: GERRIT_REFSPEC
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
@@ -966,7 +986,7 @@
- shell: |
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
+ echo "export TIMESTAMP_END="\'`date '+%Y-%m-%d %H:%M:%S.%3N'`\' >> $WORKSPACE/installer_track.sh
- shell:
!include-raw: installer-report.sh
- postbuildscript:
@@ -976,6 +996,6 @@
- shell: |
echo "export PROVISION_RESULT=FAIL" >> $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
+ echo "export TIMESTAMP_END="\'`date '+%Y-%m-%d %H:%M:%S.%3N'`\' >> $WORKSPACE/installer_track.sh
- shell:
!include-raw: installer-report.sh