Test should test the current branch version and not the 'latest'.
This commit is contained in:
committed by
Abhilash Raj
parent
cda6d2a95a
commit
d4b0b74860
@@ -12,7 +12,8 @@ install:
|
||||
- docker-compose --version
|
||||
|
||||
before_script:
|
||||
- docker-compose up -d
|
||||
- tests/generate_tests.sh
|
||||
- docker-compose -f docker-compose.yaml -f docker-test.yaml up -d
|
||||
- docker inspect -f '{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' mailman-core
|
||||
- docker inspect -f '{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' mailman-web
|
||||
- docker-compose ps
|
||||
|
||||
15
tests/generate_tests.sh
Normal file
15
tests/generate_tests.sh
Normal file
@@ -0,0 +1,15 @@
|
||||
if [ "$TRAVIS_BRANCH" = "master" ]; then
|
||||
TAG="latest"
|
||||
else
|
||||
TAG="$TRAVIS_BRANCH"
|
||||
fi
|
||||
|
||||
|
||||
cat > docker-test.yaml <<EOF
|
||||
services:
|
||||
mailman-core:
|
||||
image:maxking/mailman-core:$TAG
|
||||
|
||||
mailman-web:
|
||||
image:maxking/mailman-web:$TAG
|
||||
EOF
|
||||
Reference in New Issue
Block a user