openshit-hello-world/deployment/Jenkinsfile
Sander Hautvast e3b8996d07 first commit
2021-04-26 15:55:20 +02:00

35 lines
No EOL
1 KiB
Groovy

pipeline{
agent none
options {
skipDefaultCheckout()
}
stages {
stage('Build') {
stages{
stage('Check out') {
steps {
checkout scm
stash(name: 'hello_world', includes: '**', excludes: '**/.git/**')
}
}
stage('Maven build') {
steps {
unstash 'hello_world'
sh(script: 'mvn -B -f pom.xml clean package -Pdeploy -pl :hello-world -am')
stash(name: 'war', includes: '**')
}
}
stage('Create Build Config'){
when {
expression {
openshift.withCluster(){
return !openshift.selector("bc", "")
}
}
}
}
}
}
}
}