[JIRA] (JENKINS-38339) UI for downstream jobs launched with 'build' step

212 views
Skip to first unread message

jdumay@cloudbees.com (JIRA)

unread,
Feb 20, 2017, 1:47:02 AM2/20/17
to jenkinsc...@googlegroups.com
James Dumay updated an issue
 
Jenkins / Improvement JENKINS-38339
UI for downstream jobs launched with 'build' step
Change By: James Dumay
Summary: Unable to browse to externally UI for downstream jobs launched builds [missing log decoration] with 'build' step
Add Comment Add Comment
 
This message was sent by Atlassian JIRA (v7.1.7#71011-sha1:2526d7c)
Atlassian logo

tsniatowski@opera.com (JIRA)

unread,
Mar 22, 2017, 10:26:02 AM3/22/17
to jenkinsc...@googlegroups.com
Tomasz Śniatowski commented on Improvement JENKINS-38339
 
Re: UI for downstream jobs launched with 'build' step

We're trying to avoid UI issues when there are sub-steps in a parallel pipeline stage (JENKINS-38442) by triggering sub-builds instead – but as the UI has no links to these sub-builds the experience is not great either way. Any chance triggered build info could be a link?

This message was sent by Atlassian JIRA (v7.3.0#73011-sha1:3c73d0e)
Atlassian logo

jdumay@cloudbees.com (JIRA)

unread,
Mar 22, 2017, 10:59:02 PM3/22/17
to jenkinsc...@googlegroups.com

jdumay@cloudbees.com (JIRA)

unread,
Mar 22, 2017, 10:59:03 PM3/22/17
to jenkinsc...@googlegroups.com
James Dumay commented on Improvement JENKINS-38339
 
Re: UI for downstream jobs launched with 'build' step

Tomasz Śniatowski we certainly plan for it to be a link of some kind. We will upload a design on this issue when we get to this one so you can give us feedback

steven.visagie@gmail.com (JIRA)

unread,
Feb 26, 2018, 9:05:03 AM2/26/18
to jenkinsc...@googlegroups.com

We're extremely interested in having this functionality available. Will the proposed link work with both downstream pipelines and Jenkins classic jobs? We use a combination of both in our use case. If the downstream is a pipeline, will it navigate to the running pipeline in Blue Ocean?

vivek.pandey@gmail.com (JIRA)

unread,
Feb 26, 2018, 1:24:10 PM2/26/18
to jenkinsc...@googlegroups.com
Vivek Pandey updated an issue
 
Change By: Vivek Pandey
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 1 2

jmcdonald@cloudbees.com (JIRA)

unread,
Feb 27, 2018, 10:32:02 PM2/27/18
to jenkinsc...@googlegroups.com

jmcdonald@cloudbees.com (JIRA)

unread,
Mar 1, 2018, 7:15:04 PM3/1/18
to jenkinsc...@googlegroups.com

jmcdonald@cloudbees.com (JIRA)

unread,
Mar 1, 2018, 7:17:05 PM3/1/18
to jenkinsc...@googlegroups.com
 

Merged @ 203324c8913426d9a9fd6a7cfe82f40c157eacec

Change By: Josh McDonald
Status: In Review Resolved
Resolution: Fixed

mneale@cloudbees.com (JIRA)

unread,
Mar 1, 2018, 7:53:06 PM3/1/18
to jenkinsc...@googlegroups.com
Michael Neale commented on Improvement JENKINS-38339
 
Re: UI for downstream jobs launched with 'build' step

Steven Visagie good questoin, an experiment (if you have the ability to build it) would be worthwhile, but I expect it would work the same, as it doesn't necessarily care what is in the "build" step for things it triggers (ie what type it is) so ideally it would just work. 

jmcdonald@cloudbees.com (JIRA)

unread,
Mar 1, 2018, 8:15:03 PM3/1/18
to jenkinsc...@googlegroups.com

It should be fine. It definitely won't work for classic upstream jobs tho.

rodrigc@FreeBSD.org (JIRA)

unread,
Mar 31, 2018, 3:51:03 PM3/31/18
to jenkinsc...@googlegroups.com

I tested this fix out in 1.5 beta-2.  It works well!

I found one minor problem in the UI, where it is difficult to identify which stage is selected in the UI.

Keith Zantow wrote up this ticket, because I was having temporary problems with my JIRA login acces:

JENKINS-50408

stevengfoster@gmail.com (JIRA)

unread,
Apr 5, 2018, 1:35:03 PM4/5/18
to jenkinsc...@googlegroups.com

Is there a way to aggregate the triggered builds within a parallel stage? I'm launching 12 or so builds as a parallel stage (the whole build is basically just a dummy/launchpad for other builds) and clicking each individual stage to get the downstream link is very slightly bothersome

bosch.bernloehr@extaccount.com (JIRA)

unread,
Sep 10, 2018, 5:55:05 AM9/10/18
to jenkinsc...@googlegroups.com
Jan Bernlöhr updated an issue
 
Change By: Jan Bernlöhr
Attachment: image-2018-09-10-11-54-51-888.png
This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d)

bosch.bernloehr@extaccount.com (JIRA)

unread,
Sep 10, 2018, 5:57:06 AM9/10/18
to jenkinsc...@googlegroups.com
Jan Bernlöhr commented on Improvement JENKINS-38339
 
Re: UI for downstream jobs launched with 'build' step

How can we enabled this feature? We are using BlueOcean 1.82 with declaraitve pipelines and do not see links.

 

stage('launch builds') {
    parallel {
        stage('stereo/offline') {
            steps {
                build job: 'rebuild',
            parameters:[
                    string(name: 'CONFIG_TO_BUILD', value: 'stereo/offline')
                ],
            propagate: true,
            wait: true
            }
        }
        stage('second_config') {
            steps {
                build job: 'rebuild',
            parameters:[
                    string(name: 'CONFIG_TO_BUILD', value: 'second_config')
                ],
            propagate: true,
            wait: true
            }
        }
    }
}

The invoked job 'rebuild' is also a declarative pipeline.

kacik.jan@outlook.com (JIRA)

unread,
Nov 9, 2018, 6:35:05 AM11/9/18
to jenkinsc...@googlegroups.com

It is not working for parallel stages in declarative pipeline. 

andreimuresianu1@gmail.com (JIRA)

unread,
Dec 4, 2018, 8:12:03 PM12/4/18
to jenkinsc...@googlegroups.com
Andrei Muresianu updated an issue
 
Change By: Andrei Muresianu
Attachment: image-2018-12-05-01-11-03-261.png

andreimuresianu1@gmail.com (JIRA)

unread,
Dec 4, 2018, 8:13:03 PM12/4/18
to jenkinsc...@googlegroups.com
Andrei Muresianu commented on Improvement JENKINS-38339
 
Re: UI for downstream jobs launched with 'build' step

It is still a problem in December 2018.

stage('Test Stack') {
    parallel {
        stage('Functional Tests') {
            steps {
                build job: 'TEST-functional'
            }
        }

        stage('View Tests') {
            steps {
                build job: 'TEST-view'
            }
        }
    }
    post {
        failure {
            echo 'Some of the functional/view tests failed. Tearing down the stack.'
            build job: 'TEST-teardown'
        }
    }
} 

None of TEST-functional, TEST-view, TEST-teardown are visible in BlueOcean (it looks like even the echo message got lost)

However, the console output references all of the jobs - no issues there.

 

 

mike@bolesta.net (JIRA)

unread,
Dec 6, 2018, 9:08:07 PM12/6/18
to jenkinsc...@googlegroups.com

I'm also seeing this issue when the triggered build is inside a parallel stage.

yairogen@gmail.com (JIRA)

unread,
Jan 20, 2019, 4:39:04 AM1/20/19
to jenkinsc...@googlegroups.com

Vincent Latombe can you update status? As Mike above I don't see links for triggered jobs in parallel step, only after the triggered job is done.

zakharovdi@gmail.com (JIRA)

unread,
Jan 23, 2019, 7:18:03 AM1/23/19
to jenkinsc...@googlegroups.com

Behavior and appearance in single and in parallel stages have difference. There are no link on child job if it was executed from parallel block. Can someone change bug status?

stevengfoster@gmail.com (JIRA)

unread,
Jan 30, 2019, 6:00:03 AM1/30/19
to jenkinsc...@googlegroups.com

I have just updated blue ocean from 1.5 (where this UI feature was originally introduced, and working fine) to 1.10.1 and no longer have links to downstream jobs in my parallel steps.

zakharovdi@gmail.com (JIRA)

unread,
Jan 30, 2019, 7:03:04 AM1/30/19
to jenkinsc...@googlegroups.com

Try to use parallel sequential stages syntax. There are only one problem if you have N nested stages we get job links only in first N-1. You should add last stage in row w/o running build in it.

pipeline{
    agent any
    stages{
        stage('Nested parallel'){
            parallel{
                stage("parallel 1"){
                    stages{
                        stage("Nested 1 with child in it"){
                            steps{
                                script{
                                    build "TestJob"
                                }
                            }
                        }
                        stage('Nested 2 with child in it'){
                            steps{
                                script{
                                    build "TestJob"
                                }
                            }
                        }
                        stage('Nested 3 w/o childs'){
                            steps{
                                echo "E-mail"
                            }
                        }

                    }
                }
                stage("parallel 2"){
                    stages{
                        stage("Nested 1 with child in it"){
                            steps{
                                script{
                                    build "TestJob"
                                }
                            }
                        }
                        stage('Nested 2 with child in it'){
                            steps{
                                script{
                                    build "TestJob"
                                }
                            }
                        }
                        stage('Nested 3 w/o childs'){
                            steps{
                                echo "E-mail"
                            }
                        }

                    }
                }
            }
        }
    }
}

zakharovdi@gmail.com (JIRA)

unread,
Jan 30, 2019, 7:19:06 AM1/30/19
to jenkinsc...@googlegroups.com
Denis Zakharov edited a comment on Improvement JENKINS-38339
Try to use parallel sequential stages syntax. There are only one problem if you we have N nested stages we get job links only in first N-1. You should add last stage in row w/o running build in it.
{code:java}
{code}

zakharovdi@gmail.com (JIRA)

unread,
Jan 30, 2019, 7:19:16 AM1/30/19
to jenkinsc...@googlegroups.com
Denis Zakharov edited a comment on Improvement JENKINS-38339
Try to use parallel sequential stages syntax. There are only one problem if we have N nested stages we get job links only in first N-1. You We should add last stage in row w/o running build in it.

yairogen@gmail.com (JIRA)

unread,
Jan 31, 2019, 9:04:03 AM1/31/19
to jenkinsc...@googlegroups.com

Denis Zakharov
I tried this. Doesn't work. I get the links only after the triggered builds finish.
During the parallel run, I only see the build name and the number in the console but no link in blue ocean ui.
 

ananthanhari@gmail.com (JIRA)

unread,
Feb 4, 2019, 12:31:03 PM2/4/19
to jenkinsc...@googlegroups.com

Build Link for jobs launched inside parallel stages would be most appreciated! Without this, we are kinda stuck having to open so many windows to track what's going on. Especially since many of our stages are propagate : false and/or wait: false.

For non-parallel stages, the URL shows up, but only after the child build is finished. So another request - create the URL link while the job is running. Some of our jobs take many minutes or hours and so having a live link would be really really useful.

Thank you!

 

ananthanhari@gmail.com (JIRA)

unread,
Feb 4, 2019, 1:23:03 PM2/4/19
to jenkinsc...@googlegroups.com
Hari Ananthan edited a comment on Improvement JENKINS-38339
Build Link for jobs launched inside parallel stages would be most appreciated! Without this, we are kinda stuck having to open so many windows to track what's going on. Especially since many of our stages are propagate : false and/or wait: false.

EDIT : Actually the exact bug is that Links don't show up if a parallel stage has *only one build.*

If parallel stage has 2 or more builds in series, then the links show up.

 

For non-parallel stages, the URL shows up, but only after the child build is finished. So another request - create the URL link while the job is running. Some of our jobs take many minutes or hours and so having a live link would be really really useful.

Thank you!

 

jmcdonald@cloudbees.com (JIRA)

unread,
Feb 4, 2019, 6:27:05 PM2/4/19
to jenkinsc...@googlegroups.com
Josh McDonald reopened an issue
 

I'll look into this a bit today. Might be more difficult than it seems tho. Fairly warned, be ye, says I.

 

I'll keep you guys posted.

 

Change By: Josh McDonald
Resolution: Fixed
Status: Resolved Reopened

ananthanhari@gmail.com (JIRA)

unread,
Feb 5, 2019, 2:20:05 AM2/5/19
to jenkinsc...@googlegroups.com
Hari Ananthan updated an issue
Change By: Hari Ananthan
Attachment: P1_1.JPG
Attachment: P1_2.JPG
Attachment: P2.JPG

ananthanhari@gmail.com (JIRA)

unread,
Feb 5, 2019, 2:22:10 AM2/5/19
to jenkinsc...@googlegroups.com
Hari Ananthan commented on Improvement JENKINS-38339
 
Re: UI for downstream jobs launched with 'build' step

Thanks a lot Josh. Here is a testcase and some pictures to illustrate the bug in case the description wasn't clear.

P1_1 and P1_2 show links, but P2 doesn't.

I am getting around now by simply adding a dummy "stage" before P2 in that branch of the parallel stage.

 

pipeline {

    agent any

    stages {

        stage('Parallel Stage') {

            parallel {

                stage('P1') {

                    stages {

                        stage('P1_1') { steps

{ build job: 'child', parameters: [[$class: 'StringParameterValue', name: 'STAGE', value: 'P1_1']] }

                        }

                        stage('P1_2') { steps

{ build job: 'child', parameters: [[$class: 'StringParameterValue', name: 'STAGE', value: 'P1_2']] }

                        }

                    }

                }

                stage('P2')

{                     steps \{ build job: 'child', parameters: [[$class: 'StringParameterValue', name: 'STAGE', value: 'P2']] }

                }

            }

        }

    }

}

 

 

yairogen@gmail.com (JIRA)

unread,
Feb 5, 2019, 2:27:02 AM2/5/19
to jenkinsc...@googlegroups.com

For me adding an empty non-build step - doesn't solve the issue. I see links but only after the job was completed (either success or failure)

jmcdonald@cloudbees.com (JIRA)

unread,
Feb 10, 2019, 8:22:02 PM2/10/19
to jenkinsc...@googlegroups.com

Still trying to figure this one out, but it's definitely a bug, and only seems to affect declarative pipelines, which makes for a nice test case of the same pipeline in both declarative and original pipeline versions.

jmcdonald@cloudbees.com (JIRA)

unread,
Feb 21, 2019, 9:28:03 PM2/21/19
to jenkinsc...@googlegroups.com

jmcdonald@cloudbees.com (JIRA)

unread,
Feb 22, 2019, 8:36:06 PM2/22/19
to jenkinsc...@googlegroups.com
Josh McDonald updated Improvement JENKINS-38339
 

Fixed in master @ 3a9b64269d037ce25b17b3e088e29cfde43fe098

Change By: Josh McDonald
Status: Reopened Fixed but Unreleased
Resolution: Fixed

zakharovdi@gmail.com (JIRA)

unread,
Feb 26, 2019, 10:43:04 AM2/26/19
to jenkinsc...@googlegroups.com
Denis Zakharov commented on Improvement JENKINS-38339
 
Re: UI for downstream jobs launched with 'build' step

Josh McDonald thank you. When can we get build with this fix?

zakharovdi@gmail.com (JIRA)

unread,
Mar 12, 2019, 3:47:03 AM3/12/19
to jenkinsc...@googlegroups.com

It was rollbacked in BO 1.13.2. Can someone reopen it?

jmcdonald@cloudbees.com (JIRA)

unread,
Mar 12, 2019, 3:50:05 AM3/12/19
to jenkinsc...@googlegroups.com
Change By: Josh McDonald
Resolution: Fixed
Status: Fixed but Unreleased Reopened

jmcdonald@cloudbees.com (JIRA)

unread,
Mar 13, 2019, 9:20:13 PM3/13/19
to jenkinsc...@googlegroups.com
Josh McDonald commented on Improvement JENKINS-38339
 
Re: UI for downstream jobs launched with 'build' step

Pull request to fix the regression (and extra tests) is here: https://github.com/jenkinsci/blueocean-plugin/pull/1933 - give it a few days as most of the reviewers are away from the office right now.

 

jmcdonald@cloudbees.com (JIRA)

unread,
Mar 14, 2019, 8:21:10 PM3/14/19
to jenkinsc...@googlegroups.com
 

Fixed in fc3e3a9f5cd13f535d88a173499bb929478f5b1f

Change By: Josh McDonald
Status: Reopened Fixed but Unreleased
Resolution: Fixed

gmogan@cloudbees.com (JIRA)

unread,
Mar 20, 2019, 4:19:08 PM3/20/19
to jenkinsc...@googlegroups.com
Change By: Gavin Mogan
Status: Fixed but Unreleased Resolved
Released As: 1.14.0

tim@getethos.com (JIRA)

unread,
Jul 13, 2019, 7:09:04 PM7/13/19
to jenkinsc...@googlegroups.com
Tim Huang updated an issue
Change By: Tim Huang
Attachment: Captura de Pantalla 2019-07-13 a la(s) 4.08.07 p. m..png
Attachment: Captura de Pantalla 2019-07-13 a la(s) 4.08.18 p. m..png

tim@getethos.com (JIRA)

unread,
Jul 13, 2019, 7:10:03 PM7/13/19
to jenkinsc...@googlegroups.com
Tim Huang commented on Improvement JENKINS-38339
 
Re: UI for downstream jobs launched with 'build' step

Hello, I am on Blue Ocean 1.17.0, and I do not see a link to my downstream jobs. Was there a regression?

 

tim@getethos.com (JIRA)

unread,
Jul 13, 2019, 9:10:04 PM7/13/19
to jenkinsc...@googlegroups.com

I have more information on the matter - I was triggering downstream jobs within a `parallel` step (not sure if this has anything to do with it. In an earlier sequential stage, if I trigger another build job, it causes the ones in the parallel steps (that didn't show up before) to show up in the "Triggered Jobs" section.

 

Below is my groovy script. In the first sequential stage there is a downstream no-op job I made that, when triggered, seems to make the "Triggered Jobs" section show up for the other two downstream jobs that are triggered in the parallel stages further down. Without the no-op job, the "Triggered Jobs" section won't show up for the other two. The formatting of this code won't paste right (missing newlines here and there), so apologies.

pipeline {
 agent none options {
  // Ideally, PRs build in less than 5
  timeout(time: 15, unit: 'MINUTES')
 } environment {
  CI = 'true'
  AWS_ACCESS_KEY_ID = credentials('aws-access-key-id-test')
  AWS_SECRET_ACCESS_KEY = credentials('aws-secret-access-key-test')
 } stages {
  stage('Abort previous builds on PR') {
   steps {
    // Not sure how this works, but… https://stackoverflow.com/a/52811034
    milestone label: '', ordinal: Integer.parseInt(env.BUILD_ID) - 1
    milestone label: '', ordinal: Integer.parseInt(env.BUILD_ID)

    // NOTE: Triggering this no-op job makes all Triggered Builds show up!!!
    build 'Utilities/TriggeringThisInStepsMakesTriggeredBuildsShowUp'
   }
  }  stage('PR tests') {
   failFast false
   parallel {
    stage('Linting & formatting') {
     agent {
      node {
       label 'Node'
      }
     }     steps {
      script {
       pullRequest.createStatus(status: 'pending',
        context: 'Format & Syntax (backend)',
        description: 'Checking code quality…',
        targetUrl: env.RUN_DISPLAY_URL)       try {
        sh '! git diff --name-only ^HEAD origin/trunk | grep "^backend"'
        echo "No changes found, skipping tests."        pullRequest.createStatus(status: 'success',
         context: 'Format & Syntax (backend)',
         description: 'Skipped (no changes).')
       } catch (e) {
        echo "Changes found, running tests."        ansiColor('xterm') {
         // Check for it-block .only() calls which skip all other
         // tests in a suite. These should NEVER be version-checked.
         sh "! git grep '\\<it\\.only\\>'"         sh 'rm -rf ./frontend'
         sh 'yarn'
         sh 'yarn eslint ./backend'
         sh 'yarn prettier -c "./backend/**/*.js"'         pullRequest.createStatus(status: 'success',
          context: 'Format & Syntax (backend)',
          description: 'Squeaky clean! You win today.')
        }
       }
      }
     }
     post {
      failure {
       script {
        pullRequest.createStatus(status: 'failure',
         context: 'Format & Syntax (backend)',
         description: 'Wow, did you even look at how malformed your code is?',
         targetUrl: env.RUN_DISPLAY_URL)
       }
      }
     }
    }    stage('Frontend tests') {
     agent {
      node {
       label 'Node'
      }
     }     steps {
      script {
       pullRequest.createStatus(status: 'pending',
        context: 'Unit tests (frontend)',
        description: 'Making sure you didn\'t break anything…',
        targetUrl: env.RUN_DISPLAY_URL)       try {
        sh '! git diff --name-only ^HEAD origin/trunk | grep "^frontend"'
        sh '! git diff --name-only ^HEAD origin/trunk | grep "^shared-utilities"'
        echo "No changes found, skipping tests."        pullRequest.createStatus(status: 'success',
         context: 'Unit tests (frontend)',
         description: 'Skipped (no changes).')
       } catch (e) {
        echo "Changes found, running tests."        sh 'rm -rf ./backend'
        sh 'yarn'
        dir('frontend') {
         ansiColor('xterm') {
          sh 'yarn test:ci --coverage --json --outputFile=test-results.json'
         }
        }        pullRequest.createStatus(status: 'success',
         context: 'Unit tests (frontend)',
         description: 'Hot damn, they passed!')
       }
      }
     }
     post {
      always {
       script {
        if (fileExists('frontend/test-results.json')) {
         archiveArtifacts artifacts: 'frontend/test-results.json', fingerprint: true
        }
       }
      }
      failure {
       script {
        pullRequest.createStatus(status: 'failure',
         context: 'Unit tests (frontend)',
         description: 'What did you do???',
         targetUrl: env.RUN_DISPLAY_URL)
       }
      }
     }
    }    stage('Backend tests') {
     agent {
      node {
       label 'Node'
      }
     }     steps {
      script {
       pullRequest.createStatus(status: 'pending',
        context: 'Unit tests (backend)',
        description: 'Making sure you didn\'t break anything…',
        targetUrl: env.RUN_DISPLAY_URL)       try {
        sh '! git diff --name-only ^HEAD origin/trunk | grep "^backend"'
        sh '! git diff --name-only ^HEAD origin/trunk | grep "^shared-utilities"'
        echo "No changes found, skipping tests."        pullRequest.createStatus(status: 'success',
         context: 'Unit tests (backend)',
         description: 'Skipped (no changes).')
       } catch (e) {
        echo "Changes found, running tests."        COMMIT = sh(script: 'git rev-parse HEAD', returnStdout: true).trim()
        build job: 'Build_Phases/test-backend-parallel', parameters: [
         [$class: 'StringParameterValue', name: 'COMMIT', value: COMMIT]
        ], wait: true        pullRequest.createStatus(status: 'success',
         context: 'Unit tests (backend)',
         description: 'Wow, way to go!!')
       }
      }
     }
     post {
      failure {
       script {
        pullRequest.createStatus(status: 'failure',
         context: 'Unit tests (backend)',
         description: 'Something terrible has happened.',
         targetUrl: env.RUN_DISPLAY_URL)
       }
      }
     }
    }    stage('Shared-utilities tests') {
     agent {
      node {
       label 'Node'
      }
     }     steps {
      script {
       pullRequest.createStatus(status: 'pending',
        context: 'Unit tests (shared-utilities)',
        description: 'Making sure you didn\'t break anything…',
        targetUrl: env.RUN_DISPLAY_URL)       try {
        sh '! git diff --name-only ^HEAD origin/trunk | grep "^shared-utilities"'
        echo "No changes found, skipping tests."        pullRequest.createStatus(status: 'success',
         context: 'Unit tests (shared-utilities)',
         description: 'Skipped (no changes).')
       } catch (e) {
        echo "Changes found, running tests."        sh 'rm -rf ./frontend && rm -rf ./backend'
        sh 'yarn'
        dir('shared-utilities') {
         ansiColor('xterm') {
          sh 'yarn test --coverage --json --outputFile=test-results.json'
         }
        }        pullRequest.createStatus(status: 'success',
         context: 'Unit tests (shared-utilities)',
         description: 'Congratulations, you may work another day.')
       }
      }
     }
     post {
      always {
       script {
        if (fileExists('shared-utilities/test-results.json')) {
         archiveArtifacts artifacts: 'shared-utilities/test-results.json', fingerprint: true
        }
       }
      }
      failure {
       script {
        pullRequest.createStatus(status: 'failure',
         context: 'Unit tests (shared-utilities)',
         description: 'Look, I get it. It\'s hard. FIX THIS!!!',
         targetUrl: env.RUN_DISPLAY_URL)
       }
      }
     }
    }    stage('Browser tests') {
     agent {
      node {
       label 'Node'
      }
     }     environment {
      CLIENT = 'main'
      HEADLESS = 'true'
      APP_ROOT = 'http://localhost:9002'
      LD_LIBRARY_PATH = '/opt/google/chrome/lib/:$LD_LIBRARY_PATH'
     }     steps {
      script {
       pullRequest.createStatus(status: 'pending',
        context: 'E2E tests (Chrome)',
        description: 'Making sure you didn\'t break anything…',
        targetUrl: env.RUN_DISPLAY_URL)       try {
        sh '! git diff --name-only ^HEAD origin/trunk | grep "^backend"'
        sh '! git diff --name-only ^HEAD origin/trunk | grep "^frontend"'
        sh '! git diff --name-only ^HEAD origin/trunk | grep "^shared-utilities"'
        echo "No changes found, skipping tests."        pullRequest.createStatus(status: 'success',
         context: 'E2E tests (Chrome)',
         description: 'Skipped (no changes).')
       } catch (e) {
        echo "Changes found, running tests."        COMMIT = sh(script: 'git rev-parse HEAD', returnStdout: true).trim()
        build job: 'Build_Phases/test-browser-parallel', parameters: [
         [$class: 'StringParameterValue', name: 'COMMIT', value: COMMIT]
        ]        pullRequest.createStatus(status: 'success',
         context: 'E2E tests (Chrome)',
         description: 'FULL FUNNEL SUCCESS, BEYOTCH!')
       }
      }
     }
     post {
      failure {
       script {
        pullRequest.createStatus(status: 'failure',
         context: 'E2E tests (Chrome)',
         description: 'Oh no. Ohhhhhh no. This is bad.',
         targetUrl: env.RUN_DISPLAY_URL)
       }
      }
     }
    }    stage('Bundle test (admin)') {
     agent {
      node {
       label 'Node'
      }
     }     environment {
      CLIENT = 'admin'
      AWS_ACCESS_KEY_ID = credentials('aws-access-key-id-deploy-production')
      AWS_SECRET_ACCESS_KEY = credentials('aws-secret-access-key-deploy-production')
     }     steps {
      script {
       pullRequest.createStatus(status: 'pending',
        context: 'Bundle test (admin)',
        description: 'Blending…',
        targetUrl: env.RUN_DISPLAY_URL)       try {
        sh '! git diff --name-only ^HEAD origin/trunk | grep "^cli"'
        sh '! git diff --name-only ^HEAD origin/trunk | grep "^frontend"'
        echo "No changes found, skipping tests."        pullRequest.createStatus(status: 'success',
         context: 'Bundle test (admin)',
         description: 'Skipped (no changes).')
       } catch (e) {
        echo "Changes found, running tests."        sh 'yarn'
        sh 'yarn start -e production -n client node ./frontend/bin/client/build.js'        pullRequest.createStatus(status: 'success',
         context: 'Bundle test (admin)',
         description: 'Ah, the sweet smell of minified text.')
       }
      }
     }
     post {
      failure {
       script {
        pullRequest.createStatus(status: 'failure',
         context: 'Bundle test (admin)',
         description: 'Uh-oh.',
         targetUrl: env.RUN_DISPLAY_URL)
       }
      }
     }
    }    stage('Bundle test (main)') {
     agent {
      node {
       label 'Node'
      }
     }     environment {
      CLIENT = 'main'
      AWS_ACCESS_KEY_ID = credentials('aws-access-key-id-deploy-production')
      AWS_SECRET_ACCESS_KEY = credentials('aws-secret-access-key-deploy-production')
     }     steps {
      script {
       pullRequest.createStatus(status: 'pending',
        context: 'Bundle test (main)',
        description: 'Blending…',
        targetUrl: env.RUN_DISPLAY_URL)       try {
        sh '! git diff --name-only ^HEAD origin/trunk | grep "^cli"'
        sh '! git diff --name-only ^HEAD origin/trunk | grep "^frontend"'
        echo "No changes found, skipping tests."        pullRequest.createStatus(status: 'success',
         context: 'Bundle test (main)',
         description: 'Skipped (no changes).')
       } catch (e) {
        echo "Changes found, running tests."        sh 'yarn'
        sh 'yarn start -e production -n client node ./frontend/bin/client/build.js'        pullRequest.createStatus(status: 'success',
         context: 'Bundle test (main)',
         description: 'Ah, the sweet smell of minified text.')
       }
      }
     }
     post {
      failure {
       script {
        pullRequest.createStatus(status: 'failure',
         context: 'Bundle test (main)',
         description: 'Uh-oh.',
         targetUrl: env.RUN_DISPLAY_URL)
       }
      }
     }
    }    stage('Bundle test (quote-widget)') {
     agent {
      node {
       label 'Node'
      }
     }     environment {
      CLIENT = 'quote-widget'
      AWS_ACCESS_KEY_ID = credentials('aws-access-key-id-deploy-production')
      AWS_SECRET_ACCESS_KEY = credentials('aws-secret-access-key-deploy-production')
     }     steps {
      script {
       pullRequest.createStatus(status: 'pending',
        context: 'Bundle test (quote-widget)',
        description: 'Blending…',
        targetUrl: env.RUN_DISPLAY_URL)       try {
        sh '! git diff --name-only ^HEAD origin/trunk | grep "^cli"'
        sh '! git diff --name-only ^HEAD origin/trunk | grep "^frontend"'
        echo "No changes found, skipping tests."

        pullRequest.createStatus(status: 'success',
         context: 'Bundle test (quote-widget)',
         description: 'Skipped (no changes).')
       } catch (e) {
        echo "Changes found, running tests."        sh 'yarn'
        sh 'yarn start -e production -n client node ./frontend/bin/client/build.js'        pullRequest.createStatus(status: 'success',
         context: 'Bundle test (quote-widget)',
         description: 'Ah, the sweet smell of minified text.')
       }
      }
     }
     post {
      failure {
       script {
        pullRequest.createStatus(status: 'failure',
         context: 'Bundle test (quote-widget)',
         description: 'Uh-oh.',
         targetUrl: env.RUN_DISPLAY_URL)
       }
      }
     }
    }
   }
  }
 }
}

 

 

tim@getethos.com (JIRA)

unread,
Jul 13, 2019, 9:17:05 PM7/13/19
to jenkinsc...@googlegroups.com
Change By: Tim Huang
Resolution: Fixed
Status: Resolved In Review

tim@getethos.com (JIRA)

unread,
Jul 14, 2019, 12:35:23 AM7/14/19
to jenkinsc...@googlegroups.com
Tim Huang edited a comment on Improvement JENKINS-38339
I have more information on the matter - I was triggering downstream jobs within a `parallel` step (not sure if this has anything to do with it ) . In an earlier sequential stage, if I trigger another build job, it causes the ones in the parallel steps (that didn't show up before) to show up in the "Triggered Jobs" section.


 

Below is my groovy script. In the first sequential stage there is a downstream no-op job I made that, when triggered, seems to make the "Triggered Jobs" section show up for the other two downstream jobs that are triggered in the parallel stages further down. Without the no-op job, the "Triggered Jobs" section won't show up for the other two. The formatting of this code won't paste right (missing newlines here and there), so apologies.
{noformat}
}{noformat}
 

 

tim@getethos.com (JIRA)

unread,
Jul 14, 2019, 12:35:23 AM7/14/19
to jenkinsc...@googlegroups.com
Tim Huang edited a comment on Improvement JENKINS-38339
I have more information on the matter - I was triggering downstream jobs within a `parallel` step (not sure if this has anything to do with it). In an earlier sequential stage, if I trigger another downstream build job, it causes itself and the ones in the parallel steps (that didn't show up before) to show up in the their respective "Triggered Jobs" section sections .

rossm@momentfactory.com (JIRA)

unread,
Aug 6, 2019, 3:59:04 PM8/6/19
to jenkinsc...@googlegroups.com
Ross M commented on Improvement JENKINS-38339

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

jmcdonald@cloudbees.com (JIRA)

unread,
Aug 6, 2019, 6:51:09 PM8/6/19
to jenkinsc...@googlegroups.com
Josh McDonald assigned an issue to Unassigned
 
Change By: Josh McDonald
Assignee: Josh McDonald

joakim.nyman86@gmail.com (JIRA)

unread,
Aug 26, 2019, 3:40:04 AM8/26/19
to jenkinsc...@googlegroups.com
Joakim Nyman commented on Improvement JENKINS-38339
 
Re: UI for downstream jobs launched with 'build' step

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?

wuyanli5@yahoo.com (JIRA)

unread,
Sep 28, 2019, 6:32:06 AM9/28/19
to jenkinsc...@googlegroups.com
yanli wu updated an issue
 
Change By: yanli wu
Attachment: image-2019-09-28-18-31-11-339.png
This message was sent by Atlassian Jira (v7.13.6#713006-sha1:cc4451f)
Atlassian logo

wuyanli5@yahoo.com (JIRA)

unread,
Sep 28, 2019, 6:33:02 AM9/28/19
to jenkinsc...@googlegroups.com
yanli wu commented on Improvement JENKINS-38339
 
Re: UI for downstream jobs launched with 'build' step

It is not work with Blue Ocean 1.19.0

wessely.werner@gmail.com (JIRA)

unread,
Oct 11, 2019, 6:47:03 AM10/11/19
to jenkinsc...@googlegroups.com

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)
 ])
}

 
 
 

 
 
 
 
 

wessely.werner@gmail.com (JIRA)

unread,
Oct 11, 2019, 6:51:08 AM10/11/19
to jenkinsc...@googlegroups.com
Werner Wessely edited a comment on Improvement JENKINS-38339
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:

 
{code:java}
}{code}
 
 
 

 
 
 
 
 

wessely.werner@gmail.com (JIRA)

unread,
Oct 11, 2019, 7:01:06 AM10/11/19
to jenkinsc...@googlegroups.com

 

 

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

wessely.werner@gmail.com (JIRA)

unread,
Oct 11, 2019, 7:02:04 AM10/11/19
to jenkinsc...@googlegroups.com

ryanstewart456@gmail.com (JIRA)

unread,
Feb 6, 2020, 7:33:04 AM2/6/20
to jenkinsc...@googlegroups.com

I have raised a bug for this JENKINS-60995

as it is a regression of existing functionality 

roalter@gmail.com (JIRA)

unread,
Feb 26, 2020, 11:56:06 AM2/26/20
to jenkinsc...@googlegroups.com

Sometimes it works. but not always. For some reasons the NodeDownstreamBuildAction is missing when using the api /blue/rest/organizations/jenkins/pipelines/

When going closer into /blue/rest/organizations/jenkins/pipelines/<project>/runs/x/nodes/y/ the information is missing in this endpoint too.

Funny fact, I've debugged it with the Script console by replaying the code from https://github.com/jenkinsci/blueocean-plugin/blob/master/blueocean-pipeline-api-impl/src/main/java/io/jenkins/blueocean/listeners/DownstreamJobListener.java. This works and all the triggered builds are there.

 

But for me it's too complex to dig into the blue-ocean rest and debug there.

Any suggestion from anyone how to debug it?

stuartr@ea.com (JIRA)

unread,
Feb 26, 2020, 12:57:04 PM2/26/20
to jenkinsc...@googlegroups.com

I've been looking into this as well. What I've found so far:

  • The downstream runs have an associated BuildUpstreamNodeAction contributed by the build step.
  • The BuildUpstreamNodeAction action has an upstreamNodeId pointing back to the build step that triggered the downstream run.
  • This upstreamNodeId doesn't match the id of the node typically selected when viewing the Blue Ocean pipeline graph (that node is typically a stage or parallel branch node)
  • There's code in PipelineNodeGraphVisitor.java that accumulates actions from nodes within a branch or stage and then adds them to the node for that branch or stage. I believe this is the source of the issue.

 

This message was sent by Atlassian Jira (v7.13.12#713012-sha1:6e07c38)
Atlassian logo

stuartr@ea.com (JIRA)

unread,
Feb 26, 2020, 1:16:04 PM2/26/20
to jenkinsc...@googlegroups.com
Stuart Rowe edited a comment on Improvement JENKINS-38339
I've been looking into this as well. What I've found so far:
- The downstream runs have an associated [BuildUpstreamNodeAction|https://github.com/jenkinsci/pipeline-build-step-plugin/blob/master/src/main/java/org/jenkinsci/plugins/workflow/support/steps/build/BuildUpstreamNodeAction.java] contributed by the build step.
- The BuildUpstreamNodeAction action has an upstreamNodeId pointing back to the build step that triggered the downstream run.
- This
[DownstreamJobListener|https://github.com/jenkinsci/blueocean-plugin/blob/master/blueocean-pipeline-api-impl/src/main/java/io/jenkins/blueocean/listeners/DownstreamJobListener.java] adds a [NodeDownstreamBuildAction|https://github.com/jenkinsci/blueocean-plugin/blob/master/blueocean-pipeline-api-impl/src/main/java/io/jenkins/blueocean/listeners/NodeDownstreamBuildAction.java] to the node pointed to by the  upstreamNodeId .
- This upstreamNodeId
doesn't match the id of the node typically selected when viewing the Blue Ocean pipeline graph (that node is typically a stage or parallel branch node)
- There's code in [PipelineNodeGraphVisitor.java|https://github.com/jenkinsci/blueocean-plugin/blob/master/blueocean-pipeline-api-impl/src/main/java/io/jenkins/blueocean/rest/impl/pipeline/PipelineNodeGraphVisitor.java] that accumulates actions from nodes within a branch or stage and then adds them to the node for that branch or stage. I believe this is the source of the issue.

 
Reply all
Reply to author
Forward
0 new messages