You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Jenkins Users
Hi,
i have a conditional step in a build configuration that is triggered by time, e.g. if time is between 1:00 and 2:00.
How do I map that in pipeline script?
Thanks and regards
Stefan
David Karr
unread,
Dec 28, 2016, 6:56:57 PM12/28/16
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to jenkins...@googlegroups.com
It might help to realize that a pipeline script is just Groovy code.
If you need to make sure that something is only executed when the
current time is between 1pm and 2pm, just get the current time,
convert it to hour of day, and have an "if" block comparing that value
against your constraint. You may need to drill down into the details
of how to do each of those pieces, but that's the basic idea.