-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy path.travis.yml
66 lines (59 loc) · 1.82 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
# .travis.yml Execution script for role tests on Travis-CI
---
dist: bionic
sudo: required
env:
global:
- ANSIBLE_VERSION=2.9
matrix:
- DISTRIBUTION: centos
VERSION: 7
# - DISTRIBUTION: centos
# VERSION: 8
# - DISTRIBUTION: ubuntu
# VERSION: 16.04
- DISTRIBUTION: ubuntu
VERSION: 18.04
# - DISTRIBUTION: debian
# VERSION: 9
services:
- docker
language: python
python:
- "3.6"
before_install:
# Install latest Git
- sudo apt-get update
- sudo apt-get install --only-upgrade git
- sudo apt-get install awscli
# Allow fetching other branches than master
#- git config remote.origin.fetch +refs/heads/*:refs/remotes/origin/*
# Fetch the branch with test code
#- git fetch origin docker-tests
#- git worktree add docker-tests origin/docker-tests
# retrieve centralized script
- |
for i in docker-tests.sh functional-tests.sh ansible.cfg; do
wget -O docker-tests/${i} https://raw.githubusercontent.com/open-io/ansible-role-openio-skeleton/docker-tests/${i}
done
# Lint
- sudo pip install --upgrade pip
- sudo pip install ansible-lint yamllint
# sds
- docker run -d openio/sds
- export SDS_DOCKER_ID=$(docker ps -aq)
- while ! docker exec -ti ${SDS_DOCKER_ID}
openio container create travis_container --oio-ns OPENIO --oio-account travis_project; do sleep 1; done
script:
# Lint
#- ansible-lint . -x ANSIBLE0016
- yamllint .
# Create container and apply test playbook
- ./docker-tests/docker-tests.sh test_keystone
- ./docker-tests/docker-tests.sh test_tempauth
# Run functional tests on the container
# keystone
- SUT_ID=$(docker ps -aq |sed '2q;d') SUT_IP=172.17.0.3 ./docker-tests/functional-tests.sh
# tempauth + IAM + bucketDB
- SUT_ID=$(docker ps -aq |sed '1q;d') SUT_IP=172.17.0.4 ./docker-tests/functional-tests.sh
...