I am using declarative pipeline syntax to implement continuous integration
and here is a part of the pipeline
stage ('Tag') {
when {
expression {
return releaseVersion()
}
}
agent { label 'master' }
steps {
script {
// tag some stuff
}
}
}
stage ('Promote') {
agent none
steps {
def promote = input message: "Promote to " + nextVersion()
if (promote) {
// need to do some stuff and call 'Tag' stage above again
} else {
// end
}
}
}
*I am not sure how can i re-call a stage again*. I do not have enterprise
edition, so not looking into checkpoint. The tag stage does the same work
but with a different value and hence i do not wish to rewrite that stage
again and again. In regular groovy code, i would define the stage {} inside
a method and i would then just need to call it again. But with declarative
pipeline, things are different.
--
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 [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/jenkinsci-users/8024378c-1f72-4fd3-883c-cf0fe1e782c7%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.