I have an input step in a declarative pipeline and I want to add some logic
so that if the input step waits too long for someone to proceed, it will
send a reminder notification and loop, starting a new timeout.

What I have so far is this:

waitUntil {
          timeout(time: 3, unit: 'MINUTES' ) {
            input message: "Deploy ${CODE} codebase to ${ENVIRONMENT}?",
ok: 'Deploy'
          }
          slackSend (channel: "${slack_channel}", color: 'good', message:
"Notification: ${env.JOB_NAME} is waiting for deployment")
}

Unfortunately, I don't know how to trigger a 'FALSE' when the timeout is
exceeded - which, as I understand it, is what is required to cause the
waitUntil to loop again. I initially had return statements in the above
code, but jenkins was giving me an error "Expected a step" when it hit them.

How would I make the code above loop until the user hits the 'Deploy'
option for the input step?

Thanks,
Guy

-- 
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/CANNH9msHdyQJzshWq1NTqwdGNLBD6YewZRgqRNtGAwjT%3DcR7dA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to