i am trying to create unique workspace for my workflow/pipeline. The
workspace will contain certain files that i don't want to mess up when the
job runs concurrently. my workflow looks something like
node("master") {
stage name: 'sync', concurrency: 3
ws('/opt/mount1/jenkins/jobs/GoogleFlow/workspace/(${env.BUILD_NUMBER})') {
//code block
}
stage name: 'build_and_test', concurrency: 1
ws('/opt/mount1/jenkins/jobs/GoogleFlow/workspace/(${env.BUILD_NUMBER})') {
//code block
}
stage name: 'test', concurrency: 3
ws('/opt/mount1/jenkins/jobs/GoogleFlow/workspace/(${env.BUILD_NUMBER})') {
//code block
}
}
I am expecting jenkins to create workspaces like inside the main/default
workspace (/opt/mount1/jenkins/jobs/GoogleFlow/workspace) as
/opt/mount1/jenkins/jobs/GoogleFlow/workspace/1
/opt/mount1/jenkins/jobs/GoogleFlow/workspace/2
/opt/mount1/jenkins/jobs/GoogleFlow/workspace/3
how do i make the env variable ${env.BUILD_NUMBER} get the value while
creating the workspace?
--
You received this message because you are subscribed to the Google Groups
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/jenkinsci-users/a6f62ea6-e7f3-4d88-9a87-de450aa7b834%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.