forked from devilbox/vhost-gen
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
110 lines (86 loc) · 2.14 KB
/
.travis.yml
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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
###
### Sudo required
###
dist: trusty
sudo: required
#sudo: false
###
### Set language
###
language: python
###
### Python Build Matrix
###
python:
- "2.7"
- "3.3"
- "3.4"
- "3.5"
- "3.6"
###
### Install required software
###
before_install:
# Install required tools
#- sudo apt-get update
#- sudo apt-get install -y pep8 pylint
# Create directories
- sudo rm -rf /etc/nginx/conf.d || true
- sudo rm -rf /etc/httpd/conf.d || true
- sudo rm -rf /etc/apache2/conf.d || true
- sudo mkdir -p /etc/nginx/conf.d
- sudo mkdir -p /etc/httpd/conf.d
- sudo mkdir -p /etc/apache2/conf.d
- sudo mkdir -p /var/log/nginx
- sudo mkdir -p /var/log/httpd
- sudo mkdir -p /var/log/apache2
# Add open permissions
- sudo chmod 0777 /etc/nginx/conf.d
- sudo chmod 0777 /etc/httpd/conf.d
- sudo chmod 0777 /etc/apache2/conf.d
- sudo chmod 0777 /var/log/nginx
- sudo chmod 0777 /var/log/httpd
- sudo chmod 0777 /var/log/apache2
###
###
###
install:
# Install
- pip install -r requirements.txt
- pip install pylint flake8 pycodestyle
# Show versions
- pylint --version || true
- flake8 --version || true
- pycodestyle --version || true
###
### Show versions
###
before_script:
# Show versions
- ./bin/vhost_gen.py --help
- ./bin/vhost_gen.py --version
###
### Run tests
###
script:
# Coding conventions
- make lint
# Outputs
- make test
# Saving (nginx)
- ./bin/vhost_gen.py -p ./ -n name -t etc/templates/ -c etc/conf.yml -s
- cat /etc/nginx/conf.d/name.conf
# Saving (nginx example)
- ./bin/vhost_gen.py -p ./ -n name -t etc/templates/ -c examples/conf.nginx.yml -s
- cat /etc/nginx/conf.d/name.conf
# Saving (apache22 example)
- ./bin/vhost_gen.py -p ./ -n name -t etc/templates/ -c examples/conf.apache22.yml -s
- cat /etc//httpd/conf.d/name.conf
# Saving (apache24 example)
- ./bin/vhost_gen.py -p ./ -n name -t etc/templates/ -c examples/conf.apache24.yml -s
- cat /etc/apache2/conf.d/name.conf
# Find flaws via fuzzying (before installing config files)
- time .ci/fuzzy.sh
# Find flaws via fuzzying (after installing config files)
- sudo make install
- time .ci/fuzzy.sh