2
0

feat(nightlies): Add ability to build from nightlies (#211)

This patch adds the optional IMAGE env variable to set the base
image and adds nightly builds to Travis CI.
This commit is contained in:
Burak Yigit Kaya 2019-07-08 18:56:51 +03:00 committed by GitHub
parent 792e2cc961
commit 9177155c79
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 16 additions and 7 deletions

View File

@ -1,3 +1,4 @@
IMAGE=sentry:9.1
# Run `docker-compose run web config generate-secret-key`
# to get the SENTRY_SECRET_KEY value.
SENTRY_SECRET_KEY=
SENTRY_SECRET_KEY=

View File

@ -1,6 +1,10 @@
language: bash
services: docker
env:
- IMAGE=sentry:9.1
- IMAGE=getsentry/sentry:git
script:
- ./install.sh
- docker-compose run --rm web createuser --superuser --email test@sentry.io --password test123TEST

View File

@ -1 +1,2 @@
FROM sentry:9.1-onbuild
ARG IMAGE
FROM ${IMAGE}-onbuild

View File

@ -10,7 +10,10 @@ version: '3.4'
x-defaults: &defaults
restart: unless-stopped
build: .
build:
context: .
args:
IMAGE: ${IMAGE}
depends_on:
- redis
- postgres

View File

@ -5,9 +5,9 @@ TEST_USER='test@sentry.io'
TEST_PASS='test123TEST'
COOKIE_FILE=$(mktemp)
declare -a TEST_STRINGS=(
'"isAuthenticated":true,'
'"username":"test@sentry.io",'
'"isSuperuser":true,'
'"isAuthenticated":true'
'"username":"test@sentry.io"'
'"isSuperuser":true'
)
INITIAL_AUTH_REDIRECT=$(curl -sL -o /dev/null http://localhost:9000 -w %{url_effective})
@ -28,6 +28,6 @@ TEST_RESULT=0
for i in "${TEST_STRINGS[@]}"
do
echo "Testing '$i'..."
echo "$LOGIN_RESPONSE" | grep "$i" >& /dev/null
echo "$LOGIN_RESPONSE" | grep "$i[,}]" >& /dev/null
echo "Pass."
done