Merge "Do not set buildset_fact if it's not present in results.json"
This commit is contained in:
commit
6fb73060ec
@ -1,9 +1,16 @@
|
|||||||
|
- name: Check for results.json
|
||||||
|
stat:
|
||||||
|
path: "{{ zuul.executor.work_root }}/results.json"
|
||||||
|
register: result_json_stat
|
||||||
|
|
||||||
# This can be removed if we add this functionality to Zuul directly
|
# This can be removed if we add this functionality to Zuul directly
|
||||||
- name: Load information from zuul_return
|
- name: Load information from zuul_return
|
||||||
when: buildset_registry is not defined
|
|
||||||
set_fact:
|
set_fact:
|
||||||
buildset_registry: "{{ (lookup('file', zuul.executor.work_root + '/results.json') | from_json)['buildset_registry'] }}"
|
buildset_registry: "{{ (lookup('file', zuul.executor.work_root + '/results.json') | from_json)['buildset_registry'] }}"
|
||||||
ignore_errors: true
|
when:
|
||||||
|
- buildset_registry is not defined
|
||||||
|
- result_json_stat.stat.exists
|
||||||
|
- "'buildset_registry' in (lookup('file', zuul.executor.work_root + '/results.json') | from_json)"
|
||||||
|
|
||||||
- name: Set container filename arg
|
- name: Set container filename arg
|
||||||
set_fact:
|
set_fact:
|
||||||
|
@ -1,9 +1,16 @@
|
|||||||
|
- name: Check for results.json
|
||||||
|
stat:
|
||||||
|
path: "{{ zuul.executor.work_root }}/results.json"
|
||||||
|
register: result_json_stat
|
||||||
|
|
||||||
# This can be removed if we add this functionality to Zuul directly
|
# This can be removed if we add this functionality to Zuul directly
|
||||||
- name: Load information from zuul_return
|
- name: Load information from zuul_return
|
||||||
when: buildset_registry is not defined
|
|
||||||
set_fact:
|
set_fact:
|
||||||
buildset_registry: "{{ (lookup('file', zuul.executor.work_root + '/results.json') | from_json)['buildset_registry'] }}"
|
buildset_registry: "{{ (lookup('file', zuul.executor.work_root + '/results.json') | from_json)['buildset_registry'] }}"
|
||||||
ignore_errors: true
|
when:
|
||||||
|
- buildset_registry is not defined
|
||||||
|
- result_json_stat.stat.exists
|
||||||
|
- "'buildset_registry' in (lookup('file', zuul.executor.work_root + '/results.json') | from_json)"
|
||||||
|
|
||||||
- name: Build docker images
|
- name: Build docker images
|
||||||
include_tasks: build.yaml
|
include_tasks: build.yaml
|
||||||
|
Loading…
x
Reference in New Issue
Block a user