Skip to content

Instantly share code, notes, and snippets.

@mkutz
Created February 27, 2018 08:50
Show Gist options
  • Save mkutz/7d02d87ad29fdd351a7f7e8c8b69d7ae to your computer and use it in GitHub Desktop.
Save mkutz/7d02d87ad29fdd351a7f7e8c8b69d7ae to your computer and use it in GitHub Desktop.
This Seedjob creates a (single branch) pipeline for Maven library release job.
#!/usr/bin/env groovy
// see https://jenkinsci.github.io/job-dsl-plugin/ and https://jenkinsci.github.io/job-dsl-plugin/#path/pipelineJob
pipelineJob("my-maven-lib") {
displayName("My Maven Lib")
definition {
cpsScm {
scm {
git {
remote {
url("...")
branch("*/master")
}
extensions {
localBranch("master")
}
}
}
scriptPath("Jenkinsfile")
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment