From 2815d6768877803322f5f4de20c47997568d0f9f Mon Sep 17 00:00:00 2001 From: Vladimir Kozhukalov Date: Mon, 30 Oct 2023 14:54:26 -0500 Subject: [PATCH] Use osh-bandit role for the bandit job Change-Id: I1ced9902237777683feb36e5a3a261b9c0d56c42 --- tools/gate/playbooks/osh-bandit.yaml | 27 +-------------------------- zuul.d/base.yaml | 3 --- 2 files changed, 1 insertion(+), 29 deletions(-) diff --git a/tools/gate/playbooks/osh-bandit.yaml b/tools/gate/playbooks/osh-bandit.yaml index 0f7a397038..6e41df8cef 100644 --- a/tools/gate/playbooks/osh-bandit.yaml +++ b/tools/gate/playbooks/osh-bandit.yaml @@ -2,29 +2,4 @@ roles: - ensure-python - ensure-pip - tasks: - - name: Install Helm - 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} - mv "${TMP_DIR}"/helm /usr/local/bin/helm - rm -rf "${TMP_DIR}" - sudo -H pip3 install --upgrade yq bandit=={{ bandit_version }} setuptools - environment: - zuul_site_mirror_fqdn: "{{ zuul_site_mirror_fqdn }}" - args: - chdir: "{{ zuul.project.src_dir }}" - - - name: Template out python files - shell: | - set -xe; - make all - mkdir -p python-files - ./tools/gate/files/template-python.sh - args: - chdir: "{{ zuul.project.src_dir }}" - - - name: Run bandit against python files - shell: bandit -r ./python-files - args: - chdir: "{{ zuul.project.src_dir }}" + - osh-bandit diff --git a/zuul.d/base.yaml b/zuul.d/base.yaml index 48f28b760f..f9a80e2cff 100644 --- a/zuul.d/base.yaml +++ b/zuul.d/base.yaml @@ -26,9 +26,6 @@ pre-run: tools/gate/playbooks/prepare-hosts.yaml post-run: tools/gate/playbooks/osh-infra-collect-logs.yaml run: tools/gate/playbooks/osh-bandit.yaml - vars: - helm_version: "v3.6.3" - bandit_version: "1.7.1" - job: name: openstack-helm-deploy