Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 23 additions & 3 deletions cloudbuild.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,29 @@ steps:
".",
]

- name: "us.gcr.io/$PROJECT_ID/relay:$COMMIT_SHA"
args: ['--help']
id: "smoke test"
# On-premise Integration tests
- name: 'gcr.io/$PROJECT_ID/docker-compose'
entrypoint: 'bash'
env:
- 'RELAY_IMAGE=us.gcr.io/$PROJECT_ID/relay:$COMMIT_SHA'
- 'SENTRY_TEST_HOST=http://nginx'
- 'CI=1'
args:
- '-e'
- '-c'
- |
mkdir onpremise && cd onpremise
# TODO(byk): We may also build this part as a builder image everytime
# there's a push to onpremise and use that image for
curl -L "https://github.com/getsentry/onpremise/archive/master.tar.gz" | tar xzf - --strip-components=1
# The following trick is from https://stackoverflow.com/a/52400857/90297 with great gratuity
echo '{"version": "3.4", "networks":{"default":{"external":{"name":"cloudbuild"}}}}' > docker-compose.override.yml
./install.sh
docker-compose run --rm web createuser --superuser --email test@example.com --password test123TEST
docker-compose up -d
timeout 20 bash -c 'until $(curl -Isf -o /dev/null http://nginx); do printf "."; sleep 0.5; done' || docker-compose logs web
./test.sh || docker-compose logs nginx web relay
timeout: 450s

- name: 'gcr.io/cloud-builders/docker'
secretEnv: ['DOCKER_PASSWORD']
Expand Down