Reputation:
I have a freestyle job in Jenkins
and would normally pass parameters to another freestyle job using the Predefined parameters option.
example:
PROJECT=Myproject
PATH=/depot/workspace/
Previously I could access the above values through the KEY in the downstream job through the environment by using ${PROJECT} OR ${PATH}
.
My problem now is that I have a pipeline job that needs to access the above values but when using ${PROJECT} OR ${PATH}
it does not work.
So, in general how I want it to work is have the freestyle job run first and pass the parameters to the downstream pipeline job.
Upvotes: 2
Views: 1909
Reputation: 4203
You might need to use "${params.PROJECT}"
in your pipeline to access the parameters.
Upvotes: 2