jenkins pipeline - how to add another parallel to 2 other parallel.

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

jenkins pipeline - how to add another parallel to 2 other parallel.

PrashantL
Hello friends / Jenkins Users,
I want stage 9 to be parallel to first and second parallel. stage 9 should finish before installer stage. Attached is existing diagram, proposed one to be created.
Either declarative or scripted is fine. .

Please share your ideas and thanks for taking time to look into this issue. I appreciate your response. Thank you.

pipeline {
    agent any
    environment {
        //TODO - this will apply to steps within this file    
    }
    stages {
        stage('Preparation') {
            steps {
                echo 'First stage'
            }//step for stage
        }
        stage ('parallel-1') {
            parallel {
                stage ('8') {
                    steps {
                        echo "stage-8" 
                        }
                    }
                stage ('7 6 5') {
                    stages ('stage Libraries'){
                        stage ('stage 7') { 
                            steps {
                                echo "stage 7"
                                }
                            }
                        stage ('stage 6'){
                            steps {
                                echo "stage 6"
                            }
                        }
                        stage ('stage 5'){
                            steps {
                            echo "stage 5"
                            }
                        }
                    }
                }
                stage ("stage 9") {
                    steps {
                        echo 'stage 9'
                    }

                }
            }
        }                
        stage ('parallel-2'){
            parallel  {
                stage ("stage 2") {
                    steps {
                        echo 'stage 2'
                    }
                }
                stage ("stage 3") {
                    steps {
                        echo 'stage 3'
                    }
                }
                stage ("stage 4") {
                    steps {
                        echo 'stage 4'
                    }
                }
            }
        }
        stage ('installer jackpot'){
            steps {
                echo 'inside jackpot'
            }
        }
    }
}

--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/7e4b02c5-a379-4a2a-a701-ec4108a81bc8%40googlegroups.com.

Capture.JPG (24K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

RE: jenkins pipeline - how to add another parallel to 2 other parallel.

Christian.Beushausen

Hi Prashanth,

 

my understanding:
What you want to achieve is not possible with declarative pipeline.

You should be able to get this done with a scripted pipeline though. Note: Blue Ocean is not able to represent it.

 

Mit freundlichen Gruessen/Best regards,

Christian Beushausen
I S&T PD SW SWF
Interior Systems & Technology

Besucheradresse / Visitor address:
Continental Automotive GmbH
Philipsstrasse 1, 35576 Wetzlar, Germany

Rechnungsadresse / Invoice address:
Continental Automotive GmbH
Philipsstrasse 1, 35576 Wetzlar, Germany

Phone: +49 6441 370-9031
Mobile: +49 151 746 602 27
Fax: +49 6441 37013-9031
E-Mail:
[hidden email]

<$$014!>

 

From: [hidden email] <[hidden email]> On Behalf Of Prashanth Linga
Sent: Dienstag, 10. September 2019 21:25
To: Jenkins Users <[hidden email]>
Subject: jenkins pipeline - how to add another parallel to 2 other parallel.

 

Hello friends / Jenkins Users,

I want stage 9 to be parallel to first and second parallel. stage 9 should finish before installer stage. Attached is existing diagram, proposed one to be created.

Either declarative or scripted is fine. .

 

Please share your ideas and thanks for taking time to look into this issue. I appreciate your response. Thank you.

 

pipeline {

    agent any

    environment {

        //TODO - this will apply to steps within this file    

    }

    stages {

        stage('Preparation') {

            steps {

                echo 'First stage'

            }//step for stage

        }

        stage ('parallel-1') {

            parallel {

                stage ('8') {

                    steps {

                        echo "stage-8" 

                        }

                    }

                stage ('7 6 5') {

                    stages ('stage Libraries'){

                        stage ('stage 7') { 

                            steps {

                                echo "stage 7"

                                }

                            }

                        stage ('stage 6'){

                            steps {

                                echo "stage 6"

                            }

                        }

                        stage ('stage 5'){

                            steps {

                            echo "stage 5"

                            }

                        }

                    }

                }

                stage ("stage 9") {

                    steps {

                        echo 'stage 9'

                    }

 

                }

            }

        }                

        stage ('parallel-2'){

            parallel  {

                stage ("stage 2") {

                    steps {

                        echo 'stage 2'

                    }

                }

                stage ("stage 3") {

                    steps {

                        echo 'stage 3'

                    }

                }

                stage ("stage 4") {

                    steps {

                        echo 'stage 4'

                    }

                }

            }

        }

        stage ('installer jackpot'){

            steps {

                echo 'inside jackpot'

            }

        }

    }

}

--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/7e4b02c5-a379-4a2a-a701-ec4108a81bc8%40googlegroups.com.


https://www.continental.com
________________________________________________________________________

Continental Automotive GmbH, Vahrenwalder Str. 9, D-30165 Hannover
Vorsitzender des Aufsichtsrats/Chairman of the Supervisory Board: Helmut Matschi
Geschaeftsfuehrer/Managing Director: Georg Sistermanns, Harald Stuhlmann
Sitz der Gesellschaft/Registered Office: Hannover
Registergericht/Registered Court: Amtsgericht Hannover, HRB 59424
USt.-ID-Nr./VAT-ID-No. DE814950663

______________________________________________________________________

Proprietary and confidential. Distribution only by express authority of Continental AG or its subsidiaries.

--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/AM6PR03MB4774409E27AE441B60A2BB13CFB10%40AM6PR03MB4774.eurprd03.prod.outlook.com.
Reply | Threaded
Open this post in threaded view
|

Re: jenkins pipeline - how to add another parallel to 2 other parallel.

PrashantL
In reply to this post by PrashantL
Thanks and I appreciate your reply.

Do you have a example to build this up in both scripted and declarative pipeline.

Best regards,
Prashanth

On Wednesday, September 11, 2019 at 4:59:17 AM UTC-5, Prashanth Linga wrote:
Hello friends / Jenkins Users,
I want stage 9 to be parallel to first and second parallel. stage 9 should finish before installer stage. Attached is existing diagram, proposed one to be created.
Either declarative or scripted is fine. .

Please share your ideas and thanks for taking time to look into this issue. I appreciate your response. Thank you.

pipeline {
    agent any
    environment {
        //TODO - this will apply to steps within this file    
    }
    stages {
        stage('Preparation') {
            steps {
                echo 'First stage'
            }//step for stage
        }
        stage ('parallel-1') {
            parallel {
                stage ('8') {
                    steps {
                        echo "stage-8" 
                        }
                    }
                stage ('7 6 5') {
                    stages ('stage Libraries'){
                        stage ('stage 7') { 
                            steps {
                                echo "stage 7"
                                }
                            }
                        stage ('stage 6'){
                            steps {
                                echo "stage 6"
                            }
                        }
                        stage ('stage 5'){
                            steps {
                            echo "stage 5"
                            }
                        }
                    }
                }
                stage ("stage 9") {
                    steps {
                        echo 'stage 9'
                    }

                }
            }
        }                
        stage ('parallel-2'){
            parallel  {
                stage ("stage 2") {
                    steps {
                        echo 'stage 2'
                    }
                }
                stage ("stage 3") {
                    steps {
                        echo 'stage 3'
                    }
                }
                stage ("stage 4") {
                    steps {
                        echo 'stage 4'
                    }
                }
            }
        }
        stage ('installer jackpot'){
            steps {
                echo 'inside jackpot'
            }
        }
    }
}

--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/7bcf14d8-9471-4c07-899d-9a15b11b9c00%40googlegroups.com.