Skip to content

Instantly share code, notes, and snippets.

@tizki
Last active September 7, 2016 19:04
Show Gist options
  • Save tizki/9fe793a136c8d981f46472d24b246125 to your computer and use it in GitHub Desktop.
Save tizki/9fe793a136c8d981f46472d24b246125 to your computer and use it in GitHub Desktop.
This script shows how to get see which Actions a job has, and how to get an Action instance
/* This script shows how to get see which Actions a job has, and how to get an Action instance */
def jenkins = Jenkins.getInstance()
def jobName = "myJob"
def job = jenkins.getItem(jobName)
println "Job's actions: ${job.getActions()}" //The result is depended on which Jenkins plugins are installed
println "ParametersDefinitionProperty instance: ${job.getAction(hudson.model.ParametersDefinitionProperty.class)}"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment