When I run the job I should create a freestyle job with a parameter name and repo.
I already try this but it doesn't work.
freeStyleJob('seed') {
parameters {
stringParam("GITHUB_REPO_NAME", "", "repo_name")
stringParam("JOB_NAME", "", "name for the job")
}
steps {
dsl {
job('\$DISPLAY_NAME') {
}
}
}
}
You can create a job inside a job by using 'text': https://jenkinsci.github.io/job-dsl-plugin/#path/freeStyleJob-steps-dsl-text
steps {
dsl {
text('job ("name") {}')
}
}