Reputation: 3823
I'm specifically working on the example below, but I'm guessing the question is a bit more general.
https://github.com/jenkinsci/poll-mailbox-trigger-plugin States the following build parameters, are injected into the job
pipeline {
agent any
stages {
stage('Test') {
steps {
echo env.pmt_content
echo ${pmt_content}
}
}
}
}
The above methods don't seem to work for me:
How is it possible to retrieve an injected build parameter in a pipeline job?
Upvotes: 0
Views: 90
Reputation: 646
As explained in the pipeline-plugin tutorial, you can use params
to access the job's build parameters.
print params.pmt_content
print "Content is ${params.pmt_content}"
Upvotes: 1