master- Sync Repo

This commit is contained in:
Mali Bayhan
2021-12-10 09:48:02 -08:00
parent 7c5cd0e2a4
commit 99e512596a
15 changed files with 535 additions and 0 deletions

44
jenkins/cd/Jenkinsfile vendored Normal file
View File

@@ -0,0 +1,44 @@
#!groovy
pipeline {
agent any
environment {
BRANCH_NAME=env.GIT_BRANCH.replace("origin/", "")
}
stages {
stage('Build') {
steps {
dir('messaging-app') {
sh '../mvnw clean verify'
}
}
}
stage('Publish Pacts') {
steps {
dir('messaging-app') {
sh '../mvnw pact:publish -Dpact.consumer.version=${GIT_COMMIT} -Dpact.tag=${BRANCH_NAME}'
}
}
}
stage('Check Pact Verifications') {
steps {
sh 'curl -LO https://github.com/pact-foundation/pact-ruby-standalone/releases/download/v1.88.3/pact-1.88.3-linux-x86_64.tar.gz'
sh 'tar xzf pact-1.88.3-linux-x86_64.tar.gz'
dir('pact/bin') {
sh "./pact-broker can-i-deploy --retry-while-unknown=12 --retry-interval=10 -a messaging-app -b http://pact_broker -e ${GIT_COMMIT}"
}
}
}
stage('Deploy') {
when {
branch 'junit5'
}
steps {
echo 'Deploying to prod now...'
}
}
}
}