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.77.0 example/scripts/deploy-consumer.sh
pact_broker-client-1.76.2 example/scripts/deploy-consumer.sh
pact_broker-client-1.76.1 example/scripts/deploy-consumer.sh
pact_broker-client-1.76.0 example/scripts/deploy-consumer.sh
pact_broker-client-1.75.4 example/scripts/deploy-consumer.sh
pact_broker-client-1.75.3 example/scripts/deploy-consumer.sh
pact_broker-client-1.75.1 example/scripts/deploy-consumer.sh
pact_broker-client-1.75.0 example/scripts/deploy-consumer.sh
pact_broker-client-1.74.0 example/scripts/deploy-consumer.sh
pact_broker-client-1.73.0 example/scripts/deploy-consumer.sh
pact_broker-client-1.72.0 example/scripts/deploy-consumer.sh
pact_broker-client-1.71.0 example/scripts/deploy-consumer.sh
pact_broker-client-1.70.0 example/scripts/deploy-consumer.sh
pact_broker-client-1.69.0 example/scripts/deploy-consumer.sh
pact_broker-client-1.68.0 example/scripts/deploy-consumer.sh
pact_broker-client-1.67.0 example/scripts/deploy-consumer.sh
pact_broker-client-1.66.1 example/scripts/deploy-consumer.sh
pact_broker-client-1.66.0 example/scripts/deploy-consumer.sh
pact_broker-client-1.65.0 example/scripts/deploy-consumer.sh
pact_broker-client-1.64.0 example/scripts/deploy-consumer.sh