forked from configuresystems/ansible-jira
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
39 lines (30 loc) · 939 Bytes
/
.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
---
language: python
python: "2.7"
env:
- SITE=test.yml
before_install:
- sudo apt-get update -qq
- sudo apt-get install -y curl python-pip python-apt gcc
install:
# Install Ansible 1.8.4 per these tests.
- pip install ansible==1.8.4
script:
# Check the role/playbook's syntax.
- ansible-playbook -i tests/inventory/test tests/$SITE --syntax-check
# Run the role/playbook with ansible-playbook.
- ansible-playbook -i tests/inventory/test tests/$SITE --connection=local --sudo
# Allow time for Jira to start
- sleep 30
# Ensure Jira is accessible via HTTP
- >
curl -Is http://localhost:8080/
| grep -q "HTTP/1.1 302 Found"
&& (echo 'Jira is accessible: pass' && exit 0)
|| (echo 'Jira is accessible: fail' && exit 1)
# Ensure Stash is on 8080
- >
sudo netstat -plnt
| grep -q 8080
&& (echo 'Jira is running: pass' && exit 0)
|| (echo 'Jira is running: fail' && exit 1)