Issue
I have one step in Jenkins called xxx-Checkout to trigger the TFS checkout and get the code, then that job triggers a pipeline which builds another job called xxx-Build. The question is how can I pass the checkout's changes to the pipeline job because with one job to other without pipelines works but in the pipeline doesn't. I can't see the changes made in the checkout job.
This is how I trigger the build:
And here shows me that there are no changes even though there are:
Solution
You can use a custom workspace for both jobs or pass the "custom workspace" as a parameter to the pipeline job.
Upstream job - Freestyle project
1) Configure a custom workspace: Go to your job > advanced > tick "Use custom workspace":
2) Trigger the pipeline job using the Parametrized Trigger Plugin.
Downstream job - Pipeline
Use the same custom workspace:
node{
stage('build'){
dir('D:\\Jenkins\\shared') {
//some code
}
}
}
Answered By - Lesly Bernaola