zuul-jobs/roles/ensure-chart-testing/tasks/main.yaml
ricolin bb9c303fab Fix collection import error
We need this specific fix [1] to target error:

from collections import Sequence, Mapping
ImportError: cannot import name 'Sequence' from 'collections'

[1] https://github.com/23andMe/Yamale/commit/
0ddd618c8ba7aa6df146a840b15a1285c476e10e

Change-Id: I04f3221624bdf88803b9e5f4a9fa3eabade756b1
2024-04-18 22:44:11 +08:00

37 lines
812 B
YAML

---
- name: Install pip
include_role:
name: ensure-pip
- name: Install Python dependencies
become: true
pip:
name:
- yamale==1.8.1
- yamllint==1.13.0
- name: Install chart-testing
become: true
unarchive:
remote_src: true
src: "{{ ensure_chart_testing_repo_name_helm_chart }}/v{{ chart_testing_version }}/chart-testing_{{ chart_testing_version }}_linux_amd64.tar.gz"
dest: /usr/local/bin
- name: Setup /etc/ct
become: true
file:
path: /etc/ct
state: directory
mode: 0755
- name: Install configuration files
become: true
get_url:
url: "{{ ensure_chart_testing_repo_name_config }}/v{{ chart_testing_version }}/etc/{{ zj_item }}"
dest: "/etc/ct/{{ zj_item }}"
loop:
- chart_schema.yaml
- lintconf.yaml
loop_control:
loop_var: zj_item