Don't save registry logs if registry isn't running
Now that we use the buildset-registry job in all docker builds (whether they run the registry internally or not), in the post playbook we need to check whether the registry was actually started in the pre playbook before we attempt to save its logs. Change-Id: Ifa925faf7bfdc83238677261726aa96461faddb0
This commit is contained in:
parent
adc851b377
commit
f775087476
@ -4,12 +4,18 @@
|
|||||||
|
|
||||||
- hosts: all
|
- hosts: all
|
||||||
tasks:
|
tasks:
|
||||||
|
- name: Check if buildset registry is running
|
||||||
|
command: "docker ps"
|
||||||
|
register: docker_ps
|
||||||
|
|
||||||
- name: Create container log dir
|
- name: Create container log dir
|
||||||
|
when: "'buildset_registry' in docker_ps.stdout"
|
||||||
file:
|
file:
|
||||||
path: "{{ ansible_user_dir }}/zuul-output/logs/docker"
|
path: "{{ ansible_user_dir }}/zuul-output/logs/docker"
|
||||||
state: directory
|
state: directory
|
||||||
|
|
||||||
- name: Save registry container logs
|
- name: Save registry container logs
|
||||||
|
when: "'buildset_registry' in docker_ps.stdout"
|
||||||
loop:
|
loop:
|
||||||
- buildset_proxy
|
- buildset_proxy
|
||||||
- buildset_registry
|
- buildset_registry
|
||||||
|
Loading…
Reference in New Issue
Block a user