From 41e60f065c8f4fc8ab2a9a6486fc11d286429df7 Mon Sep 17 00:00:00 2001 From: Gage Hugo Date: Mon, 30 Aug 2021 17:24:30 -0500 Subject: [PATCH] Update lint job to use helm v3 This change updates the lint job to use helm v3. This is part of the effort to migrate from helm v2 to v3 and to ensure each chart is compatible with helm v3. Change-Id: Ibc8ba5d8fe8efc3637d64df61305602385e644e4 --- playbooks/lint.yml | 31 +++++++++++++++++-------------- 1 file changed, 17 insertions(+), 14 deletions(-) diff --git a/playbooks/lint.yml b/playbooks/lint.yml index fce017281..e6f4c9608 100644 --- a/playbooks/lint.yml +++ b/playbooks/lint.yml @@ -14,21 +14,24 @@ # limitations under the License. - hosts: all - roles: - - name: build-helm-packages - work_dir: "{{ zuul.projects['opendev.org/openstack/openstack-helm-infra'].src_dir }}" - - name: build-helm-packages - work_dir: "{{ zuul.projects['opendev.org/openstack/openstack-helm'].src_dir }}" - when: "zuul.project.name == 'openstack/openstack-helm'" - - ensure-chart-testing - - name: chart-testing - chart_testing_options: "--chart-dirs=. --validate-maintainers=false" - zuul_work_dir: "{{ work_dir }}" - vars: - work_dir: "{{ zuul.project.src_dir }}/{{ zuul_osh_infra_relative_path | default('') }}" - -- hosts: all[0] tasks: + - name: install helm3 + become_user: root + shell: | + TMP_DIR=$(mktemp -d) + curl -sSL https://get.helm.sh/helm-${HELM_VERSION}-linux-amd64.tar.gz | tar -zxv --strip-components=1 -C ${TMP_DIR} + sudo mv ${TMP_DIR}/helm /usr/bin/helm + rm -rf ${TMP_DIR} + environment: + HELM_VERSION: "v3.6.3" + args: + executable: /bin/bash + + - name: make all + make: + chdir: "{{ zuul.project.src_dir }}" + target: all + - name: Prevent trailing whitespaces shell: find . \! \( -path "*/\.*" -o -path "*/doc/build/*" -o -name "*.tgz" -o -name "*.png" \) -type f -exec egrep -l " +$" {} \; register: _found_whitespaces