Tristan Cacqueray 4903ecd30b dhall-diff: add new job
This change adds a new dhall-diff job to verify generated config
is idempotent.

Change-Id: I96a335dc78c4fa74564b854997433e5be0b5e633
2020-05-03 19:06:37 +00:00

34 lines
1.1 KiB
YAML

- name: Create temp directory
tempfile:
state: directory
register: dhall_archive_tempdir
- name: Check requested version
fail:
msg: |
Unknown dhall version: {{ dhall_version }}.
It needs to be defined in {{ opendev_url }}/roles/ensure-dhall/defaults/main.yaml
when: dhall_versions[dhall_version] is not defined
vars:
opendev_url: https://opendev.org/zuul/zuul-jobs/src/branch/master/
- name: Download tools
get_url:
url: "{{ zj_dhall_tool_item.url }}"
dest: "{{ dhall_archive_tempdir.path }}/{{ zj_dhall_tool_item.url | basename }}"
checksum: "{{ zj_dhall_tool_item.checksum }}"
loop: "{{ dhall_versions[dhall_version] }}"
loop_control:
loop_var: zj_dhall_tool_item
- name: Unpack tools
command: "tar -xf {{ dhall_archive_tempdir.path }}/{{ zj_dhall_tool_item.url | basename }} --strip-components=2 -j --mode='a+x' -C /usr/local/bin"
become: yes
# ANSIBLE0006: Skip linting since it triggers on the "tar" command,
# but we prefer the command above
tags:
- skip_ansible_lint
loop: "{{ dhall_versions[dhall_version] }}"
loop_control:
loop_var: zj_dhall_tool_item