我正在专门研究下面的示例,但是我想这个问题要笼统一些。
https://github.com/jenkinsci/poll-mailbox-trigger-plugin状态 将以下构建参数注入到作业中
pipeline {
agent any
stages {
stage('Test') {
steps {
echo env.pmt_content
echo ${pmt_content}
}
}
}
}
上面的方法似乎不适用于我:
如何在管道作业中检索注入的构建参数?
如管道插件教程中所述,您可以使用params
来访问作业的构建参数。
print params.pmt_content
print "Content is ${params.pmt_content}"