Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-61257

Parallel builds not creating different workspaces

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Minor Minor
    • workflow-job-plugin
    • None
    • pipeline 2.6

      Hi,

      I am using the parallelization capabilities of Jenkins for my builds.

      From what I read, what I should be expecting is that each parallel step will create its own workspace, named after the "main" workspace adding @[number].

      The issue I am experiencing is that only one workspace is being created and is shared among all steps. Therefor some of my tests fails (since they modifies some files).

      I didn't find any option or anything that prevent the steps from creating their own workspace.

      From what I understood, by default each step will create it and you have to write a custom workspace dir in the Jenkinsfile to bypass this behavior.

      Here is an overview of my Jenkinsfile :

       stages {
              ...
              stage ('Build') {
                  parallel {
                      stage('xxx') {
                          steps {
                              ...
                          }
                          post {
                              success {
                                  ...
                              }
                          }
                      }                
                      stage('yyy') {
                          steps {
                              ...
                          }
                          post {
                              success {
                                  ...
                              }
                          }
                      }
                  ...

      Everything is fine with the tests since it does run on another Jenkins server without any problems, so it might be on the configuration of the Jenkins server.

      Thank in advance for the help.

            Unassigned Unassigned
            alexcw Alexandre Massiot
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: