Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/gfleury/jenkins-tsuru-client-plugin
Tsuru.io client DSL plugin for Jenkins pipeline
https://github.com/gfleury/jenkins-tsuru-client-plugin
dsl jenkins plugin tsuru
Last synced: 2 months ago
JSON representation
Tsuru.io client DSL plugin for Jenkins pipeline
- Host: GitHub
- URL: https://github.com/gfleury/jenkins-tsuru-client-plugin
- Owner: gfleury
- License: mit
- Created: 2017-12-29T23:15:25.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2023-08-30T13:20:36.000Z (over 1 year ago)
- Last Synced: 2024-05-21T13:25:28.161Z (9 months ago)
- Topics: dsl, jenkins, plugin, tsuru
- Language: Java
- Size: 72.3 KB
- Stars: 4
- Watchers: 1
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# jenkins-tsuru-client-plugin
This project provides access to Tsuru API from Jenkins through pipeline DSL.
NOTE: This plugin does NOT require the tsuru-client binary be present.
Based on https://github.com/openshift/jenkins-plugin
You will need https://github.com/gfleury/tsuru-client-java
Example of Jenkinsfile creating one Application per pull request and later after merging the PR deploying on integration:
```
pipeline {agent any
stages {
stage('Create and Deploy PR integration App') {
when {
allOf {
not {
branch 'master'
}
expression {
return env.BRANCH_NAME.startsWith("PR-")
}
expression {
return env.CHANGE_TARGET.equals("integration")
}
}
}
steps {
script {
tsuru.withAPI('tsuru-integration') {
tsuru.connect()
appName = tsuru.createPRApp(env.JOB_NAME.tokenize('/')[1], env.BRANCH_NAME)
tsuru.deploy(appName, createDeployMessage(env))
}
}
}}
stage('Deploying Integration') {
when {
branch 'integration'
}
steps {
script {
tsuru.withAPI('tsuru-integration') {
appName = env.JOB_NAME.tokenize('/')[1]
tsuru.connect()
tsuru.deploy(appName, createDeployMessage(env))
}
}
}}
}
}
post {
success {}
}
}
```