diff options
| author | Jeffrey Zhang <zhang.lei.fly@gmail.com> | 2017-10-20 13:50:21 +0800 |
|---|---|---|
| committer | Jeffrey Zhang <zhang.lei.fly@gmail.com> | 2017-10-26 09:58:29 +0800 |
| commit | cdd125117f0ca65300b608734caa2eb36779fcea (patch) | |
| tree | 14c197edc7e0a7a1cdb54d2996261c5375842821 /tools | |
| parent | e2301f071717deb2a708c416cea8549dbdc07b02 (diff) | |
| download | kolla-ansible-cdd125117f0ca65300b608734caa2eb36779fcea.tar.gz kolla-ansible-cdd125117f0ca65300b608734caa2eb36779fcea.zip | |
Optimize zuul v3 jobs
- move check container failure from post.yml to run.yml
- add binary related jobs
- use static kolla-ansible src dir, which is helpful for kolla project
to use.
- generate correct /etc/hosts by using private ip address and hostname
- fix the wrong api interface in global.yml file
Change-Id: Idfdee6dfe18f0fa2d4f984df59b57553122ce298
Diffstat (limited to 'tools')
| -rwxr-xr-x | tools/setup_gate.sh | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/tools/setup_gate.sh b/tools/setup_gate.sh index 8e97d6b68..2af7ede5c 100755 --- a/tools/setup_gate.sh +++ b/tools/setup_gate.sh @@ -151,6 +151,23 @@ function sanity_check { fi } +check_failure() { + # All docker container's status are created, restarting, running, removing, + # paused, exited and dead. Containers without running status are treated as + # failure. removing is added in docker 1.13, just ignore it now. + failed_containers=$(sudo docker ps -a --format "{{.Names}}" \ + --filter status=created \ + --filter status=restarting \ + --filter status=paused \ + --filter status=exited \ + --filter status=dead) + + if [[ -n "$failed_containers" ]]; then + exit 1; + fi +} + + clone_repos setup_ansible @@ -191,3 +208,5 @@ tools/kolla-ansible -i ${RAW_INVENTORY} -vvv prechecks > /tmp/logs/ansible/prech ara generate html /tmp/logs/playbook_reports/ gzip --recursive --best /tmp/logs/playbook_reports/ + +check_failure |
