[JIRA] (JENKINS-39932) Support more arbitrary Pipeline definitions

1 view
Skip to first unread message

andrew.melo@gmail.com (JIRA)

unread,
Nov 22, 2016, 3:55:02 AM11/22/16
to jenkinsc...@googlegroups.com
Andrew Melo created an issue
 
Jenkins / Bug JENKINS-39932
Support more arbitrary Pipeline definitions
Issue Type: Bug Bug
Assignee: Andrew Bayer
Components: pipeline-model-definition-plugin
Created: 2016/Nov/22 8:54 AM
Priority: Minor Minor
Reporter: Andrew Melo

I think the idea of a declarative (and not imperative) pipeline is a lot easier on the writers end (and I assume the implementers end as well), but I think the implementation of several serial stages each fanning out to a number of parallel stages is limiting to the overall description of the dependencies between different steps/nodes. In my case (simplifying, please excuse pseudo-code), I'd like to do something like this:

stage("checkout") { node () { git XXX } }
stage("build") {
    parallel ("ubuntu") { node("ubuntu") { make XXX }},
                 ("centos") { node("centos") { make YYY }},
                 // tons more distributions here
}
stage ("test") {
    node ("ubuntu") { test-ubuntu ZZZ }
}

stage ("publish") { node() { publish.sh }

Since I know the "test" stage only depends on the "ubuntu" part of the build stage, I'd like the test stage to fire without waiting on the whole "build" stage completes. From what I see, the parallel block waits for everything inside to complete, but I know the dependencies and can speed it up (in my case, there are a lot more nodes who match the testing than who don't). If I were to write it in bash, I would do something like:

git checkout XXX
build ubuntu &
TEST_PID=$!
build centos &
wait $TEST_PID
test-ubuntu
wait # wait for all testing and bulding to complete
publish

This is a rough way to explain the dependency graph to bash by saying "wait on 'build ubuntu' before starting the testing, but centos can take as long as it wants" and "before going to the publish step, make sure everything else is done". In my case, all the build steps for different distributions take forever because there's a finite number of VMs that can be spun up, but there's an abundance of "ubuntu" nodes that can be used for testing and compiling. It slows things down a ton to have to wait for the entire parallel node to finish before moving on, when there are free executors in latter steps that can start running.

Add Comment Add Comment
 
This message was sent by Atlassian JIRA (v7.1.7#71011-sha1:2526d7c)
Atlassian logo

andrew.bayer@gmail.com (JIRA)

unread,
Nov 23, 2016, 5:27:01 PM11/23/16
to jenkinsc...@googlegroups.com
Andrew Bayer commented on Bug JENKINS-39932
 
Re: Support more arbitrary Pipeline definitions

fwiw, I have plans for a stage dependency graph execution model as part of Declarative post-1.0, where you'd specify your stages and which other stages they depend on, and the execution would figure out the appropriate ordering based on that, including smart parallelization etc.

bitwiseman@gmail.com (JIRA)

unread,
Oct 22, 2019, 11:24:17 PM10/22/19
to jenkinsc...@googlegroups.com
Liam Newman closed an issue as Won't Fix
 

Bulk closing resolved issues.

Jenkins / New Feature JENKINS-39932
Change By: Liam Newman
Status: Resolved Closed
This message was sent by Atlassian Jira (v7.13.6#713006-sha1:cc4451f)
Atlassian logo
Reply all
Reply to author
Forward
0 new messages