Last active
April 9, 2018 07:33
-
-
Save foxutech/c3bfe009749c3ae43aec4417a11b4756 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
node { | |
stage 'checkout' | |
git 'https://gitlab.com/motoskia/hello-world.git' | |
stage 'build' | |
sh 'mvn clean install' | |
stage('Results - 1') { | |
junit '**/target/surefire-reports/TEST-*.xml' | |
archive 'target/*.jar' | |
} | |
stage 'bake image' | |
docker.withRegistry('https://registry.hub.docker.com','docker-hub-credentials') { | |
def image = docker.build("foxutech/foxdevops:${env.BUILD_TAG}",'.') | |
stage 'test image' | |
image.withRun('-p 8888:8888') {springboot -> | |
sh 'while ! httping -qc1 http://localhost:8888/info; do sleep 1; done' | |
git 'https://github.com/motoskia/petclinicacceptance.git' | |
sh 'mvn clean verify' | |
} | |
stage('Results') { | |
junit '**/target/surefire-reports/TEST-*.xml' | |
archive 'target/*.jar' | |
} | |
stage 'push image' | |
image.push() | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment