diff --git a/.zuul.yaml b/.zuul.yaml index 767b1d7f..8a8036f4 100644 --- a/.zuul.yaml +++ b/.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$ + diff --git a/tools/gate/playbooks/pep8-linter.yaml b/tools/gate/playbooks/pep8-linter.yaml new file mode 100644 index 00000000..a294d081 --- /dev/null +++ b/tools/gate/playbooks/pep8-linter.yaml @@ -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 diff --git a/tools/gate/playbooks/security-bandit.yaml b/tools/gate/playbooks/security-bandit.yaml new file mode 100644 index 00000000..354d26c9 --- /dev/null +++ b/tools/gate/playbooks/security-bandit.yaml @@ -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 diff --git a/tools/gate/playbooks/unit-py35.yaml b/tools/gate/playbooks/unit-py35.yaml new file mode 100644 index 00000000..b4e7c3bf --- /dev/null +++ b/tools/gate/playbooks/unit-py35.yaml @@ -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