forked from vmware-archive/chaperone
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
29 lines (25 loc) · 873 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
---
language: python
python: "2.7"
sudo: required
before_install:
- pwd
- "sudo apt-get -y install curl lsb_release || true"
- curl https://storage.googleapis.com/git-repo-downloads/repo > /tmp/repo
- chmod a+x /tmp/repo
- sudo mv /tmp/repo /bin/repo
- git config --global user.email "you@example.com"
- git config --global user.name "Your Name"
- "[ -d /opt/chaperone ] || sudo mkdir -p /opt/chaperone"
- export SLUG=$TRAVIS_REPO_SLUG
- export BRANCH=$TRAVIS_BRANCH
- 'if [ "$TRAVIS_PULL_REQUEST" != "false" ]; then export SLUG=$TRAVIS_PULL_REQUEST_SLUG; export BRANCH=$TRAVIS_PULL_REQUEST_BRANCH; fi'
- env
install:
- pip install ansible ansible-lint
script:
- cd /tmp
- echo "y" | repo init -u https://github.com/$SLUG -b $BRANCH -g chaperone
- repo sync
- cd ansible/playbooks/ansible
- ansible-playbook -i inventory ansible.yml