Skip to content
This repository was archived by the owner on Oct 15, 2020. It is now read-only.

Commit 8aaee7a

Browse files
committed
moved logic in a dedicated docker image
1 parent 36b6a94 commit 8aaee7a

File tree

1 file changed

+7
-27
lines changed

1 file changed

+7
-27
lines changed

shippable.yml

Lines changed: 7 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,10 @@ language: none
22

33

44
build:
5+
pre_ci:
56
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
89
pull: true
910
# we need a terminal or certain libc functions will fail
1011
options: "-ti"
@@ -13,31 +14,10 @@ build:
1314
- id
1415
- export
1516
# 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
4121

4222

4323
integrations:

0 commit comments

Comments
 (0)