Skip to content

Instantly share code, notes, and snippets.

  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save vinirib/c8ddea074b1bda1f9b6fc81b15a50a53 to your computer and use it in GitHub Desktop.
#!groovy
pipeline {
agent any
environment {
BRANCH_NAME=env.GIT_BRANCH.replace("origin/", "")
}
stages {
stage('Build and Publish Pacts') {
steps {
sh "chmod +x mvnw"
sh './mvnw clean verify pact:publish -Dpact.consumer.version=${GIT_COMMIT} -Dpact.tag=CONTRACT-TEST'
}
}
}
post {
success {
script {
echo "Contract Generated Successful, now trigger Provider check!"
build job: '2-PACT-FLOW-PROVIDER-TEST-CONTRACT-client-api',
propagate: true
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment