Use osh-bandit role for the bandit job
Change-Id: I1ced9902237777683feb36e5a3a261b9c0d56c42
This commit is contained in:
@@ -2,29 +2,4 @@
|
|||||||
roles:
|
roles:
|
||||||
- ensure-python
|
- ensure-python
|
||||||
- ensure-pip
|
- ensure-pip
|
||||||
tasks:
|
- osh-bandit
|
||||||
- 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 }}"
|
|
||||||
|
|||||||
@@ -26,9 +26,6 @@
|
|||||||
pre-run: tools/gate/playbooks/prepare-hosts.yaml
|
pre-run: tools/gate/playbooks/prepare-hosts.yaml
|
||||||
post-run: tools/gate/playbooks/osh-infra-collect-logs.yaml
|
post-run: tools/gate/playbooks/osh-infra-collect-logs.yaml
|
||||||
run: tools/gate/playbooks/osh-bandit.yaml
|
run: tools/gate/playbooks/osh-bandit.yaml
|
||||||
vars:
|
|
||||||
helm_version: "v3.6.3"
|
|
||||||
bandit_version: "1.7.1"
|
|
||||||
|
|
||||||
- job:
|
- job:
|
||||||
name: openstack-helm-deploy
|
name: openstack-helm-deploy
|
||||||
|
|||||||
Reference in New Issue
Block a user