Merge "Move chart-testing to a role and disable version check"
This commit is contained in:
commit
96300f3543
@ -3,3 +3,4 @@ Helm Roles
|
|||||||
|
|
||||||
.. zuul:autorole:: ensure-helm
|
.. zuul:autorole:: ensure-helm
|
||||||
.. zuul:autorole:: ensure-chart-testing
|
.. zuul:autorole:: ensure-chart-testing
|
||||||
|
.. zuul:autorole:: chart-testing
|
||||||
|
@ -1,10 +1,4 @@
|
|||||||
---
|
---
|
||||||
- hosts: all
|
- hosts: all
|
||||||
tasks:
|
roles:
|
||||||
- name: Run linters
|
- chart-testing
|
||||||
# NOTE(mnaser): We use --validate-maintainers=false because chart-testing
|
|
||||||
# relies on the existance of a remote URL which is /dev/null
|
|
||||||
# in Zuul and fails.
|
|
||||||
command: ct lint --validate-maintainers=false
|
|
||||||
args:
|
|
||||||
chdir: "{{ zuul.project.src_dir }}"
|
|
||||||
|
19
roles/chart-testing/README.rst
Normal file
19
roles/chart-testing/README.rst
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
Run chart-testing (for helm charts)
|
||||||
|
|
||||||
|
**Role Variables**
|
||||||
|
|
||||||
|
.. zuul:rolevar:: zuul_work_dir
|
||||||
|
:default: {{ zuul.project.src_dir }}
|
||||||
|
|
||||||
|
The location of the main working directory of the job.
|
||||||
|
|
||||||
|
.. zuul:rolevar:: chart_testing_options
|
||||||
|
:default: --validate-maintainers=false --check-version-increment=false
|
||||||
|
|
||||||
|
Arguments passed to chart testing.
|
||||||
|
|
||||||
|
The defaults are suitable for a Zuul environment because
|
||||||
|
`validate-maintainers` requires a valid git remote (which is not
|
||||||
|
present in Zuul) and `check-version-increment` requires each commit
|
||||||
|
to have a new version; Zuul users are expected to set the version
|
||||||
|
when tagging/publishing a release.
|
2
roles/chart-testing/defaults/main.yaml
Normal file
2
roles/chart-testing/defaults/main.yaml
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
zuul_work_dir: "{{ zuul.project.src_dir }}"
|
||||||
|
chart_testing_options: --validate-maintainers=false --check-version-increment=false
|
4
roles/chart-testing/tasks/main.yaml
Normal file
4
roles/chart-testing/tasks/main.yaml
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
- name: Run chart-testing
|
||||||
|
command: "ct lint {{ chart_testing_options }}"
|
||||||
|
args:
|
||||||
|
chdir: "{{ zuul_work_dir }}"
|
Loading…
Reference in New Issue
Block a user