Skip to content

Instantly share code, notes, and snippets.

@gschueler
Created February 22, 2016 18:10
Show Gist options
  • Save gschueler/33e55a277d06e3db8160 to your computer and use it in GitHub Desktop.
Save gschueler/33e55a277d06e3db8160 to your computer and use it in GitHub Desktop.
@Grapes(
@Grab(group='org.rundeck', module='rundeck-api-java-client', version='13.1')
)
import org.rundeck.api.*;
def rundeck = RundeckClient.builder().url(args[0]).login(args[1],args[2]).build()
//def rundeck = RundeckClient.builder().url(args[0]).token(args[1]).build()
def project=args[3]
def jobs = rundeck.getJobs(project)
println "Project jobs : ${jobs*.name}\n"
jobs.each{job->
println "Job ${job.name}"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment