From e8d8cda6882356f4ac30dfc5323675789497f79e Mon Sep 17 00:00:00 2001 From: Burak Yigit Kaya Date: Sat, 23 May 2020 06:24:44 +0300 Subject: [PATCH] feat(versioning): Add SENTRY_VERSION env var for sentry, snuba, relay (#509) This is in preparation for the upcoming CalVer transition. Introduces a general `$SENTRY_VERSION` env variable, defaulting to `latest`. --- .env | 1 + docker-compose.yml | 5 +++-- sentry/Dockerfile | 3 ++- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/.env b/.env index 008cb10..b4f5273 100644 --- a/.env +++ b/.env @@ -1,2 +1,3 @@ COMPOSE_PROJECT_NAME=sentry_onpremise SENTRY_EVENT_RETENTION_DAYS=90 +SENTRY_VERSION=latest diff --git a/docker-compose.yml b/docker-compose.yml index aa22673..f0fce4e 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -7,6 +7,7 @@ x-sentry-defaults: &sentry_defaults context: ./sentry args: - SENTRY_IMAGE + - SENTRY_VERSION image: sentry-onpremise-local depends_on: - redis @@ -31,7 +32,7 @@ x-snuba-defaults: &snuba_defaults - redis - clickhouse - kafka - image: 'getsentry/snuba:latest' + image: 'getsentry/snuba:$SENTRY_VERSION' environment: SNUBA_SETTINGS: docker CLICKHOUSE_HOST: clickhouse @@ -179,7 +180,7 @@ services: - relay relay: << : *restart_policy - image: "getsentry/relay:latest" + image: "getsentry/relay:$SENTRY_VERSION" volumes: - type: bind read_only: true diff --git a/sentry/Dockerfile b/sentry/Dockerfile index 88bb076..406830e 100644 --- a/sentry/Dockerfile +++ b/sentry/Dockerfile @@ -1,5 +1,6 @@ +ARG SENTRY_VERSION=latest ARG SENTRY_IMAGE -FROM ${SENTRY_IMAGE:-getsentry/sentry:latest} +FROM ${SENTRY_IMAGE:-getsentry/sentry:$SENTRY_VERSION} COPY . /usr/src/sentry