forked from riemers/ansible-gitlab-runner
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
64 lines (64 loc) · 2.36 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
---
jobs:
include:
- os: linux
dist: focal
python: "3.8"
language: python
addons:
apt:
packages:
- python3-pip
install:
# Install ansible
- sudo update-alternatives --install /usr/bin/python python /usr/bin/python3 1
- echo $PATH
- pip3 install ansible flask
# Check ansible version
- ansible --version
# Create ansible.cfg with correct roles_path
#- printf '[defaults]\nroles_path=../' > ansible.cfg
- "{ echo '[defaults]'; echo 'roles_path = ../'; } > ansible.cfg"
script:
# Basic role syntax check
- ansible-playbook tests/test.yml -i tests/inventory --syntax-check
# Running tests
- ansible-playbook tests/test.yml -i tests/inventory
after_failure:
- touch ~/mock_ci.pid && cat ~/mock_ci.pid
- touch ~/mock_ci.log && cat ~/mock_ci.log
- os: osx
osx_image: xcode10.3
# See https://github.com/travis-ci/travis-ci/issues/2312#issuecomment-422830059
#language: python
language: generic
install:
# Install ansible
- pip install ansible flask
# Check ansible version
- ansible --version
# Create ansible.cfg with correct roles_path
- printf '[defaults]\nroles_path=../' > ansible.cfg
script:
# Basic role syntax check
- ansible-playbook tests/test.yml -i tests/inventory --syntax-check
# Running tests
- ansible-playbook tests/test.yml -i tests/inventory
after_failure:
- touch ~/mock_ci.pid && cat ~/mock_ci.pid
- touch ~/mock_ci.log && cat ~/mock_ci.log
- os: windows
language: shell
install:
- powershell -ExecutionPolicy ByPass -File tests/travis-bootstrap-ansible.ps1
- wsl ansible --version
script:
- wsl mkdir -p tests/roles/ansible-gitlab-runner/
- cd tests/roles/ansible-gitlab-runner/
- wsl ln -s ../../../* .
- cd ../../
- wsl ansible-playbook test.yml -i inventory --syntax-check
# Running tests
- wsl ansible-playbook test.yml -i inventory --extra-vars 'ansible_user=ansible ansible_password=Ans1ble_User! ansible_connection=winrm ansible_winrm_server_cert_validation=ignore ansible_ssh_port=5986'
notifications:
webhooks: https://galaxy.ansible.com/api/v1/notifications/