conditional (or perhaps 'advanced tab') support for templated stages, step-groups, and steps
long-term
G
Gold Orangutan
Problem statement:
When working with templated steps/step-groups/stages, a major aspect of their utility is their capacity to be freely reused in multiple contexts. When working from within the yaml editor, it is possible to apply such constructs as 'when' clauses to templated steps, step-groups, and stages, and having access to these 'when' clauses allow for appropriate data encapsulation. However, this has the drawback that when the reference to the template is updated (whether by explicit change of version or through requiring reconciliation) the 'when' clause is removed (and requires manual review to catch and restore). By contrast, when using the GUI, the only option is to create conditionals which reference variables defined outside their contextual frame, and there is no clear means for templates to advertise which variables they rely upon, nor are there top level decorators exposing how the steps/step-groups/stages
do
run conditionally, when they are templates.Sample use story:
I have a templated step-group which I want to be using, conditional on a value calculated earlier in the pipeline, e.g. 'determined that there is an additional client jar target to build'. I want to be able to use a jexl expression at the top level to directly reference the calculated value (from within the UI), rather than having to rely on conditionals on the template which are blindly referencing variables defined outside their contextual frame, or manually writing the conditional in yaml & needing to worry about possibly losing the conditional when updates take place.
Several possible options:
(*) (minimal) allow for the UI to support some kind of parameter ~slots for conditionals, so that there isn't a need to use blind exterior references when defining template conditions, and update the UI to consistently decorate conditionally executing templated steps/step-groups/stages.
(*) (more general, but has potential issues depending on defaults) establish a way to enable templates to have conditions added to them at the calling level.
This request is directed to both CI and CD pipelines
Log In
Rohan Gupta
long-term
thank you for your request, we woll work to improve the experience of template reference in a pipeline.