diff --git a/.travis.yml b/.travis.yml index 3e2221d..16e325c 100644 --- a/.travis.yml +++ b/.travis.yml @@ -2,8 +2,8 @@ language: bash services: docker env: - - VERSION=8.22 - VERSION=9.0 + - VERSION=9.1 install: - git clone https://github.com/docker-library/official-images.git ~/official-images diff --git a/8.22/Dockerfile b/9.1/Dockerfile similarity index 66% rename from 8.22/Dockerfile rename to 9.1/Dockerfile index 4acd9ad..decd650 100644 --- a/8.22/Dockerfile +++ b/9.1/Dockerfile @@ -1,4 +1,4 @@ -FROM python:2.7.14-slim +FROM python:2.7.16-slim-stretch # add our user and group first to make sure their IDs get assigned consistently RUN groupadd -r sentry && useradd -r -m -g sentry sentry @@ -10,8 +10,10 @@ RUN apt-get update && apt-get install -y --no-install-recommends \ libjpeg-dev \ libpq-dev \ libxml2-dev \ + libxmlsec1-dev \ libxslt-dev \ libyaml-dev \ + pkg-config \ && rm -rf /var/lib/apt/lists/* # Sane defaults for pip @@ -19,32 +21,56 @@ ENV PIP_NO_CACHE_DIR off ENV PIP_DISABLE_PIP_VERSION_CHECK on # grab gosu for easy step-down from root -ENV GOSU_VERSION 1.10 RUN set -x \ - && apt-get update && apt-get install -y --no-install-recommends wget && rm -rf /var/lib/apt/lists/* \ + && export GOSU_VERSION=1.11 \ + && fetchDeps=" \ + dirmngr \ + gnupg \ + wget \ + " \ + && apt-get update && apt-get install -y --no-install-recommends $fetchDeps && rm -rf /var/lib/apt/lists/* \ && wget -O /usr/local/bin/gosu "https://github.com/tianon/gosu/releases/download/$GOSU_VERSION/gosu-$(dpkg --print-architecture)" \ && wget -O /usr/local/bin/gosu.asc "https://github.com/tianon/gosu/releases/download/$GOSU_VERSION/gosu-$(dpkg --print-architecture).asc" \ && export GNUPGHOME="$(mktemp -d)" \ - && gpg --batch --keyserver ha.pool.sks-keyservers.net --recv-keys B42F6819007F00F88E364FD4036A9C25BF357DD4 \ + && for key in \ + B42F6819007F00F88E364FD4036A9C25BF357DD4 \ + ; do \ + gpg --batch --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys "$key" || \ + gpg --batch --keyserver hkp://ipv4.pool.sks-keyservers.net --recv-keys "$key" || \ + gpg --batch --keyserver hkp://pgp.mit.edu:80 --recv-keys "$key" ; \ + done \ && gpg --batch --verify /usr/local/bin/gosu.asc /usr/local/bin/gosu \ + && gpgconf --kill all \ && rm -r "$GNUPGHOME" /usr/local/bin/gosu.asc \ && chmod +x /usr/local/bin/gosu \ && gosu nobody true \ - && apt-get purge -y --auto-remove wget + && apt-get purge -y --auto-remove $fetchDeps # grab tini for signal processing and zombie killing -ENV TINI_VERSION v0.14.0 RUN set -x \ - && apt-get update && apt-get install -y --no-install-recommends wget && rm -rf /var/lib/apt/lists/* \ - && wget -O /usr/local/bin/tini "https://github.com/krallin/tini/releases/download/$TINI_VERSION/tini" \ - && wget -O /usr/local/bin/tini.asc "https://github.com/krallin/tini/releases/download/$TINI_VERSION/tini.asc" \ + && export TINI_VERSION=0.18.0 \ + && fetchDeps=" \ + dirmngr \ + gnupg \ + wget \ + " \ + && apt-get update && apt-get install -y --no-install-recommends $fetchDeps && rm -rf /var/lib/apt/lists/* \ + && wget -O /usr/local/bin/tini "https://github.com/krallin/tini/releases/download/v$TINI_VERSION/tini" \ + && wget -O /usr/local/bin/tini.asc "https://github.com/krallin/tini/releases/download/v$TINI_VERSION/tini.asc" \ && export GNUPGHOME="$(mktemp -d)" \ - && gpg --batch --keyserver ha.pool.sks-keyservers.net --recv-keys 6380DC428747F6C393FEACA59A84159D7001A4E5 \ + && for key in \ + 595E85A6B1B4779EA4DAAEC70B588DFF0527A9B7 \ + ; do \ + gpg --batch --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys "$key" || \ + gpg --batch --keyserver hkp://ipv4.pool.sks-keyservers.net --recv-keys "$key" || \ + gpg --batch --keyserver hkp://pgp.mit.edu:80 --recv-keys "$key" ; \ + done \ && gpg --batch --verify /usr/local/bin/tini.asc /usr/local/bin/tini \ + && gpgconf --kill all \ && rm -r "$GNUPGHOME" /usr/local/bin/tini.asc \ && chmod +x /usr/local/bin/tini \ && tini -h \ - && apt-get purge -y --auto-remove wget +&& apt-get purge -y --auto-remove $fetchDeps # Support for RabbitMQ RUN set -x \ @@ -53,26 +79,39 @@ RUN set -x \ && python -c 'import librabbitmq' \ && apt-get purge -y --auto-remove make -ENV SENTRY_VERSION 8.22.0 +ENV SENTRY_VERSION 9.1.0 RUN set -x \ - && apt-get update && apt-get install -y --no-install-recommends wget g++ && rm -rf /var/lib/apt/lists/* \ + && buildDeps=" \ + g++ \ + dirmngr \ + gnupg \ + wget \ + " \ + && apt-get update && apt-get install -y --no-install-recommends $buildDeps && rm -rf /var/lib/apt/lists/* \ && mkdir -p /usr/src/sentry \ && wget -O /usr/src/sentry/sentry-${SENTRY_VERSION}-py27-none-any.whl "https://github.com/getsentry/sentry/releases/download/${SENTRY_VERSION}/sentry-${SENTRY_VERSION}-py27-none-any.whl" \ && wget -O /usr/src/sentry/sentry-${SENTRY_VERSION}-py27-none-any.whl.asc "https://github.com/getsentry/sentry/releases/download/${SENTRY_VERSION}/sentry-${SENTRY_VERSION}-py27-none-any.whl.asc" \ && wget -O /usr/src/sentry/sentry_plugins-${SENTRY_VERSION}-py2.py3-none-any.whl "https://github.com/getsentry/sentry/releases/download/${SENTRY_VERSION}/sentry_plugins-${SENTRY_VERSION}-py2.py3-none-any.whl" \ && wget -O /usr/src/sentry/sentry_plugins-${SENTRY_VERSION}-py2.py3-none-any.whl.asc "https://github.com/getsentry/sentry/releases/download/${SENTRY_VERSION}/sentry_plugins-${SENTRY_VERSION}-py2.py3-none-any.whl.asc" \ && export GNUPGHOME="$(mktemp -d)" \ - && gpg --batch --keyserver ha.pool.sks-keyservers.net --recv-keys D8749766A66DD714236A932C3B2D400CE5BBCA60 \ + && for key in \ + D8749766A66DD714236A932C3B2D400CE5BBCA60 \ + ; do \ + gpg --batch --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys "$key" || \ + gpg --batch --keyserver hkp://ipv4.pool.sks-keyservers.net --recv-keys "$key" || \ + gpg --batch --keyserver hkp://pgp.mit.edu:80 --recv-keys "$key" ; \ + done \ && gpg --batch --verify /usr/src/sentry/sentry-${SENTRY_VERSION}-py27-none-any.whl.asc /usr/src/sentry/sentry-${SENTRY_VERSION}-py27-none-any.whl \ && gpg --batch --verify /usr/src/sentry/sentry_plugins-${SENTRY_VERSION}-py2.py3-none-any.whl.asc /usr/src/sentry/sentry_plugins-${SENTRY_VERSION}-py2.py3-none-any.whl \ + && gpgconf --kill all \ && pip install \ /usr/src/sentry/sentry-${SENTRY_VERSION}-py27-none-any.whl \ /usr/src/sentry/sentry_plugins-${SENTRY_VERSION}-py2.py3-none-any.whl \ && sentry --help \ && sentry plugins list \ && rm -r "$GNUPGHOME" /usr/src/sentry \ - && apt-get purge -y --auto-remove wget g++ + && apt-get purge -y --auto-remove $buildDeps ENV SENTRY_CONF=/etc/sentry \ SENTRY_FILESTORE_DIR=/var/lib/sentry/files diff --git a/8.22/config.yml b/9.1/config.yml similarity index 100% rename from 8.22/config.yml rename to 9.1/config.yml diff --git a/8.22/docker-entrypoint.sh b/9.1/docker-entrypoint.sh similarity index 100% rename from 8.22/docker-entrypoint.sh rename to 9.1/docker-entrypoint.sh diff --git a/8.22/onbuild/Dockerfile b/9.1/onbuild/Dockerfile similarity index 97% rename from 8.22/onbuild/Dockerfile rename to 9.1/onbuild/Dockerfile index 03a98ac..8979e00 100644 --- a/8.22/onbuild/Dockerfile +++ b/9.1/onbuild/Dockerfile @@ -1,4 +1,4 @@ -FROM sentry:8.22 +FROM sentry:9.1 WORKDIR /usr/src/sentry diff --git a/8.22/sentry.conf.py b/9.1/sentry.conf.py similarity index 95% rename from 8.22/sentry.conf.py rename to 9.1/sentry.conf.py index e4e0baf..5274992 100644 --- a/8.22/sentry.conf.py +++ b/9.1/sentry.conf.py @@ -29,6 +29,9 @@ # SENTRY_MAILGUN_API_KEY # SENTRY_SINGLE_ORGANIZATION # SENTRY_SECRET_KEY +# SLACK_CLIENT_ID +# SLACK_CLIENT_SECRET +# SLACK_VERIFICATION_TOKEN # GITHUB_APP_ID # GITHUB_API_SECRET # BITBUCKET_CONSUMER_KEY @@ -279,6 +282,15 @@ if SENTRY_OPTIONS['mail.enable-replies']: SENTRY_OPTIONS['mail.reply-hostname'] = env('SENTRY_SMTP_HOSTNAME') or '' +##################### +# SLACK INTEGRATION # +##################### +slack = env('SLACK_CLIENT_ID') and env('SLACK_CLIENT_SECRET') +if slack: + SENTRY_OPTIONS['slack.client-id'] = env('SLACK_CLIENT_ID') + SENTRY_OPTIONS['slack.client-secret'] = env('SLACK_CLIENT_SECRET') + SENTRY_OPTIONS['slack.verification-token'] = env('SLACK_VERIFICATION_TOKEN') or '' + # If this value ever becomes compromised, it's important to regenerate your # SENTRY_SECRET_KEY. Changing this value will result in all current sessions # being invalidated. diff --git a/generate-stackbrew-library.sh b/generate-stackbrew-library.sh index 67273bb..4d27e95 100755 --- a/generate-stackbrew-library.sh +++ b/generate-stackbrew-library.sh @@ -3,8 +3,7 @@ set -eu declare -A aliases aliases=( - [8.22]='8' - [9.0]='9 latest' + [9.1]='9 latest' ) self="$(basename "$BASH_SOURCE")" diff --git a/git/Dockerfile b/git/Dockerfile index fff9add..f2aa273 100644 --- a/git/Dockerfile +++ b/git/Dockerfile @@ -1,5 +1,5 @@ # Build from any git sha by passing `--build-arg SENTRY_BUILD=` -FROM python:2.7.15-slim-jessie +FROM python:2.7.16-slim-stretch # add our user and group first to make sure their IDs get assigned consistently RUN groupadd -r sentry && useradd -r -m -g sentry sentry @@ -25,7 +25,12 @@ ENV PIP_DISABLE_PIP_VERSION_CHECK on # grab gosu for easy step-down from root RUN set -x \ && export GOSU_VERSION=1.11 \ - && apt-get update && apt-get install -y --no-install-recommends wget && rm -rf /var/lib/apt/lists/* \ + && fetchDeps=" \ + dirmngr \ + gnupg \ + wget \ + " \ + && apt-get update && apt-get install -y --no-install-recommends $fetchDeps && rm -rf /var/lib/apt/lists/* \ && wget -O /usr/local/bin/gosu "https://github.com/tianon/gosu/releases/download/$GOSU_VERSION/gosu-$(dpkg --print-architecture)" \ && wget -O /usr/local/bin/gosu.asc "https://github.com/tianon/gosu/releases/download/$GOSU_VERSION/gosu-$(dpkg --print-architecture).asc" \ && export GNUPGHOME="$(mktemp -d)" \ @@ -37,15 +42,21 @@ RUN set -x \ gpg --batch --keyserver hkp://pgp.mit.edu:80 --recv-keys "$key" ; \ done \ && gpg --batch --verify /usr/local/bin/gosu.asc /usr/local/bin/gosu \ + && gpgconf --kill all \ && rm -r "$GNUPGHOME" /usr/local/bin/gosu.asc \ && chmod +x /usr/local/bin/gosu \ && gosu nobody true \ - && apt-get purge -y --auto-remove wget + && apt-get purge -y --auto-remove $fetchDeps # grab tini for signal processing and zombie killing RUN set -x \ && export TINI_VERSION=0.18.0 \ - && apt-get update && apt-get install -y --no-install-recommends wget && rm -rf /var/lib/apt/lists/* \ + && fetchDeps=" \ + dirmngr \ + gnupg \ + wget \ + " \ + && apt-get update && apt-get install -y --no-install-recommends $fetchDeps && rm -rf /var/lib/apt/lists/* \ && wget -O /usr/local/bin/tini "https://github.com/krallin/tini/releases/download/v$TINI_VERSION/tini" \ && wget -O /usr/local/bin/tini.asc "https://github.com/krallin/tini/releases/download/v$TINI_VERSION/tini.asc" \ && export GNUPGHOME="$(mktemp -d)" \ @@ -57,10 +68,11 @@ RUN set -x \ gpg --batch --keyserver hkp://pgp.mit.edu:80 --recv-keys "$key" ; \ done \ && gpg --batch --verify /usr/local/bin/tini.asc /usr/local/bin/tini \ + && gpgconf --kill all \ && rm -r "$GNUPGHOME" /usr/local/bin/tini.asc \ && chmod +x /usr/local/bin/tini \ && tini -h \ - && apt-get purge -y --auto-remove wget +&& apt-get purge -y --auto-remove $fetchDeps # Support for RabbitMQ RUN set -x \ @@ -74,11 +86,19 @@ ENV SENTRY_BUILD $SENTRY_BUILD RUN [ "$SENTRY_BUILD" != '' ] \ # Install node to build assets - && export NODE_VERSION=8.10.0 \ + && export NODE_VERSION=8.15.1 \ && export YARN_VERSION=1.13.0 \ && export GNUPGHOME="$(mktemp -d)" \ && export NPM_CONFIG_CACHE="$(mktemp -d)" \ && export YARN_CACHE_FOLDER="$(mktemp -d)" \ + && buildDeps=" \ + make \ + g++ \ + dirmngr \ + gnupg \ + wget \ + " \ + && apt-get update && apt-get install -y --no-install-recommends $buildDeps && rm -rf /var/lib/apt/lists/* \ # gpg keys listed at https://github.com/nodejs/node && set -ex \ && for key in \ @@ -99,11 +119,11 @@ RUN [ "$SENTRY_BUILD" != '' ] \ gpg --batch --keyserver hkp://pgp.mit.edu:80 --recv-keys "$key" ; \ done \ && mkdir -p /usr/local/node && PATH=/usr/local/node/bin:$PATH \ - && apt-get update && apt-get install -y --no-install-recommends make g++ wget \ && rm -rf /var/lib/apt/lists/* \ && wget "https://nodejs.org/dist/v$NODE_VERSION/node-v$NODE_VERSION-linux-x64.tar.gz" \ && wget "https://nodejs.org/dist/v$NODE_VERSION/SHASUMS256.txt.asc" \ && gpg --batch --verify SHASUMS256.txt.asc \ + && gpgconf --kill all \ && grep " node-v$NODE_VERSION-linux-x64.tar.gz\$" SHASUMS256.txt.asc | sha256sum -c - \ && tar -xzf "node-v$NODE_VERSION-linux-x64.tar.gz" -C /usr/local/node --strip-components=1 \ && rm -r "$GNUPGHOME" "node-v$NODE_VERSION-linux-x64.tar.gz" SHASUMS256.txt.asc \ @@ -120,7 +140,7 @@ RUN [ "$SENTRY_BUILD" != '' ] \ && pip install dist/*.whl \ - && apt-get purge -y --auto-remove make g++ wget \ + && apt-get purge -y --auto-remove $buildDeps \ && rm -rf /usr/src/sentry ENV SENTRY_CONF=/etc/sentry \ diff --git a/update.sh b/update.sh index 9eefe21..ccafec4 100755 --- a/update.sh +++ b/update.sh @@ -4,4 +4,4 @@ set -e current="$(curl -sSL 'https://pypi.python.org/pypi/sentry/json' | awk -F '"' '$2 == "version" { print $4 }')" set -x -sed -ri 's/^(ENV SENTRY_VERSION) .*/\1 '"$current"'/' 9.0/Dockerfile +sed -ri 's/^(ENV SENTRY_VERSION) .*/\1 '"$current"'/' 9.1/Dockerfile