Another Jenkinsfile update.

This commit is contained in:
Andrew Pitt 2020-01-06 14:11:18 -05:00
parent 2eeed5fbd4
commit 322469f749

14
Jenkinsfile vendored
View file

@ -22,10 +22,12 @@ pipeline {
echo "Checkout source."
git url: "${gitSourceUrl}", branch: "${gitSourceRef}"
echo "Read POM info."
script {
pom = readMavenPom file: 'pom.xml'
projectVersion = pom.version
}
}
}
stage('Build JAR') {
steps {
echo "Build the app."
@ -42,6 +44,7 @@ pipeline {
}
stage('Build Image') {
steps {
script {
echo "Build container image."
openshift.withCluster() {
openshift.withProject('cicd') {
@ -50,6 +53,7 @@ pipeline {
}
}
}
}
stage('Tag DEV') {
agent {
label 'jenkins-slave-skopeo'
@ -66,6 +70,7 @@ pipeline {
}
stage('Deploy DEV') {
steps {
script {
echo "Deploy to DEV."
openshift.withCluster() {
openshift.withProject("${appName}-dev") {
@ -77,14 +82,18 @@ pipeline {
}
}
}
}
stage('Integration Tests') {
steps {
echo "Running Integration tests..."
sh "mvn verify -Pfailsafe"
}
}
stage('Tag UAT') {
agent {
label 'jenkins-slave-skopeo'
}
steps {
script {
openshift.withCluster() {
withCredentials([usernamePassword(credentialsId: "${openshift.project()}-quay-creds-secret", usernameVariable: "QUAY_USERNAME", passwordVariable: "QUAY_PASSWORD")]) {
@ -93,7 +102,10 @@ pipeline {
}
}
}
}
stage('Deploy UAT') {
steps {
script {
echo "Deploy to UAT."
openshift.withCluster() {
openshift.withProject("${appName}-uat") {
@ -105,4 +117,6 @@ pipeline {
}
}
}
}
}
}