>From what I understand neither concurrent stages nor stages embedded in stages 
>are supported.
I think you can only have parrallel within a stage block. But not the other way 
around.

________________________________________
From: jenkinsci-users@googlegroups.com <jenkinsci-users@googlegroups.com> on 
behalf of Chris Overend <chris.over...@vectorcast.com>
Sent: 05 June 2017 18:29:53
To: Jenkins Users
Subject: many parallel stages

Hello,
I was looking for help with a many parallel pipeline.
Here is what I am looking to do

parallel(
    'linux': {
        stage('build_linux') {
            build job: 'linux_build', parameters:[]
            build job: 'linux_archive', parameters:[]
            parallel(
                stage('test1_linux') {
                    build job: 'test1_setup1', parameters:[]
                    build job: 'test1_setup2', parameters:[]
                    parallel(
                        many_builds...
                    )
                    build job: 'test1_finish', parameters:[]
                }
                stage('test2_linux') {
                    build job: 'test2_setup1', parameters:[]
                    build job: 'test2_setup2', parameters:[]
                    parallel(
                        many_builds...
                    )
                    build job: 'test2_finish', parameters:[]
                }
            )
        }
    },
    'windows': {
        stage('build_windows') {
            build job: 'windows_build', parameters:[]
            build job: 'windows_archive', parameters:[]
            parallel(
                stage('test1_windows') {
                    build job: 'test1_setup1', parameters:[]
                    build job: 'test1_setup2', parameters:[]
                    parallel(
                        many_builds...
                    )
                    build job: 'test1_finish', parameters:[]
                }
                stage('test2_windows') {
                    build job: 'test2_setup1', parameters:[]
                    build job: 'test2_setup2', parameters:[]
                    parallel(
                        many_builds...
                    )
                    build job: 'test2_finish', parameters:[]
                }
            )
        }
    }
)

As you see most pieces are the same so I tried something like

parallel(
    'linux': {
        generate_build('linux')
        parallel(
            generate_tests('test1')
            generate_tests('test2')
        )
    },
    'windows': {
        generate_build('windows')
        parallel(
            generate_tests('test1')
            generate_tests('test2')
            generate_tests('test3')
            generate_tests('test4')
       )
    },
)

def generate_build(system) {
    build job: system + '_build', parameters:[]
    build job: system + '_archive', parameters:[]
}

def generate_tests(tests) {
    build job: tests + '_setup1', parameters:[]
    build job: tests + '_setup2', parameters:[]
        parallel(
            many_builds...
         )
     build job: tests + '_finish', parameters:[]
}

the generate_build ran in parallel , but the generate_tests did not run in 
parallel

should I be using a map of maps?


--
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 
jenkinsci-users+unsubscr...@googlegroups.com<mailto:jenkinsci-users+unsubscr...@googlegroups.com>.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/32f034ba-70d4-4812-b63b-213827169081%40googlegroups.com<https://groups.google.com/d/msgid/jenkinsci-users/32f034ba-70d4-4812-b63b-213827169081%40googlegroups.com?utm_medium=email&utm_source=footer>.
For more options, visit https://groups.google.com/d/optout.

-- 
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 jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/3f566bbc93e14da68abd19575e7a870f%40partner.eso.org.
For more options, visit https://groups.google.com/d/optout.

Reply via email to