diff --git a/roles/ensure-chart-testing/README.rst b/roles/ensure-chart-testing/README.rst index 60d0720b8..2b2e6533d 100644 --- a/roles/ensure-chart-testing/README.rst +++ b/roles/ensure-chart-testing/README.rst @@ -4,4 +4,14 @@ Ensure chart-testing is installed .. zuul:rolevar:: chart_testing_version - Version of chart-testing to install + Version of chart-testing to install. + +.. zuul:rolevar:: ensure_chart_testing_repo_name_helm_chart + :default: https://github.com/helm/chart-testing/releases/download + + The root location to get the chart testing helm chart. + +.. zuul:rolevar:: ensure_chart_testing_repo_name_config + :default: https://raw.githubusercontent.com/helm/chart-testing + + The root location to get the chart testing configuration files. diff --git a/roles/ensure-chart-testing/defaults/main.yaml b/roles/ensure-chart-testing/defaults/main.yaml index 93ea65d65..6aee3616c 100644 --- a/roles/ensure-chart-testing/defaults/main.yaml +++ b/roles/ensure-chart-testing/defaults/main.yaml @@ -1,2 +1,4 @@ --- chart_testing_version: 2.4.0 +ensure_chart_testing_repo_name_helm_chart: "https://github.com/helm/chart-testing/releases/download" +ensure_chart_testing_repo_name_config: "https://raw.githubusercontent.com/helm/chart-testing" diff --git a/roles/ensure-chart-testing/tasks/main.yaml b/roles/ensure-chart-testing/tasks/main.yaml index d6a24d949..9d58a0fc3 100644 --- a/roles/ensure-chart-testing/tasks/main.yaml +++ b/roles/ensure-chart-testing/tasks/main.yaml @@ -14,7 +14,7 @@ become: true unarchive: remote_src: true - src: "https://github.com/helm/chart-testing/releases/download/v{{ chart_testing_version }}/chart-testing_{{ chart_testing_version }}_linux_amd64.tar.gz" + 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 @@ -27,7 +27,7 @@ - name: Install configuration files become: true get_url: - url: "https://raw.githubusercontent.com/helm/chart-testing/v{{ chart_testing_version }}/etc/{{ zj_item }}" + url: "{{ ensure_chart_testing_repo_name_config }}/v{{ chart_testing_version }}/etc/{{ zj_item }}" dest: "/etc/ct/{{ zj_item }}" loop: - chart_schema.yaml