@@ -2,9 +2,10 @@ language: none
2
2
3
3
4
4
build :
5
+ pre_ci :
5
6
pre_ci_boot :
6
- image_name : ansible/ ansible
7
- image_tag : centos7
7
+ image_name : quay.io/osas/test- ansible-role_image-builder
8
+ image_tag : latest
8
9
pull : true
9
10
# we need a terminal or certain libc functions will fail
10
11
options : " -ti"
@@ -13,31 +14,10 @@ build:
13
14
- id
14
15
- export
15
16
# prepare the tools
16
- # this image is very bare and we need cron installed to test this role
17
- - yum -y install cronie crontabs
18
- # the Ansible package version is far too old (1.5.4)
19
- - yum -y install python-pip python-devel libffi-devel openssl-devel make gcc gcc-c++ screen
20
- - pip install ansible
21
- # TEMP: fix a bug using the cron module affecting stable
22
- - pip install --upgrade http://releases.ansible.com/ansible/ansible-2.2.0.0-0.2.rc2.tar.gz
23
- # check the installed version
24
- - ansible --version
25
- # ansible-lint is not packaged
26
- - pip install ansible-lint
27
- - pip install flake8
28
- # verify the syntax of the playbook
29
- - ansible-lint tasks/main.yml
30
- # verify python script with pyflakes and pep8
31
- - set -e ; for i in files/*.py; do flake8 $i ;done
32
- # setup the environment to run ansible
33
- - sed -i "s/<ROLE_NAME>/${SHIPPABLE_BUILD_DIR/*\//}/g" role_test.yml
34
- - echo -e "[defaults]\nroles_path = ../\n" > ansible.cfg
35
- # run a syntax check
36
- - ansible-playbook -i '127.0.0.1,' --syntax-check role_test.yml
37
- # check that the role can be run
38
- - ansible-playbook -i '127.0.0.1,' -c local -vvvv role_test.yml
39
- # verify idempotence ( ie, running a 2nd time shouldn't change anything )
40
- - ansible-playbook -i '127.0.0.1,' -c local -vvvv role_test.yml | grep -q 'changed=0.*failed=0'
17
+ - run_tests setup
18
+ # do the tests
19
+ - run_tests preflight
20
+ - run_tests deploy
41
21
42
22
43
23
integrations :
0 commit comments