forked from getsentry/self-hosted
-
Notifications
You must be signed in to change notification settings - Fork 0
/
cloudbuild.yaml
57 lines (55 loc) · 1.45 KB
/
cloudbuild.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
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"