Reputation: 197
I'm building a project with declarative pipelines, I want to create two different workspaces with two different names for the parallel step. How do I do it?
i.e, something like this
build1 workspace : /some/path/build-1
build2 workspace : /some/path/build-2
Upvotes: 3
Views: 12311
Reputation: 787
Are you looking for something like:
pipeline {
agent none
stages {
stage('Parallel Stages') {
parallel {
stage('Parallel Stage 1') {
agent {
node {
label 'label'
customWorkspace '/tmp/dir1'
}
}
steps {
echo pwd()
}
}
stage('Parallel Stage 2') {
agent {
node {
label 'label'
customWorkspace '/tmp/dir2'
}
}
steps {
echo pwd()
}
}
}
}
}
}
Upvotes: 9