Skip to content
This repository was archived by the owner on May 14, 2020. It is now read-only.

Commit 5c2feb7

Browse files
Temporary travis workaround to buy time and fix it for good (#1684)
1 parent 864f8cf commit 5c2feb7

File tree

1 file changed

+8
-47
lines changed

1 file changed

+8
-47
lines changed

.travis.yml

Lines changed: 8 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -1,70 +1,31 @@
1+
os: linux
12
language: python
2-
33
python:
44
- 2.7
55

6-
sudo: required
6+
# no more required in travis
7+
#sudo: required
78

89
services:
910
- docker
1011

1112
jobs:
12-
allow_failures:
13-
- env: CONFIG=3.0-apache LOGDIR=/var/log/apache2
14-
- env: CONFIG=3.0-nginx LOGDIR=/var/log/nginx
15-
fast_finish: true
1613
include:
17-
- install:
18-
- pip install -r tests/integration/requirements.txt
19-
before_script:
20-
- git clone https://github.com/CRS-support/secrules_parsing
21-
- pip install -r secrules_parsing/requirements.txt
22-
- python secrules_parsing/secrules_parser.py -c -f rules/*.conf
2314
script:
24-
- py.test -vs tests/integration/format_tests.py
25-
- &test-common
26-
env: CONFIG=2.9-apache LOGDIR=/var/log/apache2
27-
before_install:
2815
- |
2916
if [[ "$TRAVIS_PULL_REQUEST" != "false" ]]; then
30-
docker build --build-arg REPO=$TRAVIS_PULL_REQUEST_SLUG \
31-
--build-arg BRANCH=$TRAVIS_PULL_REQUEST_BRANCH \
32-
--build-arg COMMIT=$TRAVIS_PULL_REQUEST_SHA \
33-
-f ./util/docker/Dockerfile-$CONFIG \
34-
-t modsecurity-crs-$CONFIG ./util/docker/
17+
docker run -ti --name crs-test --entrypoint /docker-entrypoint.sh -e REPO=$TRAVIS_PULL_REQUEST_SLUG -e BRANCH=$TRAVIS_PULL_REQUEST_BRANCH themiddle/crs-test
3518
else
36-
docker build -f ./util/docker/Dockerfile-$CONFIG \
37-
-t modsecurity-crs-$CONFIG ./util/docker/
38-
fi
39-
- |
40-
docker run -ti -e PARANOIA=5 -d -p 80:80 \
41-
--volume $LOGDIR:$LOGDIR \
42-
--name "$TRAVIS_BUILD_ID" modsecurity-crs-$CONFIG
43-
- |
44-
docker ps | grep -q modsecurity-crs
45-
if [[ $? -ne 0 ]]; then
46-
docker logs "$TRAVIS_BUILD_ID"
47-
docker rm -f "$TRAVIS_BUILD_ID"
48-
exit 1
19+
docker run -ti --name crs-test --entrypoint /docker-entrypoint.sh -e REPO=$TRAVIS_REPO_SLUG -e BRANCH=$TRAVIS_BRANCH themiddle/crs-test
4920
fi
50-
install:
51-
- pip install -r tests/regression/requirements.txt
52-
script:
53-
- |
54-
py.test -vs tests/regression/CRS_Tests.py \
55-
--config=$CONFIG --ruledir_recurse=tests/regression/tests
56-
- docker rm -f "$TRAVIS_BUILD_ID"
57-
- <<: *test-common
58-
env: CONFIG=3.0-apache LOGDIR=/var/log/apache2
59-
- <<: *test-common
60-
env: CONFIG=3.0-nginx LOGDIR=/var/log/nginx
6121
6222
# safelist
6323
branches:
6424
only:
6525
- v3.1/dev
6626
- v3.2/dev
6727
- v3.3/dev
28+
- fix-travis
6829

69-
notifications:
70-
irc: "chat.freenode.net#modsecurity"
30+
#notifications:
31+
# irc: "chat.freenode.net#modsecurity"

0 commit comments

Comments
 (0)