Skip to content

Instantly share code, notes, and snippets.

@vinirib
Created July 1, 2020 18:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save vinirib/75b19e2b7e95e0ae0fdd47fe19d53f8f to your computer and use it in GitHub Desktop.
Save vinirib/75b19e2b7e95e0ae0fdd47fe19d53f8f to your computer and use it in GitHub Desktop.
#!groovy
pipeline {
agent any
stages {
stage('Can-I-Deploy Integration Check') {
steps {
sh 'curl -LO https://github.com/pact-foundation/pact-ruby-standalone/releases/download/v1.83.0/pact-1.83.0-linux-x86_64.tar.gz'
sh 'tar xzf pact-1.83.0-linux-x86_64.tar.gz'
dir('pact/bin') {
sh """./pact-broker can-i-deploy --retry-while-unknown=12 --retry-interval=10 --pacticipant AccountProvider --latest CONTRACT-TEST --broker-base-url http://pact_broker"""
}
}
}
stage('Deploy') {
when {
branch 'master'
}
steps {
echo 'Deploying to prod now...'
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment