forked from akondas/ansible-role-php7
-
Notifications
You must be signed in to change notification settings - Fork 17
/
.travis.yml
140 lines (119 loc) · 5.28 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
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
---
language: bash
sudo: required
services:
- docker
# = Main ======================================================================
before_install:
- docker info
- docker version
jobs:
include:
# - Stage: Syntax check ---------------------------------------------------
- stage: Syntax check
env:
- ANSIBLE_VERSION="2.4"
script:
- echo "==> Syntax Check on Ansible $ANSIBLE_VERSION ..."
- docker run --rm -it chusiang/ansible:$ANSIBLE_VERSION
ansible --version
- docker run --rm -it -v $PWD:/srv chusiang/ansible:$ANSIBLE_VERSION
/bin/sh -c "cd /srv && ansible-playbook --syntax-check setup.yml"
- stage: Syntax check
env:
- ANSIBLE_VERSION="2.5"
script:
- echo "==> Syntax Check on Ansible $ANSIBLE_VERSION ..."
- docker run --rm -it chusiang/ansible:$ANSIBLE_VERSION
ansible --version
- docker run --rm -it -v $PWD:/srv chusiang/ansible:$ANSIBLE_VERSION
/bin/sh -c "cd /srv && ansible-playbook --syntax-check setup.yml"
- stage: Syntax check
env:
- ANSIBLE_VERSION="2.6"
script:
- echo "==> Syntax Check on Ansible $ANSIBLE_VERSION ..."
- docker run --rm -it chusiang/ansible:$ANSIBLE_VERSION
ansible --version
- docker run --rm -it -v $PWD:/srv chusiang/ansible:$ANSIBLE_VERSION
/bin/sh -c "cd /srv && ansible-playbook --syntax-check setup.yml"
- stage: Syntax check
env:
- ANSIBLE_VERSION="2.7"
script:
- echo "==> Syntax Check on Ansible $ANSIBLE_VERSION ..."
- docker run --rm -it chusiang/ansible:$ANSIBLE_VERSION
ansible --version
- docker run --rm -it -v $PWD:/srv chusiang/ansible:$ANSIBLE_VERSION
/bin/sh -c "cd /srv && ansible-playbook --syntax-check setup.yml"
# - Stage: Lint check -----------------------------------------------------
- stage: Lint check
env:
- ANSIBLE_VERSION="2.4"
script:
- echo "==> Lint Check on Ansible $ANSIBLE_VERSION ..."
- docker run --rm -it chusiang/ansible:$ANSIBLE_VERSION
ansible --version
- docker run --rm -it -v $PWD:/srv chusiang/ansible:$ANSIBLE_VERSION
/bin/sh -c "cd /srv && ansible-lint setup.yml"
- stage: Lint check
env:
- ANSIBLE_VERSION="2.5"
script:
- echo "==> Lint Check on Ansible $ANSIBLE_VERSION ..."
- docker run --rm -it chusiang/ansible:$ANSIBLE_VERSION
ansible --version
- docker run --rm -it -v $PWD:/srv chusiang/ansible:$ANSIBLE_VERSION
/bin/sh -c "cd /srv && ansible-lint setup.yml"
- stage: Lint check
env:
- ANSIBLE_VERSION="2.6"
script:
- echo "==> Lint Check on Ansible $ANSIBLE_VERSION ..."
- docker run --rm -it chusiang/ansible:$ANSIBLE_VERSION
ansible --version
- docker run --rm -it -v $PWD:/srv chusiang/ansible:$ANSIBLE_VERSION
/bin/sh -c "cd /srv && ansible-lint setup.yml"
- stage: Lint check
env:
- ANSIBLE_VERSION="2.7"
script:
- echo "==> Lint Check on Ansible $ANSIBLE_VERSION ..."
- docker run --rm -it chusiang/ansible:$ANSIBLE_VERSION
ansible --version
- docker run --rm -it -v $PWD:/srv chusiang/ansible:$ANSIBLE_VERSION
/bin/sh -c "cd /srv && ansible-lint setup.yml"
- stage: Lint check
env:
- YAMLLINT_VERSION="1.5"
script:
- echo "==> Lint Check via yamllint v$ANSIBLE_VERSION ..."
- docker run --rm -it chusiang/yamllint:$YAMLLINT_VERSION
yamllint --version
- docker run --rm -v $PWD:/srv chusiang/yamllint:$YAMLLINT_VERSION
make yaml_check
# - Stage: Build ----------------------------------------------------------
- stage: Build
env:
- OS="ubuntu1604"
script:
- echo "==> Build on $OS ..."
- docker build -f tests/Dockerfile.$OS -t php7:$OS . |
tee tests/output.$OS.log
- echo "==> Run test case on $OS ..."
- grep '00:00:00 php-fpm7' tests/output.$OS.log
- stage: Build
env:
- OS="ubuntu1804"
script:
- echo "==> Build on $OS ..."
- docker build -f tests/Dockerfile.$OS -t php7:$OS . |
tee tests/output.$OS.log
- echo "==> Run test case on $OS ..."
- grep '00:00:00 php-fpm7' tests/output.$OS.log
# = Notification: Ansible Galaxy, Slack =======================================
notifications:
webhooks: https://galaxy.ansible.com/api/v1/notifications/
slack:
secure: SC5RcR4iSFgyrEgLW4FfQlrY/6u1i/PjxSEgP1GR9Yq1EaelMkjajtszN71A0aAqlBe+2aHHmIqffjtP6PcVIIR1UNnbBnzKgEUl3MaYDBa2gD2PDLb2Z2LIDkW3iboIvxMkd3B9xTBJpydMo0qZHTd1pbsMrFj7XnUyiNC6XmgSesaqnXvA0v1uQ7afmROW0VRd+DEC4aIflxTnO6IYt9j7hBZ4+tU251FFLz3zQz1Oe+J95G71RUuBVm+MgjjKnHwTp5wSUVu+jkCljrdEJiww1IRQsSkYPyGvu4W/a5QEGoM5/I8fPdlz03g5KJd4fnGKDku2zJqeDA9iX5fZivhksxhyqyxhT3SA5BBFfgZLr2WhIxOEnZ0FamC7kxYdR7gumJyXrj0wJrTXNn0CHWEjb/rdLcoPskRTwMDnz+0aiv2S0/z2HhAij+MNq+jGJlX6UxfXNtHYXMhs1tz8ATSUy3nwOy8M9GoG69rT87B8uiPbzpxbT46+U35gJhcgiBo1Bs/JM8evYFNfN9fbvqV4T5vttZUI/HAt5f0gjuDqvJFWnNL/P52Ylz+gCAPw/R/AwnInr7b/g4x0oUh8XJ2FvcKkC+RJXZychNoT85IVrBOLFi7ydU37/aPnAZ3ViDZY5c4ZsMVIaHKKAfU9dHRtuNz/vaPabjYJms1zE/I=
# vim: ft=yaml :