Jenkinsfile v1

This commit is contained in:
Szabó Barnabás 2018-01-29 22:03:31 +01:00
parent 2d70c74ad2
commit 91e6ee71d5

33
Jenkinsfile vendored Normal file
View file

@ -0,0 +1,33 @@
pipeline {
agent any
options {
// Keep only 1 artifact, and many builds
buildDiscarder(logRotator(numToKeepStr: '1000', artifactNumToKeepStr: '0'))
}
stages {
stage('Build the code') {
agent {
docker {
image 'openjdk:8-jdk-alpine'
args '-v $HOME/.m2:/root/.m2'
}
}
steps {
sh './mvnw clean package'
}
}
stage('Create image') {
steps {
sh 'docker build --pull -t loxon/petclinic:2.0.0 .'
sh 'docker push loxon/petclinic:2.0.0'
}
}
}
}