Download:
child 239:05d67cdc009c
parent 237:72668edc4a70
238:0b8789a0fcc1
Anton Shestakov <av6@dwimlabs.net>, Sat, 03 Dec 2016 13:24:39 +0800
pipelines: rewrite awkward && {} || {} to a proper if else fi

1 файлов изменено, 6 вставок(+), 3 удалений(-) [+]
bitbucket-pipelines.yml file | annotate | diff | comparison | revisions
--- a/bitbucket-pipelines.yml Sat Dec 03 13:24:09 2016 +0800
+++ b/bitbucket-pipelines.yml Sat Dec 03 13:24:39 2016 +0800
@@ -31,6 +31,9 @@
-i inventory --connection=local --skip-tags=ufw
-t certs,nginx,prosody,turnserver,tram-im
-e 'user=alice dir=/home/alice/files'
- | grep -q 'changed=0.*failed=0'
- && { echo 'Idempotence test passed'; exit 0; }
- || { echo 'Idempotence test failed'; exit 1; }
+ | tee ansible.log
+ - if grep -q 'changed=0.*failed=0' ansible.log; then
+ echo 'Idempotence test passed'; exit 0;
+ else
+ echo 'Idempotence test failed'; exit 1;
+ fi