Hi,
I currently have a simple Pipeline Script which looks more or less like this (reduced to the important parts)
node {
stage ('First') {
// Creating a list of names names = [ "a", "b", "c" ]
Job.create(this, names)
}
}
Furthermore I have create a global pipeline lib which contains the class Job like this:
class Job {
static final void create (def context, def names) {
names.each { name ->
context.jobDsl scriptText: "job('" + name + "')"
}
}
}
Unfortunately this fails all the time that the script needed to be approved by the administrator. Based on the documentation I had expected that I can simply run that...cause the global lib in Jenkins will be trusted by default...
Or do I need to go another path to create jobs from a Pipeline script ?
Kind regards
Karl Heinz Marbaise