Revert "Do not set buildset_fact if it's not present in results.json"

This reverts commit bc0ca442a1.

Change-Id: If0885877a1c976ed430d6e3a7a462e06042874fb
This commit is contained in:
Albin Vass 2020-04-28 18:35:10 +00:00
parent bc0ca442a1
commit b5e87e62f1
3 changed files with 5 additions and 19 deletions

View File

@ -1,16 +1,9 @@
- 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
- name: Load information from zuul_return
when: buildset_registry is not defined
set_fact:
buildset_registry: "{{ (lookup('file', zuul.executor.work_root + '/results.json') | from_json)['buildset_registry'] }}"
when:
- buildset_registry is not defined
- result_json_stat.stat.exists
- "'buildset_registry' in (lookup('file', zuul.executor.work_root + '/results.json') | from_json)"
ignore_errors: true
- name: Set container filename arg
set_fact:

View File

@ -1,16 +1,9 @@
- 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
- name: Load information from zuul_return
when: buildset_registry is not defined
set_fact:
buildset_registry: "{{ (lookup('file', zuul.executor.work_root + '/results.json') | from_json)['buildset_registry'] }}"
when:
- buildset_registry is not defined
- result_json_stat.stat.exists
- "'buildset_registry' in (lookup('file', zuul.executor.work_root + '/results.json') | from_json)"
ignore_errors: true
- name: Build docker images
include_tasks: build.yaml

View File

@ -1,7 +1,7 @@
- name: List containers
command: "{{ container_command }} ps -a --format '{{ '{{ .Names }}' }}'"
register: docker_containers
failed_when: false
ignore_errors: true
- name: Create container log dir
file: