[JIRA] (JENKINS-60324) nested Parallel in declarative results in temporary misrendering

1 view
Skip to first unread message

jsoref+jenkins@gmail.com (JIRA)

unread,
Nov 28, 2019, 4:11:04 PM11/28/19
to jenkinsc...@googlegroups.com
Josh Soref created an issue
 
Jenkins / New Feature JENKINS-60324
nested Parallel in declarative results in temporary misrendering
Issue Type: New Feature New Feature
Assignee: Unassigned
Attachments: image-2019-11-28-15-13-12-961.png, image-2019-11-28-15-13-20-794.png, image-2019-11-28-15-13-25-702.png
Components: blueocean-plugin, pipeline
Created: 2019-11-28 21:10
Priority: Minor Minor
Reporter: Josh Soref

We're using a declarative pipeline that happens to use

def {}
// and
script {} 
// and
parallel objects
def projectName(projectPrefix, flavor) {
    return "${projectPrefix} ${flavor}"
}
def templateProjectNode (project, flavor, publish) {
    return {
        node {
            stage(projectName(project, flavor)) {
                try {
                    sh "hostname"
                    script {
                        sh label: "Compile + Test + Publish", script: "hostname"
                    }
                }
                finally {
                    junit "*/target/test-reports/**/*.xml"
                    archiveArtifacts "*/target/test-reports/**"
                    archiveArtifacts "*/target/*/*report/**"
                }
            }
        }
     }
}
def generateProjects (projectList) {
    def projects = projectList.collectEntries {
        [(projectName(it[0], it[1])): templateProjectNode(it[0], it[1], it[2])]
    }
    parallel projects
}

pipeline {
    stages {
        stage("a") {
            steps {
                sh "hostname"
            }
        }
        stage("b") {
            steps {
                sh "hostname"
            }
        }
        stage("c") {
            steps {
                sh "hostname"
            }
        }
        stage("Compile + Test + Publish") {
            parallel {
                stage("Frontend") {
                    steps {
                        sh "hostname"
                    }
                }
                stage("Magic") {
                    steps {
                        script {
                            projectList = [
                                ["D", "QQ", true],
                                ["D", "RR", true],
                                ["E", "QQ", true],
                                ["F", "QQ", true],
                                ["F", "RR", true],
                                ["G", "QQ", true],
                                ["H", "QQ", false],
                            ]
                            generateProjects(projectList)
                        }
                    }
                }
            }
        }
        stage("j") {
            steps {
                sh "hostname"
            }
        }
        stage("k") {
            steps {
                sh "hostname"
            }
        }
        stage("l") {
            when {
                branch "master"
            }
            steps {
                sh "hostname"
            }
        }
    }
}
 

 

Expected results:

the graph should generally have the same shape as the final graph. The first graph is perhaps the most problematic, although the second is also wrong.

Add Comment Add Comment
 
This message was sent by Atlassian Jira (v7.13.6#713006-sha1:cc4451f)
Atlassian logo
Reply all
Reply to author
Forward
0 new messages