playbooks/to-build-or-not-to-build.yml is not properly determining to build for changes in the always build list. This can be observed using:
ZUUL_CHANGES=openstack/tripleo-heat-templates:master:refs/changes/12/559812/1^openstack/tripleo-puppet-elements:master:refs/changes/72/521172/5 ansible-playbook playbooks/to-build-or-not-to-build.yml
ZUUL_CHANGES=openstack/tripleo-puppet-elements:master:refs/changes/72/521172/11 ansible-playbook playbooks/to-build-or-not-to-build.yml
The latter results in the use of cached images while the former correctly determins to always build.
Correct:
➜ ZUUL_CHANGES=openstack/tripleo-heat-templates:master:refs/changes/12/559812/1^openstack/tripleo-puppet-elements:master:refs/changes/72/521172/5 ansible-playbook playbooks/to-build-or-not-to-build.yml
[WARNING]: Unable to parse /etc/ansible/hosts as an inventory source
[WARNING]: No inventory was parsed, only implicit localhost is available
[WARNING]: provided hosts list is empty, only localhost is available. Note that the implicit localhost does not match 'all'
PLAY [Decide whether we need to build images] ***********************************************************************************************************************************************************************
TASK [Gathering Facts] **********************************************************************************************************************************************************************************************
ok: [localhost]
TASK [Cleanup front of ZUUL_CHANGES] ********************************************************************************************************************************************************************************
ok: [localhost]
TASK [Cleanup end of ZUUL_CHANGES] **********************************************************************************************************************************************************************************
ok: [localhost]
TASK [Split zuul_changes to a list] *********************************************************************************************************************************************************************************
ok: [localhost]
TASK [compare zuul_changes list to our always_build_list] ***********************************************************************************************************************************************************
ok: [localhost]
TASK [Default to using cached images] *******************************************************************************************************************************************************************************
ok: [localhost]
TASK [Build images when we have a change in the always build list] **************************************************************************************************************************************************
ok: [localhost]
TASK [Always build images in the periodic jobs] *********************************************************************************************************************************************************************
[WARNING]: when statements should not include jinja2 templating delimiters such as {{ }} or {% %}. Found: {{ lookup('env', 'PERIODIC')|default('0')|int == 1 }}
skipping: [localhost]
PLAY RECAP **********************************************************************************************************************************************************************************************************
localhost : ok=7 changed=0 unreachable=0 failed=0
Incorrect:
➜ ZUUL_CHANGES=openstack/tripleo-puppet-elements:master:refs/changes/72/521172/11 ansible-playbook playbooks/to-build-or-not-to-build.yml
[WARNING]: Unable to parse /etc/ansible/hosts as an inventory source
[WARNING]: No inventory was parsed, only implicit localhost is available
[WARNING]: provided hosts list is empty, only localhost is available. Note that the implicit localhost does not match 'all'
PLAY [Decide whether we need to build images] ***********************************************************************************************************************************************************************
TASK [Gathering Facts] **********************************************************************************************************************************************************************************************
ok: [localhost]
TASK [Cleanup front of ZUUL_CHANGES] ********************************************************************************************************************************************************************************
ok: [localhost]
TASK [Cleanup end of ZUUL_CHANGES] **********************************************************************************************************************************************************************************
ok: [localhost]
TASK [Split zuul_changes to a list] *********************************************************************************************************************************************************************************
ok: [localhost]
TASK [compare zuul_changes list to our always_build_list] ***********************************************************************************************************************************************************
ok: [localhost]
TASK [Default to using cached images] *******************************************************************************************************************************************************************************
ok: [localhost]
TASK [Build images when we have a change in the always build list] **************************************************************************************************************************************************
skipping: [localhost]
TASK [Always build images in the periodic jobs] *********************************************************************************************************************************************************************
[WARNING]: when statements should not include jinja2 templating delimiters such as {{ }} or {% %}. Found: {{ lookup('env', 'PERIODIC')|default('0')|int == 1 }}
skipping: [localhost]
PLAY RECAP **********************************************************************************************************************************************************************************************************
localhost : ok=6 changed=0 unreachable=0 failed=0
Fix proposed to branch: master /review. openstack. org/563760
Review: https:/