forked from SpiderLabs/owasp-modsecurity-crs
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.travis.yml
More file actions
40 lines (40 loc) · 1.25 KB
/
.travis.yml
File metadata and controls
40 lines (40 loc) · 1.25 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
sudo: required
services:
- docker
language: python
python:
- 2.7
before_install:
- |
if [[ "$TRAVIS_PULL_REQUEST" != "false" ]]; then
docker build --build-arg REPO=$TRAVIS_PULL_REQUEST_SLUG --build-arg COMMIT=$TRAVIS_PULL_REQUEST_SHA -t modsecurity-crs ./util/docker/
else
docker build -t modsecurity-crs ./util/docker/
fi
- docker run -ti -e PARANOIA=5 -d -p 80:80 -v /var/log/apache2:/var/log/apache2/ --name "$TRAVIS_BUILD_ID" modsecurity-crs
install:
- pip install -r ./util/integration/requirements.txt
- pip install -r ./util/regression-tests/requirements.txt
script:
- |
docker ps | grep -q modsecurity-crs
if [[ $? -ne 0 ]]; then
docker logs "$TRAVIS_BUILD_ID"
docker rm -f "$TRAVIS_BUILD_ID"
exit 1
fi
- git clone https://github.com/CRS-support/secrules_parsing
- pip install -r secrules_parsing/requirements.txt
- python secrules_parsing/secrules_parser.py -c -f rules/*.conf
- py.test -vs ./util/integration/format_tests.py
- py.test -vs util/regression-tests/CRS_Tests.py --ruledir_recurse=util/regression-tests/tests/
- docker rm -f "$TRAVIS_BUILD_ID"
# safelist
branches:
only:
- v3.0/dev
- v3.0/master
- v3.1/dev
- v3.2/dev
notifications:
irc: "chat.freenode.net#modsecurity"