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

Need branch name and other details from parallel branches

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      Is there a way to get which parallel branch is failing and get more details on the steps being executed/logs of that failure.
      Other objective is to compile list of all failed branches.

      def list=[ "abc" , "def" , "xyz" , "pqr" ]
      def branches = [:]
      def listLength=list.size()
      
      for (i=0;i<listLength;i++) {
          def excl = list.get(i);
          branches[excl]={
              node (){
              	sh """echo hello $excl"""
              	scm
              	sh " ant build.xml"
              	mail
      
              }
          }
      }
      
      try {
          parallel branches
      } catch(err) {
          print err
          <GET_PARALLEL_BRANCH_NAME/FAILURE_DETAILS>
      }
      

        Attachments

          Issue Links

            Activity

            budhi003 Ashudeep Budhiraja created issue -
            budhi003 Ashudeep Budhiraja made changes -
            Field Original Value New Value
            Priority Minor [ 4 ] Major [ 3 ]
            Hide
            jglick Jesse Glick added a comment -

            JENKINS-28119 would give you the log message. If you just want the branch name, you can do this already with catch blocks.

            Show
            jglick Jesse Glick added a comment - JENKINS-28119 would give you the log message. If you just want the branch name, you can do this already with catch blocks.
            jglick Jesse Glick made changes -
            Link This issue duplicates JENKINS-28119 [ JENKINS-28119 ]
            jglick Jesse Glick made changes -
            Resolution Duplicate [ 3 ]
            Status Open [ 1 ] Resolved [ 5 ]
            Hide
            jglick Jesse Glick added a comment -

            As to the originally proposed syntax, no, this was deleted for good reason in JENKINS-25894.

            Show
            jglick Jesse Glick added a comment - As to the originally proposed syntax, no, this was deleted for good reason in JENKINS-25894 .
            jglick Jesse Glick made changes -
            Link This issue relates to JENKINS-25894 [ JENKINS-25894 ]
            roemer Roman Bäriswyl made changes -
            Description Is there a way to get which parallel branch is failing and get more details on the steps being executed/logs of that failure.
            Other objective is to compile list of all failed branches.

            def list=[ "abc" , "def" , "xyz" , "pqr" ]
            def branches = [:]
            def listLength=list.size()

            for (i=0;i<listLength;i++) {
                def excl = list.get(i);
                branches[excl]={
                    node (){
                     sh """echo hello $excl"""
                     scm
                     sh " ant build.xml"
                     mail

                    }
                }
            }

            try {
                parallel branches
            } catch(err) {
                print err
                <GET_PARALLEL_BRANCH_NAME/FAILURE_DETAILS>
            }
            Is there a way to get which parallel branch is failing and get more details on the steps being executed/logs of that failure.
            Other objective is to compile list of all failed branches.

            {code}
            def list=[ "abc" , "def" , "xyz" , "pqr" ]
            def branches = [:]
            def listLength=list.size()

            for (i=0;i<listLength;i++) {
                def excl = list.get(i);
                branches[excl]={
                    node (){
                     sh """echo hello $excl"""
                     scm
                     sh " ant build.xml"
                     mail

                    }
                }
            }

            try {
                parallel branches
            } catch(err) {
                print err
                <GET_PARALLEL_BRANCH_NAME/FAILURE_DETAILS>
            }
            {code}

              People

              Assignee:
              jglick Jesse Glick
              Reporter:
              budhi003 Ashudeep Budhiraja
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: