Download:
child 217:87332d6ea39b
parent 215:1b5b19a0ab1a
216:b9b340a89616
Anton Shestakov <av6@dwimlabs.net>, Fri, 12 Aug 2016 18:18:47 +0800
pipelines: check provisioning

1 файлов изменено, 27 вставок(+), 0 удалений(-) [+]
bitbucket-pipelines.yml file | annotate | diff | comparison | revisions
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/bitbucket-pipelines.yml Fri Aug 12 18:18:47 2016 +0800
@@ -0,0 +1,27 @@
+image: ubuntu:trusty
+
+pipelines:
+ default:
+ - step:
+ script:
+ - apt-get update && apt-get install -y python-virtualenv
+ - virtualenv ./venv
+ - ./venv/bin/pip install ansible
+ - ansible --version
+
+ - echo localhost > inventory
+ - ansible-playbook provision/playbook.yml
+ -i inventory --syntax-check
+ - ansible-playbook provision/playbook.yml
+ -i inventory --list-tasks
+
+ - ansible-playbook provision/playbook.yml
+ -i inventory --connection=local --skip-tags=ufw --verbose
+ - pgrep -f '/usr/bin/prosody'
+ - pgrep nginx
+ - pgrep reTurnServer
+ - ansible-playbook provision/playbook.yml
+ -i inventory --connection=local --skip-tags=ufw
+ | grep -q 'changed=0.*failed=0'
+ && { echo 'Idempotence test passed'; exit 0; }
+ || { echo 'Idempotence test failed'; exit 1; }