openstack-helm/tools/gate/playbooks/osh-bandit.yaml
Anderson, Craig (ca846m) 3ec6a94276 Fix failing bandit gate
Install bandit version compatible with Python 3.6.9

Change-Id: Ie6d5f343c73ba4df7e061f200d0ae201f65a5aa9
2022-02-20 12:15:19 -08:00

29 lines
789 B
YAML

- hosts: all
name: openstack-helm-bandit
tasks:
- name: Install Required Packages and Setup Host
shell: |
set -xe;
./tools/deployment/common/install-packages.sh
./tools/gate/deploy-k8s.sh
sudo -H pip3 install --upgrade yq bandit==1.7.1 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 }}"