[JIRA] (JENKINS-49947) unclear usage of input step in declarative pipeline
Title: Message Title Liam Newman closed an issue as Duplicate Bulk closing resolved issues. Jenkins / JENKINS-49947 unclear usage of input step in declarative pipeline Change By: Liam Newman Status: Resolved Closed 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.188939.1520330902000.16527.1571801053148%40Atlassian.JIRA.
[JIRA] (JENKINS-49947) unclear usage of input step in declarative pipeline
Title: Message Title Fernando Nasser commented on JENKINS-49947 Re: unclear usage of input step in declarative pipeline OK, just for the sake of people who look at this JIRA. How do we get when first, input after ? How do we get input first, when after ? 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. For more options, visit https://groups.google.com/d/optout.
[JIRA] (JENKINS-49947) unclear usage of input step in declarative pipeline
Title: Message Title Andrew Bayer resolved as Duplicate We're adding the ability to have when be evaluated before input runs over at JENKINS-50880. Jenkins / JENKINS-49947 unclear usage of input step in declarative pipeline Change By: Andrew Bayer Status: Open Resolved Resolution: Duplicate 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. For more options, visit https://groups.google.com/d/optout.
[JIRA] (JENKINS-49947) unclear usage of input step in declarative pipeline
Title: Message Title Fernando Nasser commented on JENKINS-49947 Re: unclear usage of input step in declarative pipeline Perhaps add a 'when' configuration option to the 'input' directive? This way we could skip the input for certain cases (like for Liam's prod stage) or even have a different input for each case by playing with the right 'when' conditions. 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. For more options, visit https://groups.google.com/d/optout.
[JIRA] (JENKINS-49947) unclear usage of input step in declarative pipeline
Title: Message Title Liam Fitzpatrick commented on JENKINS-49947 Re: unclear usage of input step in declarative pipeline I have a similar issue to Fernando Nasser. I have 2 parallel stages, one for dev and one for prod and a when condition determines which stage to run based on the environment. I want to prompt for input in the prod stage only but as the input happens before the when I get prompted for input in regardless of the environment, 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. For more options, visit https://groups.google.com/d/optout.
[JIRA] (JENKINS-49947) unclear usage of input step in declarative pipeline
Title: Message Title Fernando Nasser edited a comment on JENKINS-49947 Re: unclear usage of input step in declarative pipeline Is it possible to distinguish between input \{ # manual approval of release } when \{ # the release is approved } and when \ { # the release is approved } input \{ # manual approval of release } And make the order of appearance determine what prevails? I realize that probably there is no notion of ordering for these declarations, only for stage inside stages (several elements of the same type can be ordered). Perhaps an input condition to use inside when?Or an argument to input to tell it to run after when?Of course if this is used the input value cannot be used in the when condition. I am trying to suggest something here as I have already hit the situation where I wanted them reversed, and I guess we'l have something like 50-50% of us wanting it one way or the other. Add Comment This message was sent by Atlassian JIRA (v7.10.1#710002-sha1:6efc396) -- 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. For more options, visit https://groups.google.com/d/optout.
[JIRA] (JENKINS-49947) unclear usage of input step in declarative pipeline
Title: Message Title Fernando Nasser commented on JENKINS-49947 Re: unclear usage of input step in declarative pipeline Is it possible to distinguish between input { manual approval of release } when { the release is approved } and when { # the release is approved } input { manual approval of release } And make the order of appearance determine what prevails? Add Comment This message was sent by Atlassian JIRA (v7.10.1#710002-sha1:6efc396) -- 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. For more options, visit https://groups.google.com/d/optout.
[JIRA] (JENKINS-49947) unclear usage of input step in declarative pipeline
Title: Message Title Andrew Bayer commented on JENKINS-49947 Re: unclear usage of input step in declarative pipeline Andreas Klemp - Yeah, https://github.com/jenkinsci/pipeline-model-definition-plugin/pull/227 (which will hopefully merge/release next month) will give you a better approach. Add Comment This message was sent by Atlassian JIRA (v7.3.0#73011-sha1:3c73d0e) -- 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. For more options, visit https://groups.google.com/d/optout.
[JIRA] (JENKINS-49947) unclear usage of input step in declarative pipeline
Title: Message Title Andreas Klemp commented on JENKINS-49947 Re: unclear usage of input step in declarative pipeline The nested stage is an interesting hint. As far as I see, this is only possible with parallel, so ... yeah ... not optimal. But I'll give it a try with something like this. The downside is, that still only one (sequential) stage can be created. stage('Release Approval') { when { branch 'master' } parallel { stage('Release') { input { # manual approval of release } when { # the release is approved } steps { # release and deployment } } } } Add Comment This message was sent by Atlassian JIRA (v7.3.0#73011-sha1:3c73d0e) -- 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. For more options, visit https://groups.google.com/d/optout.
[JIRA] (JENKINS-49947) unclear usage of input step in declarative pipeline
Title: Message Title Andrew Bayer commented on JENKINS-49947 Re: unclear usage of input step in declarative pipeline The ability to skip multiple stages for a single input result will come along as part of JENKINS-46809 - the architecture makes it not viable to have something that happens in a stage (input, environment, etc) actually carry over as an environment variable to other sibling stages, but sequential nested stages will let you say "here's a parent stage with an input and a when - if the when passes, run this list of other stages". Ordering is hard. =) I made the call that there was more value in having the result of input available for when than avoiding the input directive if an unrelated when condition was false. It was either input and then when in evaluation order, or when and then input, so...yeah. Again, once JENKINS-46809 lands, you could do a "parent" stage with the branch when condition, with a single nested stage with the input-based when condition. Not the most elegant syntax, sure, but trade-offs have to be made in order to have the opinionated behavior and structure Declarative provides. Add Comment This message was sent by Atlassian JIRA (v7.3.0#73011-sha1:3c73d0e) -- 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. For more options, visit https://groups.google.com/d/optout.
[JIRA] (JENKINS-49947) unclear usage of input step in declarative pipeline
Title: Message Title Andrew Bayer assigned an issue to Andrew Bayer Jenkins / JENKINS-49947 unclear usage of input step in declarative pipeline Change By: Andrew Bayer Assignee: Andrew Bayer Add Comment This message was sent by Atlassian JIRA (v7.3.0#73011-sha1:3c73d0e) -- 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. For more options, visit https://groups.google.com/d/optout.
[JIRA] (JENKINS-49947) unclear usage of input step in declarative pipeline
Title: Message Title Andrew Bayer updated an issue Jenkins / JENKINS-49947 unclear usage of input step in declarative pipeline Change By: Andrew Bayer Component/s: pipeline-model-definition-plugin Component/s: pipeline Add Comment This message was sent by Atlassian JIRA (v7.3.0#73011-sha1:3c73d0e) -- 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. For more options, visit https://groups.google.com/d/optout.
[JIRA] (JENKINS-49947) unclear usage of input step in declarative pipeline
Title: Message Title Andreas Klemp created an issue Jenkins / JENKINS-49947 unclear usage of input step in declarative pipeline Issue Type: Bug Assignee: Unassigned Components: pipeline Created: 2018-03-06 10:08 Environment: Jenkins 2.89.4 Labels: pipeline input when environment Priority: Minor Reporter: Andreas Klemp How is the input step intended to be used in a declarative pipeline using a separate block (JENKINS-48379)? There are several issues with this. The result of the input can only be used in the current stage. Thus, it is not possible to skip multiple stages or use the input value in multiple stages. input and when cannot be combined in all cases. Currently, the result of input can be used in when to skip the stage (cool!). However, if the stage is skipped because of some other criteria, the input is still requested. input cannot be used inside the stage steps as a workaround because the agent would be blocked and it cannot be separated to two steps (approval without agent, handling with agent) because the input result is stage-local. If I missed something and the issues can be solved, it would be nice to know and the documentation should be more clear about this. Currently, it seems impossible to create a declarative pipeline with a manual approval step befo