(gate) Add pep8, bandit and unit testing
- Add some basic gating for Armada while full functional testing is in progress - Adds jobs for pep8 linting, bandit security scanning and python 3.5 unit testing Change-Id: I64d2af8d17d9a2a330df3019e9bfce0ca8d233fa
This commit is contained in:
parent
19efc1ad03
commit
edc4b5537a
62
.zuul.yaml
62
.zuul.yaml
|
@ -14,26 +14,22 @@
|
|||
check:
|
||||
jobs:
|
||||
- airship-armada-linter
|
||||
- airship-armada-ubuntu:
|
||||
voting: false
|
||||
irrelevant-files:
|
||||
- ^.*\.rst$
|
||||
- ^doc/.*$
|
||||
- ^releasenotes/.*$
|
||||
- airship-armada-lint-pep8
|
||||
- airship-armada-ubuntu
|
||||
- airship-armada-unit-py35
|
||||
- airship-armada-security-bandit
|
||||
|
||||
gate:
|
||||
jobs:
|
||||
- airship-armada-linter
|
||||
# NOTE(portdirect): enable when voting enabled.
|
||||
# - airship-armada-ubuntu:
|
||||
# irrelevant-files:
|
||||
# - ^.*\.rst$
|
||||
# - ^doc/.*$
|
||||
# - ^releasenotes/.*$
|
||||
- airship-armada-lint-pep8
|
||||
- airship-armada-unit-py35
|
||||
- airship-armada-security-bandit
|
||||
|
||||
- job:
|
||||
name: airship-armada-linter
|
||||
run: tools/gate/playbooks/zuul-linter.yaml
|
||||
nodeset: openstack-helm-single-node
|
||||
nodeset: airship-armada-single-node
|
||||
|
||||
- job:
|
||||
name: airship-armada
|
||||
|
@ -56,3 +52,43 @@
|
|||
name: airship-armada-ubuntu
|
||||
parent: airship-armada
|
||||
nodeset: openstack-helm-single-node
|
||||
voting: false
|
||||
irrelevant-files:
|
||||
- ^.*\.rst$
|
||||
- ^doc/.*$
|
||||
- ^releasenotes/.*$
|
||||
|
||||
- nodeset:
|
||||
name: airship-armada-single-node
|
||||
nodes:
|
||||
- name: primary
|
||||
label: ubuntu-xenial
|
||||
|
||||
- job:
|
||||
name: airship-armada-unit-py35
|
||||
description: |
|
||||
Executes unit tests under Python 3.5
|
||||
run: tools/gate/playbooks/unit-py35.yaml
|
||||
timeout: 300
|
||||
nodeset: airship-armada-single-node
|
||||
|
||||
- job:
|
||||
name: airship-armada-security-bandit
|
||||
description: |
|
||||
Executes the Bandit security scanner against Python files
|
||||
run: tools/gate/playbooks/security-bandit.yaml
|
||||
timeout: 300
|
||||
nodeset: airship-armada-single-node
|
||||
files:
|
||||
- ^.*\.py$
|
||||
|
||||
- job:
|
||||
name: airship-armada-lint-pep8
|
||||
description: |
|
||||
Lints Python files against the PEP8 standard
|
||||
run: tools/gate/playbooks/pep8-linter.yaml
|
||||
timeout: 300
|
||||
nodeset: airship-armada-single-node
|
||||
files:
|
||||
- ^.*\.py$
|
||||
|
||||
|
|
|
@ -0,0 +1,20 @@
|
|||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
- hosts: primary
|
||||
tasks:
|
||||
- name: Execute the make target for PEP8 linting
|
||||
make:
|
||||
chdir: "{{ zuul.project.src_dir }}"
|
||||
target: test-pep8
|
||||
register: result
|
||||
failed_when: result.failed
|
|
@ -0,0 +1,20 @@
|
|||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
- hosts: primary
|
||||
tasks:
|
||||
- name: Execute the make target for security scanning
|
||||
make:
|
||||
chdir: "{{ zuul.project.src_dir }}"
|
||||
target: test-bandit
|
||||
register: result
|
||||
failed_when: result.failed
|
|
@ -0,0 +1,20 @@
|
|||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
- hosts: primary
|
||||
tasks:
|
||||
- name: Execute the make target for unit testing
|
||||
make:
|
||||
chdir: "{{ zuul.project.src_dir }}"
|
||||
target: test-unit
|
||||
register: result
|
||||
failed_when: result.failed
|
Loading…
Reference in New Issue