Currently this no_logs the entire selection and delete loop, which is
probably maximal efficiency but makes it very hard to debug on failure
(which we are seeing). This extracts the list creation and uri call
so we can see the tags it is trying to delete.
Change-Id: I93fd19aedaa9fc328a1a347986a5f0c20439d476
Change Ibc84e4f3fb18331ff6e2eb01037254be65dc53f5 removed the {{ from
this, which Ansible does warn about. However it then started failing.
Upon local testing, I could see
The conditional check 'ansible_date_time.iso8601 |
regex_replace('^(....-..-..)T(..:..:..).*Z', '\\1 \\2') |
to_datetime' failed. The error was: time data '\\x01 \\x02' does not
match format '%Y-%m-%d %H:%M:%S
So for whatever reason, without the surrounding {{ }} the
regex_replace is getting turned into the string "\\1 \\2" -- not the
first and second results of the match. Double quoting seems to fix
this.
Change-Id: I689385a3eb8b9ce373ff579c72cd29e46ebcaf8b
Use '{{ zuul.pipeline }}' tag prefix in *-docker-image instead of
'change_{{ zuul.change }}' one when zuul.change is not provided, that is
the case with periodic jobs. This allows to build, upload and promote images
using periodic jobs e.g:
- project:
periodic:
- project-buildset-registry
- project-build-image1:
dependencies:
- name: project-buildset-registry
- project-build-image2:
dependencies:
- name: project-buildset-registry
# pulls from buildset registry and tests both images
- project-test:
dependencies:
- name: project-build-image1
- name: project-build-image2
# pre-pulls images from buildset registry for fast build
- project-upload-image1:
dependencies:
- name: project-test
- project-upload-image2:
dependencies:
- name: project-test
- project-promote:
dependencies:
- name: project-upload-image1
- name: project-upload-image2
This fuctionality will allow to keep latest images up to date for the
case when image incorporates continuously updating code from multiple
repositories.
Using true ternary for tag evaluation because ternary filter requires
all passed to it variables be defined or defaulted [0].
[0] https://github.com/ansible/ansible/issues/51276
Change-Id: I8eb7d2baa24905e7aac51fce0b2f9b1f24f037f9
Signed-off-by: Andrii Ostapenko <andrii.ostapenko@att.com>
This uses a new method of calculating the cutoff time which does not
require executing code on the executor.
Change-Id: I92e71727e24281a31cb7caf0b78dd17a5aaae129
Co-Authored-By: Clark Boylan <clark.boylan@gmail.com>
This was relying on a bug in the executor. It's not critical
functionality, so just avoid it for now.
Change-Id: I6069150324d0b921cdb8cbc6902e74ec2a6036cc
Adds yamllint to the linters with a minimal configuration, some
rules are disabled to allow us to fix them in follow-ups, if
we agree on them.
Fixes invalid YAML file containing characters inside block.
Fixes few minor linting issues.
Change-Id: I936fe2c997597972d884c5fc62655d28e8aaf8c5
The variable was changed inside the role from image to zj_image but the
included task file did not use the new variable name. This patch fixes
this.
Change-Id: Ibe3acbd0881da24ec9c2f636d777885a309bdf98
This adds a custom ansible-lint rule at .rules/ZuulJobsNamespaceLoopVar.py
that enforces the loop var policy described at:
https://zuul-ci.org/docs/zuul-jobs/policy.html#ansible-loops-in-roles
It also updates existing roles to follow the policy.
Change-Id: I92b2ff56a1c2702542fc07b316f1809087a4c92f