我有一个带有参数声明的jenkinsfile:
properties([
buildDiscarder(logRotator(/*artifactDaysToKeepStr:'15',*/ artifactNumToKeepStr: '10', daysToKeepStr: '3', numToKeepStr: '5000')),
parameters(
[choice(choices: 'Site1\nSite2\nSite3\nSite4\nall', description: 'What site ?', name: 'site'),
choice(choices: 'dev\ntest\nuat\nprod', description: 'What environment ?', name: 'environment')]
),
pipelineTriggers([cron('* * * * *')])
])
在一个阶段执行:
sh "mvn gatling:execute --settings $MAVEN_SETTINGS -Dgatling.simulationClass=lu.post.${params.site}Simulation -Denv.site=${params.site} -Denv.current=${params.environment}"
我的问题是,当我在Jenkins中运行我的运行时,选择不在屏幕显示和控制台输入中我看到执行如下:
... Dgatling.simulationClass=lu.post.Site1Simulation -Denv.site=Site1 -Denv.current=dev
为什么选项不会在屏幕上显示,为什么第一个元素会动态返回?