i'm trying to automate the configuration of my jenkins under docker. I have a yml configuration file that works with the plugin Configuration as Code JCASC, which trigger a groovy script where i create my jobs. I want to create a seed job from here, IDK if i well understanded the point of a seed job but in my mind, that's a job that create other jobs. (That is what i want to do, i pass arguments to a job that reate some other jobs using the args.)
i've tried to put a new job in the step of another one:
job('Tools/SEED') {
parameters {
stringParam('GITHUB_NAME', null, "GitHub repository owner/repo_name (e.g.: \"Grainbox/chocolatine\")")
stringParam('DISPLAY_NAME', null, "Display name for the job")
}
steps {
dsl {
text('job ("test") { shell("echo hello") }')
}
}
}
but i've got this error message:
Running as SYSTEM Building in workspace /var/jenkins_home/workspace/Tools/SEED Processing provided DSL script ERROR: script not yet approved for use Finished: FAILURE
PS: Because i want to automate the configuration, i cannot use the UI to do it, i need my docker to be working right after the first time it has been compiled.
Any idea on how to do it?