From 1da2d025a905eac075c21b87f6f5b5a38d034311 Mon Sep 17 00:00:00 2001 From: Mali Bayhan Date: Fri, 10 Dec 2021 08:59:54 -0800 Subject: [PATCH] pact-test Sync Repo --- Jenkinsfile | 35 ++++++++++++++++++++++++----------- 1 file changed, 24 insertions(+), 11 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 10596b6..ca94d76 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -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}' }