https://github.com/codecentric/job-dsl-promotions-plugin
Extension point for "JobDSL Plugin" that extends it with "Promoted Builds Plugin" features
https://github.com/codecentric/job-dsl-promotions-plugin
Last synced: about 1 year ago
JSON representation
Extension point for "JobDSL Plugin" that extends it with "Promoted Builds Plugin" features
- Host: GitHub
- URL: https://github.com/codecentric/job-dsl-promotions-plugin
- Owner: codecentric
- Created: 2015-07-23T17:26:45.000Z (almost 11 years ago)
- Default Branch: master
- Last Pushed: 2016-01-14T09:51:29.000Z (over 10 years ago)
- Last Synced: 2025-01-17T15:16:34.005Z (over 1 year ago)
- Language: Java
- Homepage:
- Size: 66.4 KB
- Stars: 14
- Watchers: 17
- Forks: 7
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Promototed Builds Plugin Extension for the Jenkins Job DSL Plugin
This plugin is an extension for the existing [Job DSL Plugin](https://wiki.jenkins-ci.org/display/JENKINS/Job+DSL+Plugin). With this extension it is possible to generate promotions with the Job DSL. See the [Promoted Builds Plugin](https://wiki.jenkins-ci.org/display/JENKINS/Promoted+Builds+Plugin) for further informations about the meaning of Promotions for a Jenkins Job.
## Build
mvn clean install
## Run
mvn hpi:run
## Usage
### Simple example
```groovy
job('promotion-job'){
properties{
promotions{
promotion {
name('dev')
icon('star-gold')
conditions {
manual('developer')
}
actions {
shell('echo hallo;')
}
}
}
}
}
```
### More complex example
```groovy
job('complex-promotion-job'){
properties{
promotions{
promotion {
name('prod')
icon('star-green')
conditions {
manual('changemanager')
}
actions {
downstreamParameterized {
trigger("deploy-job","SUCCESS",false,["buildStepFailure": "FAILURE","failure":"FAILURE","unstable":"UNSTABLE"]) {
predefinedProp("JOB_NAME", "\${PROMOTED_JOB_FULL_NAME}")
predefinedProp("BUILD_ID","\${PROMOTED_NUMBER}")
}
}
maven {
mavenInstallation("Maven 3.0.4")
goals("build-helper:parse-version versions:set versions:commit scm:checkin")
property("newVersion", "\${parsedVersion.majorVersion}.\${parsedVersion.minorVersion}.\${parsedVersion.nextIncrementalVersion}-SNAPSHOT")
property("connectionUrl", "scm:svn:http:/svn.codecentric.de}/test-project")
property("message", "Automatic increment version after release")
}
}
}
}
}
}
```