Skip to content

Instantly share code, notes, and snippets.

@aaclarker
Last active August 22, 2022 09:33
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save aaclarker/75b8a0eb2b4d600779f84f8e849f2c37 to your computer and use it in GitHub Desktop.
Save aaclarker/75b8a0eb2b4d600779f84f8e849f2c37 to your computer and use it in GitHub Desktop.
Check if Jenkins build was started by timer (Declarative Pipeline)
def started_by_timer = currentBuild.getBuildCauses()[0]["shortDescription"].matches("Started by timer")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment