4296b7d486
The following error is appearing when the bandit playbook is used: bandit requires Python '>=3.7' but the running Python is 3.6.9 This change specifies bandit 1.7.1 in the playbook, which is compatible with Python 3.5+ Change-Id: I3b43ed6de3a90af49cfc7124fdee542831f73f40
31 lines
808 B
YAML
31 lines
808 B
YAML
---
|
|
- hosts: all
|
|
name: openstack-helm-infra-bandit
|
|
tasks:
|
|
|
|
- name: Install Required Packages and Setup Host
|
|
shell: |
|
|
set -xe;
|
|
./tools/deployment/common/000-install-packages.sh
|
|
./tools/deployment/common/005-deploy-k8s.sh
|
|
sudo -H pip3 install 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/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 }}"
|
|
...
|