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

Adding a parallel branch with no name results in a slightly bad Jenkinsfile

XMLWordPrintable

    • Blue Ocean 1.0-rc3

      If you add a parallel branch of execution in the editor, add some steps, and save - it will save correctly, however it isn't a very good Jenkinsfile. 

       

      Loading it up once it has completed a run will result in an error to visualise. The Jenkinsfile will end up looking like: 

       

      Note that the branch name is empty string - this seems to upset declarative. I am not sure it executes that branch. 

      stage('Static Analysis') {
      steps {
      parallel(
      "Static Analysis": {
      sh 'mvn findbugs:findbugs'
      },
      "": {
      echo 'rewrewqrewq'
      }
      )
      }
      }
      }

      In any case, a branch should be required to be named, so I think this should be a validation error right? OR the editor should name that branch it creates. 

       

      To reproduce: take an existing stage with at least one step, add a parallel branch, add steps to it (but do not name it) 

            kzantow Keith Zantow
            michaelneale Michael Neale
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: