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

UI for downstream jobs launched with 'build' step

    Details

    • Similar Issues:
    • Sprint:
      Blue Ocean 1.1, Blue Ocean 1.2-beta1, Blue Ocean 1.2-beta2, Blue Ocean 1.4 - beta 3, Blue Ocean 1.5 - beta 2
    • Released As:
      1.14.0

      Description

      Improvement on roadmap

      This improvement is on the Blue Ocean project roadmap. Check the roadmap page for updates.

      Same pipeline as JENKINS-38337

      stage "Stage 1"
      stage ("Trigger jobs") {
          parallel(
              downstream1: {
                  build 'downstream1'
              },
              downstream2: {
                  build 'downstream2'
              }
          )
      }
      

      In the logs, we see things like Starting building: downstream2 #3, however unlike the classic console, this is not a link, so you can't browse to the other build.

       

      Out of scope: 

      When the "don't wait" mode is used, there is no link to the resultant downstream job, so no need to link it back  ( ie build job: 'downer', wait: false)

       

       

        Attachments

          Issue Links

            Activity

            Hide
            rossm Ross M added a comment -

            do we know what version this feature works. because it was working before 1.7.*

            Show
            rossm Ross M added a comment - do we know what version this feature works. because it was working before 1.7.*
            Hide
            joakimnyman Joakim Nyman added a comment -

            I just installed 1.18.1 in hope of getting the "Starting building:" to be clickable but it is not. What is the status here?

            Show
            joakimnyman Joakim Nyman added a comment - I just installed 1.18.1 in hope of getting the "Starting building:" to be clickable but it is not. What is the status here?
            Hide
            iamwangu wangu added a comment -

            It is not work with Blue Ocean 1.19.0

            Show
            iamwangu wangu added a comment - It is not work with Blue Ocean 1.19.0
            Hide
            wernerwessely Werner Wessely added a comment - - edited

            For anybody struggling with this and in need of some inspiration for a workaround, we are using a wrapper for the job step which prints a link to the downstream build until this issue is fixed. Better than nothing:

             

            def getBlueOceanLink(obj, jobName) {
              def buildNumber
            
              if(obj instanceof Exception) {
                obj.toString().split(" ").each {
                  if(it.contains("#")) {
                    buildNumber = it.substring(1)
                  }
                }
              } else if(obj instanceof org.jenkinsci.plugins.workflow.support.steps.build.RunWrapper) {
                buildNumber = obj.getNumber()
              } else {
                return "Can not determine Blue Ocean link!!!"
              }
            
              return "For detailed information see: http://<YOUR JENKINS>/blue/organizations/jenkins/${jobName}/detail/${jobName}/${buildNumber}/pipeline"
            }
            
            // Wrapper:
            def linkBuild(job, parameters) {
                def buildInfo
                try {
                    buildInfo = build(job: job, parameters: parameters, wait: true, propagate: true)
                } catch (Exception e) {
                    println getBlueOceanLink(e, job)
                    throw e
                }
                println getBlueOceanLink(buildInfo, job)
            }
            
            // Usage:
            stage ("My stage") {
             linkBuild("My job", [
              string(name: "my param", value: some_value)
             ])
            }

            If anybody has come up with something better I would love to hear it!

            Show
            wernerwessely Werner Wessely added a comment - - edited For anybody struggling with this and in need of some inspiration for a workaround, we are using a wrapper for the job step which prints a link to the downstream build until this issue is fixed. Better than nothing:   def getBlueOceanLink(obj, jobName) {   def buildNumber    if (obj  instanceof  Exception) {     obj.toString().split( " " ).each {        if (it.contains( "#" )) {         buildNumber = it.substring(1)       }     }   }  else   if (obj  instanceof  org.jenkinsci.plugins.workflow.support.steps.build.RunWrapper) {     buildNumber = obj.getNumber()   }  else  {      return   "Can not determine Blue Ocean link!!!"   }    return   "For detailed information see: http: //<YOUR JENKINS>/blue/organizations/jenkins/${jobName}/detail/${jobName}/${buildNumber}/pipeline" } // Wrapper: def linkBuild(job, parameters) {     def buildInfo      try  {         buildInfo = build(job: job, parameters: parameters, wait:  true , propagate:  true )     }  catch  (Exception e) {         println getBlueOceanLink(e, job)          throw  e     }     println getBlueOceanLink(buildInfo, job) } // Usage: stage ( "My stage" ) { linkBuild( "My job" , [   string(name:  "my param" , value: some_value) ]) } If anybody has come up with something better I would love to hear it!
            Hide
            ryanstewart456 Ryan Stewart added a comment -

            I have raised a bug for this JENKINS-60995

            as it is a regression of existing functionality 

            Show
            ryanstewart456 Ryan Stewart added a comment - I have raised a bug for this  JENKINS-60995 as it is a regression of existing functionality 

              People

              • Assignee:
                Unassigned
                Reporter:
                vlatombe Vincent Latombe
              • Votes:
                40 Vote for this issue
                Watchers:
                66 Start watching this issue

                Dates

                • Created:
                  Updated: