我使用"Parameterized Trigger Plugin“触发子任务。我使用"parametres from properties file“,并在"Use properties from file”中需要将文件名作为变量传递……我得到了这个错误。
[parameterized-trigger] Properties file $propeties_file did not exist.发布于 2022-01-06 07:08:10
使用属性文件中的参数触发参数化构建的示例管道
pipeline {
agent any
stages {
stage('S1') {
steps {
echo 'In S1'
sh '''
echo "param1=value1" > my.properties
echo "param2=value2" >> my.properties
'''
}
}
stage('s2'){
steps {
script {
def props = readProperties file:"${WORKSPACE}/my.properties"
build job: 'called_job', parameters: props.collect {string(name: it.key, value: it.value)}
}
}
}
}
}https://stackoverflow.com/questions/54986153
复制相似问题