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

Can't use milestone with parallel stages in Declarative

      Hello,

      thanks for this  feature - https://jenkins.io/blog/2017/09/25/declarative-1/

      Parallel stages with declarative pipeline.

      We wanted to try parallel, node, milestone together in the particular stage.

      And we tried the below :

      pipeline {
        agent none
        stage('Tests') {
          when { branch 'declarative-pipeline' }
          parallel {
            stage('One') {
              agent any
              steps {
                lock(resource: "${env.JOB_NAME}/10", inversePrecedence: true) {
                  milestone  10
                  node() {
                    deleteDir()
                    execute tests
                  }
                }
              }
            }
          }
        }
      }
      

      but it does not execute this stage and there will be no syntax errors. could you please let me know what is missing in the above example?

      Regards,
      Ashwin

       

       

          [JENKINS-47179] Can't use milestone with parallel stages in Declarative

          Ashwin Y created issue -
          Andrew Bayer made changes -
          Description Original: Hello,

          thanks for this  feature - [https://jenkins.io/blog/2017/09/25/declarative-1/]

          Parallel stages with declarative pipeline.

          We wanted to try parallel, node, milestone together in the particular stage.

          And we tried the below :

           stage('Tests') {
            agent none
            when { branch 'declarative-pipeline' }

          parallel {
                          stage('One') {
                              agent any
                              steps {
                               
                                      lock(resource: "${env.JOB_NAME}/10", inversePrecedence: true) {
                                          milestone 10
                                          emptyNode() {
                                              
                                                  execute tests
                                              }
                                          
                                      }
                                  }
                               
                           }
          }
          }

          but it does not execute this stage and there will be no syntax errors. could you please let me know what is missing in the above example?

          Regards,
          Ashwin

           

           
          New: Hello,

          thanks for this  feature - [https://jenkins.io/blog/2017/09/25/declarative-1/]

          Parallel stages with declarative pipeline.

          We wanted to try parallel, node, milestone together in the particular stage.

          And we tried the below :

          {code}
           stage('Tests') {
            agent none
            when { branch 'declarative-pipeline' }

          parallel {
                          stage('One') {
                              agent any
                              steps {
                               
                                      lock(resource: "${env.JOB_NAME}/10", inversePrecedence: true) {
                                          milestone 10
                                          emptyNode() {
                                              
                                                  execute tests
                                              }
                                          
                                      }
                                  }
                               
                           }
          }
          }
          {code}
          but it does not execute this stage and there will be no syntax errors. could you please let me know what is missing in the above example?

          Regards,
          Ashwin

           

           
          Christopher Fenner made changes -
          Description Original: Hello,

          thanks for this  feature - [https://jenkins.io/blog/2017/09/25/declarative-1/]

          Parallel stages with declarative pipeline.

          We wanted to try parallel, node, milestone together in the particular stage.

          And we tried the below :

          {code}
           stage('Tests') {
            agent none
            when { branch 'declarative-pipeline' }

          parallel {
                          stage('One') {
                              agent any
                              steps {
                               
                                      lock(resource: "${env.JOB_NAME}/10", inversePrecedence: true) {
                                          milestone 10
                                          emptyNode() {
                                              
                                                  execute tests
                                              }
                                          
                                      }
                                  }
                               
                           }
          }
          }
          {code}
          but it does not execute this stage and there will be no syntax errors. could you please let me know what is missing in the above example?

          Regards,
          Ashwin

           

           
          New: Hello,

          thanks for this  feature - [https://jenkins.io/blog/2017/09/25/declarative-1/]

          Parallel stages with declarative pipeline.

          We wanted to try parallel, node, milestone together in the particular stage.

          And we tried the below :
          {code:java}
          stage('Tests') {
            agent none
            when { branch 'declarative-pipeline' }
            parallel {
              stage('One') {
                agent any
                steps {
                  lock(resource: "${env.JOB_NAME}/10", inversePrecedence: true) {
                    milestone 10
                    emptyNode() {
                      execute tests
                    }
                  }
                }
              }
            }
          }
          {code}
          but it does not execute this stage and there will be no syntax errors. could you please let me know what is missing in the above example?

          Regards,
           Ashwin

           

           
          Christopher Fenner made changes -
          Description Original: Hello,

          thanks for this  feature - [https://jenkins.io/blog/2017/09/25/declarative-1/]

          Parallel stages with declarative pipeline.

          We wanted to try parallel, node, milestone together in the particular stage.

          And we tried the below :
          {code:java}
          stage('Tests') {
            agent none
            when { branch 'declarative-pipeline' }
            parallel {
              stage('One') {
                agent any
                steps {
                  lock(resource: "${env.JOB_NAME}/10", inversePrecedence: true) {
                    milestone 10
                    emptyNode() {
                      execute tests
                    }
                  }
                }
              }
            }
          }
          {code}
          but it does not execute this stage and there will be no syntax errors. could you please let me know what is missing in the above example?

          Regards,
           Ashwin

           

           
          New: Hello,

          thanks for this  feature - [https://jenkins.io/blog/2017/09/25/declarative-1/]

          Parallel stages with declarative pipeline.

          We wanted to try parallel, node, milestone together in the particular stage.

          And we tried the below :
          {code:java}
          stage('Tests') {
            agent none
            when { branch 'declarative-pipeline' }
            parallel {
              stage('One') {
                agent any
                steps {
                  lock(resource: "${env.JOB_NAME}/10", inversePrecedence: true) {
                    milestone 10
                    node() {
                      deleteDir()
                      execute tests
                    }
                  }
                }
              }
            }
          }
          {code}
          but it does not execute this stage and there will be no syntax errors. could you please let me know what is missing in the above example?

          Regards,
           Ashwin

           

           
          Christopher Fenner made changes -
          Description Original: Hello,

          thanks for this  feature - [https://jenkins.io/blog/2017/09/25/declarative-1/]

          Parallel stages with declarative pipeline.

          We wanted to try parallel, node, milestone together in the particular stage.

          And we tried the below :
          {code:java}
          stage('Tests') {
            agent none
            when { branch 'declarative-pipeline' }
            parallel {
              stage('One') {
                agent any
                steps {
                  lock(resource: "${env.JOB_NAME}/10", inversePrecedence: true) {
                    milestone 10
                    node() {
                      deleteDir()
                      execute tests
                    }
                  }
                }
              }
            }
          }
          {code}
          but it does not execute this stage and there will be no syntax errors. could you please let me know what is missing in the above example?

          Regards,
           Ashwin

           

           
          New: Hello,

          thanks for this  feature - [https://jenkins.io/blog/2017/09/25/declarative-1/]

          Parallel stages with declarative pipeline.

          We wanted to try parallel, node, milestone together in the particular stage.

          And we tried the below :
          {code:java}

          pipeline {
            agent none
            stage('Tests') {
              when { branch 'declarative-pipeline' }
              parallel {
                stage('One') {
                  agent any
                  steps {
                    lock(resource: "${env.JOB_NAME}/10", inversePrecedence: true) {
                      milestone 10
                      node() {
                        deleteDir()
                        execute tests
                      }
                    }
                  }
                }
              }
            }
          }
          {code}
          but it does not execute this stage and there will be no syntax errors. could you please let me know what is missing in the above example?

          Regards,
           Ashwin

           

           
          Andrew Bayer made changes -
          Summary Original: Parallel stages with Declarative Pipeline 1.2 New: Can't use milestone with parallel stages in Declarative
          Andrew Bayer made changes -
          Assignee Original: Andrew Bayer [ abayer ]

            Unassigned Unassigned
            ashsy_009 Ashwin Y
            Votes:
            11 Vote for this issue
            Watchers:
            17 Start watching this issue

              Created:
              Updated: