Use osh-bandit role for the bandit job

Change-Id: I1ced9902237777683feb36e5a3a261b9c0d56c42
This commit is contained in:
Vladimir Kozhukalov 2023-10-30 14:54:26 -05:00
parent c987d4a3a0
commit 2815d67688
2 changed files with 1 additions and 29 deletions

View File

@ -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

View File

@ -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