forked from getsentry/self-hosted
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add a cloudbuild.yaml for GCB (getsentry#1315)
- Loading branch information
1 parent
f3027d0
commit 5c52017
Showing
1 changed file
with
57 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
steps: | ||
- name: "gcr.io/$PROJECT_ID/docker-compose" | ||
id: clone-and-configure | ||
entrypoint: "bash" | ||
args: | ||
- "-e" | ||
- "-c" | ||
- | | ||
git clone https://github.com/getsentry/self-hosted.git | ||
echo '{"version": "3.4", "networks":{"default":{"external":{"name":"cloudbuild"}}}}' > self-hosted/docker-compose.override.yml | ||
timeout: 60s | ||
- name: "gcr.io/$PROJECT_ID/docker-compose" | ||
id: install | ||
waitFor: | ||
- clone-and-configure | ||
dir: self-hosted | ||
entrypoint: "bash" | ||
args: | ||
- "-e" | ||
- "-c" | ||
- | | ||
./install.sh | ||
timeout: 600s | ||
|
||
# The point is to run the tests that get run in sentry and snuba, to avoid | ||
# accidentally breaking CI over there (not that this has ever happened; | ||
# it's purely theoretical, you understand). Unfortunately this is a bit | ||
# duplicatory. Meh. | ||
|
||
- name: "gcr.io/$PROJECT_ID/docker-compose" | ||
id: e2e-test | ||
waitFor: | ||
- install | ||
dir: self-hosted | ||
entrypoint: "bash" | ||
args: | ||
- "-e" | ||
- "-c" | ||
- | | ||
set +e | ||
./test.sh | ||
test_return=$? | ||
set -e | ||
if [[ $test_return -ne 0 ]]; then | ||
echo "Test failed."; | ||
docker-compose ps; | ||
docker-compose logs; | ||
exit $test_return; | ||
fi | ||
timeout: 600s | ||
timeout: 2640s | ||
options: | ||
# We need more memory for Webpack builds & e2e self-hosted tests | ||
machineType: "N1_HIGHCPU_8" | ||
env: | ||
- "CI=1" | ||
- "SENTRY_TEST_HOST=http://nginx" |