Sha256: 382950b8ff878a830531be057f47d473a5deb72924fff7c55b344e26a1113703

Contents?: true

Size: 823 Bytes

Versions: 5

Compression:

Stored size: 823 Bytes

Contents

#!/usr/bin/env bash

set -ex

function save_pact_files_to_s3()
{
  echo "Saving pact files to S3..."
  folder=${1:-latest}
  aws s3 cp pacts s3://ci-asset-cache/pacts/${JOB_NAME}/${folder} --recursive --only-show-errors --region us-east-1
}

function cleanup() {
  exit_code=$?
  set +e
  docker cp coverage:/app/coverage .
  docker-compose kill
  docker-compose rm -f
  exit $exit_code
}
trap cleanup INT TERM EXIT

docker-compose build --pull
echo "Running test suite..."
docker-compose run --name coverage testrunner $@

echo ""
echo "Running contract tests..."
docker-compose run --name contracts -T contracts-testrunner bundle exec rspec spec/contracts
docker cp contracts:/usr/src/app/pacts .
docker cp contracts:/usr/src/app/log .

if [[ "${GERRIT_EVENT_TYPE}" == "change-merged" ]]; then
  save_pact_files_to_s3
fi

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
quiz_api_client-2.4.0 build.sh
quiz_api_client-2.3.1 build.sh
quiz_api_client-2.3.0 build.sh
quiz_api_client-2.2.0 build.sh
quiz_api_client-2.1.0 build.sh