Skip to content
Merged
Show file tree
Hide file tree
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
4 changes: 2 additions & 2 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# This is the image to be run
FROM python:2.7.16-slim-buster
ARG PY_VER=2.7.16
FROM python:${PY_VER}-slim-buster

LABEL maintainer="oss@sentry.io"
LABEL org.opencontainers.image.title="Sentry"
Expand Down
49 changes: 47 additions & 2 deletions docker/cloudbuild.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
steps:
- name: 'gcr.io/kaniko-project/executor:v0.22.0'
id: builder-image
args: [
'--cache=true',
'--build-arg', 'SOURCE_COMMIT=$COMMIT_SHA',
Expand All @@ -8,20 +9,38 @@ steps:
]
timeout: 180s
- name: 'us.gcr.io/$PROJECT_ID/sentry-builder:$COMMIT_SHA'
id: builder-run
env: [
'SOURCE_COMMIT=$COMMIT_SHA'
]
timeout: 360s
- name: 'gcr.io/kaniko-project/executor:v0.22.0'
id: runtime-image-py2
waitFor:
- builder-run
args: [
'--cache=true',
'--build-arg', 'SOURCE_COMMIT=$COMMIT_SHA',
'--destination=us.gcr.io/$PROJECT_ID/sentry:$COMMIT_SHA',
'-f', './docker/Dockerfile'
]
timeout: 300s
# Smoke tests
- name: 'gcr.io/kaniko-project/executor:v0.22.0'
id: runtime-image-py3
waitFor:
- builder-run
args: [
'--cache=true',
'--build-arg', 'SOURCE_COMMIT=$COMMIT_SHA',
'--build-arg', 'PY_VER=3.6.10',
'--destination=us.gcr.io/$PROJECT_ID/sentry:$COMMIT_SHA-py3',
'-f', './docker/Dockerfile'
]
timeout: 300s
- name: 'gcr.io/$PROJECT_ID/docker-compose'
id: e2e-test-py2
waitFor:
- runtime-image-py2
entrypoint: 'bash'
env:
- 'SENTRY_IMAGE=us.gcr.io/$PROJECT_ID/sentry:$COMMIT_SHA'
Expand All @@ -33,7 +52,6 @@ steps:
- |
mkdir onpremise && cd onpremise
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
set +e
Expand All @@ -47,7 +65,31 @@ steps:
exit $test_return;
fi
timeout: 450s
- name: 'gcr.io/$PROJECT_ID/docker-compose'
id: e2e-test-py3
waitFor:
- runtime-image-py3
- e2e-test-py2
entrypoint: 'bash'
env:
- 'SENTRY_IMAGE=us.gcr.io/$PROJECT_ID/sentry:$COMMIT_SHA-py3'
- 'SENTRY_TEST_HOST=http://nginx'
- 'CI=1'
args:
- '-e'
- '-c'
- |
mkdir onpremise && cd onpremise
curl -L "https://github.com/getsentry/onpremise/archive/master.tar.gz" | tar xzf - --strip-components=1
echo '{"version": "3.4", "networks":{"default":{"external":{"name":"cloudbuild"}}}}' > docker-compose.override.yml
./install.sh
./test.sh || docker-compose logs nginx web relay
timeout: 450s

- name: 'gcr.io/cloud-builders/docker'
id: docker-push
waitFor:
- e2e-test-py2
secretEnv: ['DOCKER_PASSWORD']
entrypoint: 'bash'
args:
Expand All @@ -66,6 +108,9 @@ steps:
docker tag us.gcr.io/$PROJECT_ID/sentry:$COMMIT_SHA getsentry/sentry:latest
docker push getsentry/sentry:latest
- name: 'node:12'
id: zeus-upload
waitFor:
- builder-run
secretEnv: ['ZEUS_HOOK_BASE']
entrypoint: 'bash'
args:
Expand Down