pact-test Sync Repo

This commit is contained in:
Mali Bayhan 2021-12-10 08:59:54 -08:00
parent b31c0ad485
commit 1da2d025a9

35
Jenkinsfile vendored
View File

@ -1,7 +1,13 @@
def MAVEN_IMAGE = 'maven:3.8.2-openjdk-11-slim'
pipeline {
agent any
// agent any
agent {
docker {
image "${MAVEN_IMAGE}"
}
}
environment {
BRANCH_NAME = env.GIT_BRANCH.replace('origin/', '')
@ -9,11 +15,11 @@ pipeline {
stages {
stage('Build') {
agent {
docker {
image "${MAVEN_IMAGE}"
}
}
// agent {
// docker {
// image "${MAVEN_IMAGE}"
// }
// }
steps {
git 'https://github.com/mabayhan/sonarqubejava'
sh 'mvn -Dmaven.test.failure.ignore=true clean package'
@ -30,11 +36,11 @@ pipeline {
stage('Static Code Analysis') {
// maven:start
agent {
docker {
image "${MAVEN_IMAGE}"
}
}
// agent {
// docker {
// image "${MAVEN_IMAGE}"
// }
// }
steps {
withSonarQubeEnv('cicd') {
@ -49,6 +55,13 @@ pipeline {
}
stage('Pact'){
// agent {
// docker {
// image "${MAVEN_IMAGE}"
// }
// }
steps{
sh 'mvn pact:publish -Dpact.consumer.version=${GIT_COMMIT} -Dpact.tag=${BRANCH_NAME}'
}