I've seen it used in a 'when' condition - in this example online:
https://github.com/sta-szek/pojo-tester/blob/master/Jenkinsfile
Here is an extract from that:
when {
expression {
boolean publish = false
if (env.DEPLOYPAGES == "true") {
return true
}
try {
timeout(time: 1, unit: 'MINUTES') {
input 'Deploy pages?'
publish = true
}
} catch (final ignore) {
publish = false
}
return publish
}
}
But is doesn't seem to usable as a 'first class' step in a steps section
without dropping into script.
Bill
On Thursday, 2 March 2017 06:34:06 UTC, Bert wrote:
>
> Hello everyone,
>
> One of the CloudBees support articles
> <https://support.cloudbees.com/hc/en-us/articles/204986450?page=1#comment_115000395648>
>
> describes how to do a user input in a pipeline script, as alternative for
> the promoted builds plug-in. I'm trying to do that, but then with a
> declarative pipeline definition.
>
> I know that's possible through a script block inside the pipeline
> definition, but I'd like to prevent that and stay in the declarative model.
>
> Is that possible?
>
> Thanks in advance,
> Bert
>
--
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/ab3fdb40-1943-4c64-b0a6-e9de729d3a1d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.