Sha256: 5b6408dba14a18f2775ee13733bb14cf294846abf6a4f024eaf1496c90b14827

Contents?: true

Size: 1020 Bytes

Versions: 111

Compression:

Stored size: 1020 Bytes

Contents

version="1"
stage="development"
application="A"

export PACT_BROKER_CLIENT="bundle exec bin/pact-broker"
export PACT_BROKER_BASE_URL="http://localhost:9292"

can_i_deploy_output=$(${PACT_BROKER_CLIENT} can-i-deploy --pacticipant ${application} --version ${version})
can_i_deploy_exit_code=$?

set -e

echo "${can_i_deploy_output}"

if [[ "${can_i_deploy_exit_code}" == "0" ]]; then
  existing_tags=$(${PACT_BROKER_CLIENT} describe-version --pacticipant ${application} --version ${version} --output json | jq "[._embedded.tags[].name]" | jq 'join("\n")' --raw-output)
  if [ $(echo "${existing_tags}" | grep "${stage}") ]; then
    echo "Version ${version} of ${application} has already been deployed to ${stage}"
  else
    echo "Deploying version ${version} of ${application} to ${stage}"
    # do deployment here
    ${PACT_BROKER_CLIENT} create-version-tag --pacticipant ${application} --version ${version} --tag ${stage}
  fi
else
  echo "Cannot currently deploy version ${version} of ${application} to ${stage}"
fi

Version data entries

111 entries across 111 versions & 1 rubygems

Version Path
pact_broker-client-1.32.0 example/scripts/deploy-consumer.sh
pact_broker-client-1.31.0 example/scripts/deploy-consumer.sh
pact_broker-client-1.30.0 example/scripts/deploy-consumer.sh
pact_broker-client-1.29.1 example/scripts/deploy-consumer.sh
pact_broker-client-1.29.0 example/scripts/deploy-consumer.sh
pact_broker-client-1.28.4 example/scripts/deploy-consumer.sh
pact_broker-client-1.28.3 example/scripts/deploy-consumer.sh
pact_broker-client-1.28.2 example/scripts/deploy-consumer.sh
pact_broker-client-1.28.1 example/scripts/deploy-consumer.sh
pact_broker-client-1.28.0 example/scripts/deploy-consumer.sh
pact_broker-client-1.27.28 example/scripts/deploy-consumer.sh
pact_broker-client-1.27.27 example/scripts/deploy-consumer.sh
pact_broker-client-1.27.26 example/scripts/deploy-consumer.sh
pact_broker-client-1.27.25 example/scripts/deploy-consumer.sh
pact_broker-client-1.27.24 example/scripts/deploy-consumer.sh
pact_broker-client-1.27.23 example/scripts/deploy-consumer.sh
pact_broker-client-1.27.22 example/scripts/deploy-consumer.sh
pact_broker-client-1.27.21 example/scripts/deploy-consumer.sh
pact_broker-client-1.27.20 example/scripts/deploy-consumer.sh
pact_broker-client-1.27.19 example/scripts/deploy-consumer.sh