mirror of
https://github.com/spring-projects/spring-petclinic.git
synced 2025-07-21 23:05:50 +00:00
Another Jenkinsfile update.
This commit is contained in:
parent
2eeed5fbd4
commit
322469f749
1 changed files with 40 additions and 26 deletions
14
Jenkinsfile
vendored
14
Jenkinsfile
vendored
|
@ -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") {
|
||||
|
@ -106,3 +118,5 @@ pipeline {
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue