Last active
September 7, 2016 19:04
-
-
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 file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* 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