Created
July 7, 2018 19:13
-
-
Save topera/b1b035e99adb34ff64d7b90414d8097b to your computer and use it in GitHub Desktop.
Example of basic Jenkinspipeline
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pipeline { | |
agent { | |
any {} | |
} | |
stages { | |
stage('setup') { | |
steps { | |
sh './gradlew tasks' | |
} | |
} | |
stage('test') { | |
steps { | |
sh './gradlew runClean createVersion test' | |
} | |
} | |
stage('createImage') { | |
when { | |
branch 'master' | |
} | |
steps { | |
sh './gradlew runCreateImage' | |
} | |
} | |
stage('publishImage') { | |
when { | |
branch 'master' | |
} | |
steps { | |
sh './gradlew dockerLogin publishImage' | |
} | |
} | |
stage('deploy') { | |
when { | |
branch 'master' | |
} | |
steps { | |
sh './gradlew fobitDeploy' | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment