[JIRA] (JENKINS-58236) Provide mechanism to define dynamic stages in declarative pipelines
Title: Message Title Hendrik Halkow commented on JENKINS-58236 Re: Provide mechanism to define dynamic stages in declarative pipelines This is pretty much the same as my first example that I don't want because of the explained reasons. Add Comment This message was sent by Atlassian Jira (v7.13.6#713006-sha1:cc4451f) -- You received this message because you are subscribed to the Google Groups "Jenkins Issues" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-issues/JIRA.200297.1561627989000.7548.1569804660215%40Atlassian.JIRA.
[JIRA] (JENKINS-58236) Provide mechanism to define dynamic stages in declarative pipelines
Title: Message Title KY Lee commented on JENKINS-58236 Re: Provide mechanism to define dynamic stages in declarative pipelines There is a way to achieve this. See this response: https://stackoverflow.com/a/51308400/795137 The way he described is to create these dynamic stages within script closure. Wrap it around in a parallel closure and it should get what you want. Add Comment This message was sent by Atlassian Jira (v7.13.6#713006-sha1:cc4451f) -- You received this message because you are subscribed to the Google Groups "Jenkins Issues" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-issues/JIRA.200297.1561627989000.7517.1569797640258%40Atlassian.JIRA.
[JIRA] (JENKINS-58236) Provide mechanism to define dynamic stages in declarative pipelines
Title: Message Title Hokwang Lee commented on JENKINS-58236 Re: Provide mechanism to define dynamic stages in declarative pipelines The number of Dockerfile is increasing more and more, so this feature is really needed and important to all users. Add Comment This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d) -- You received this message because you are subscribed to the Google Groups "Jenkins Issues" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-issues/JIRA.200297.1561627989000.3163.1567161840215%40Atlassian.JIRA.
[JIRA] (JENKINS-58236) Provide mechanism to define dynamic stages in declarative pipelines
Title: Message Title Hendrik Halkow updated an issue Jenkins / JENKINS-58236 Provide mechanism to define dynamic stages in declarative pipelines Change By: Hendrik Halkow Hello, it would be great if we had a mechanism to define dynamic stages within declarative pipelines. The use case is that I want to create a pipeline function for micro service repositories. Each repository contains a number of container images that needs to be built in parallel. The only way I found is using the these pseudo stages wrapped by the `parallel` step:{code}pipeline { agent any stages {stage('build') { steps {runParallel items: ("a".."f").collect { "Stage ${it}" } }} }}def runParallel(args) { parallel args.items.collectEntries { name -> [ "${name}": {stage("${name}") { echo name} }]}}{code}This is bad because the sub-stages can neither have an agent nor contain other sub-stages. And it requires a separate function (I couldn't get it working without). On the other hand, this shouldn't make the declarative pipeline too scripty. A minimal scriptiness approach would look like this:{code}pipeline { agent none stages {stage('build') { stages {("A".."F").collect { stage("Stage ${it}") {agent anysteps { echo "Hello from stage ${it}!"} }} }} }}{code} Add Comment This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d)
[JIRA] (JENKINS-58236) Provide mechanism to define dynamic stages in declarative pipelines
Title: Message Title Hendrik Halkow created an issue Jenkins / JENKINS-58236 Provide mechanism to define dynamic stages in declarative pipelines Issue Type: Improvement Assignee: Andrew Bayer Components: pipeline, pipeline-model-definition-plugin Created: 2019-06-27 09:33 Priority: Major Reporter: Hendrik Halkow Hello, it would be great if we had a mechanism to define dynamic stages within declarative pipelines. The use case is that I want to create a pipeline function for micro service repositories. Each repository contains a number of container images that needs to be built in parallel. The only way I found is using the these pseudo stages wrapped by the `parallel` step: pipeline { agent any stages { stage('build') { steps { runParallel items: ("a".."f").collect { "Stage ${it}" } } } } } def runParallel(args) { parallel args.items.collectEntries { name -> [ "${name}": { stage("${name}") { echo name } }]} } This is bad because the sub-stages can neither have an agent nor contain other sub-stages. And it requires a On the other hand, this shouldn't make the declarative pipeline too scripty. A minimal scriptiness approach would look like this: pipeline { agent none stages { stage('build') { stages { ("A".."F").collect { stage("Stage ${it}") { agent any steps { echo "Hello from stage ${it}!" } } } } } } }