forked from infraly/k8s-on-openstack
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
31 lines (25 loc) · 825 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
language: python
python: 2.7
virtualenv:
system_site_packages: true
install:
- pip install python-openstackclient
- pip install shade
- pip install ansible
- pip install ansible-lint
env:
NAME: k8s-ci-$TRAVIS_BUILD_NUMBER
NETWORK: k8s-ci-$TRAVIS_BUILD_NUMBER
KEY: ci-$TRAVIS_BUILD_NUMBER
MASTER_BOOT_FROM_VOLUME: False
script:
- ansible-playbook --syntax-check site.yaml
- ansible-lint site.yaml || true
- openstack token issue > /dev/null || (echo "No OpenStack credentials available, not running tests"; exit 1)
- mkdir -p ~/.ssh
- ssh-keygen -t rsa -P "" -f ~/.ssh/id_rsa
- openstack keypair create --public-key ~/.ssh/id_rsa.pub ci-$TRAVIS_BUILD_NUMBER
- ansible-playbook site.yaml
after_script:
- ansible-playbook destroy.yaml
- openstack keypair delete ci-$TRAVIS_BUILD_NUMBER