Update Jenkinsfile

This commit is contained in:
Andrew Pitt 2020-03-16 16:56:42 -04:00 committed by GitHub
parent 18628bb833
commit 6cf1abc20c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

18
Jenkinsfile vendored
View file

@ -30,25 +30,17 @@ pipeline {
}
stage('Build JAR') {
steps {
echo "Build the app."
echo "Build app. Version: ${projectVersion}"
sh "mvn clean package"
}
}
stage('Quality Check') {
steps {
sh "mvn clean org.jacoco:jacoco-maven-plugin:prepare-agent install -Dmaven.test.failure.ignore=false"
sh "mvn sonar:sonar -Dsonar.jacoco.reportPaths=target/coverage-reports/jacoco-unit.exec -Dsonar.host.url=http://sonarqube.cicd.svc:9000"
// sh "mvn org.cyclonedx:cyclonedx-maven-plugin:makeBom"
//dependencyTrackPublisher(artifact: 'target/bom.xml', artifactType: 'bom', projectName: "${appName}", projectVersion: "${projectVersion}", synchronous: false)
}
}
stage('Build Image') {
steps {
script {
echo "Build container image."
openshift.withCluster() {
openshift.withProject('cicd') {
sh "oc start-build ${appName}-s2i-build --from-file=target/app.jar -n cicd --follow"
sh "oc start-build ${appName}-build --from-file=target/app.jar -n cicd --follow"
}
}
}
@ -77,12 +69,6 @@ pipeline {
}
}
}
stage('Integration Tests') {
steps {
echo "Running Integration tests..."
sh "mvn verify -Pfailsafe"
}
}
stage("Tag UAT") {
echo "Tag image to UAT"
openshift.withCluster() {