-
Improvement
-
Resolution: Fixed
-
Major
-
Jenkins ver. 2.138.2
I try to improve visualization for pipeline.
I want skip stage and mark skip stage as skip.
But using Skripted Pipeline i must approve signature.
staticMethod org.jenkinsci.plugins.pipeline.modeldefinition.Utils markStageSkippedForConditional java.lang.String
Using it:
import org.jenkinsci.plugins.pipeline.modeldefinition.Utils map_dev = ["dev", "qa", "stage" ,"perf"] prodPromoter = null map_dev.each { stage("${it}") { try{ prodPromoter = input(message: "Deploy ${it}") } catch(e){ Utils.markStageSkippedForConditional("${it}") } } }
I now that i can using Declarative Pipeline like this:
when { expression { try { devPromoter = input(message: "Deploy") } catch(e) { return false } } } steps { }
BUT, Could you please just add Utils.markStageSkippedForConditional to @whitelist ?
Because Scripted pipleine more readable and flexible for me...
Thank you for advance!
- relates to
-
JENKINS-47286 Support skipping stages in scripted pipelines for nice visualization in blue ocean and classic UI stage view
-
- Closed
-
- links to
[JENKINS-54322] Add ability SKIP stage in script pipeline
Description |
Original:
I try to improve visualization for pipeline. I want skip stage and mark skip stage as skip. But using Skripted Pipeline i must approve signature. {code:java} staticMethod org.jenkinsci.plugins.pipeline.modeldefinition.Utils markStageSkippedForConditional java.lang.String{code} Using it: {code:java} import org.jenkinsci.plugins.pipeline.modeldefinition.Utils map_dev = ["dev", "qa", "stage" ,"perf"] prodPromoter = null map_dev.each { stage("${it}") { try{ prodPromoter = input(message: "Deploy ${it}") } catch(e){ Utils.markStageSkippedForConditional("${it}") } } } {code} I now that i can using Declarative Pipeline like this: {code:java} when { expression { try { devPromoter = input(message: "Deploy") } catch(e) { return false } } } steps { } {code} BUT, can you just add Utils.markStageSkippedForConditional to @whitelist ? Because Scripted pipleine more readable and flexible for me... Thank you for advance! |
New:
I try to improve visualization for pipeline. I want skip stage and mark skip stage as skip. But using Skripted Pipeline i must approve signature. {code:java} staticMethod org.jenkinsci.plugins.pipeline.modeldefinition.Utils markStageSkippedForConditional java.lang.String{code} Using it: {code:java} import org.jenkinsci.plugins.pipeline.modeldefinition.Utils map_dev = ["dev", "qa", "stage" ,"perf"] prodPromoter = null map_dev.each { stage("${it}") { try{ prodPromoter = input(message: "Deploy ${it}") } catch(e){ Utils.markStageSkippedForConditional("${it}") } } } {code} I now that i can using Declarative Pipeline like this: {code:java} when { expression { try { devPromoter = input(message: "Deploy") } catch(e) { return false } } } steps { } {code} BUT, Could you please just add Utils.markStageSkippedForConditional to @whitelist ? Because Scripted pipleine more readable and flexible for me... Thank you for advance! |
Labels | Original: Script jekins pipleine | New: Script jenkins pipeline |
Component/s | New: pipeline-stage-step-plugin [ 21709 ] | |
Component/s | Original: pipeline [ 21692 ] |
Link |
New:
This issue relates to |
Assignee | New: Victor Martinez [ v2v ] |
Status | Original: Open [ 1 ] | New: In Progress [ 3 ] |
Status | Original: In Progress [ 3 ] | New: In Review [ 10005 ] |
Remote Link | New: This issue links to "PR (Web Link)" [ 23325 ] |
Resolution | New: Fixed [ 1 ] | |
Status | Original: In Review [ 10005 ] | New: Resolved [ 5 ] |