diff --git a/.zuul.yaml b/.zuul.yaml index 05c20945..bd876707 100644 --- a/.zuul.yaml +++ b/.zuul.yaml @@ -13,35 +13,14 @@ - project: check: jobs: - - airship-drydock-lint-ws - - airship-drydock-doc-build - - airship-drydock-lint-pep8: - files: - - ^.*\.py$ - - airship-drydock-lint-chart: - files: - - ^charts/.*$ - - airship-drydock-unit-py35 - - airship-drydock-security-bandit: - files: - - ^.*\.py$ + - airship-drydock-omni-test - airship-drydock-docker-build-gate gate: jobs: - - airship-drydock-lint-ws - - airship-drydock-doc-build - - airship-drydock-lint-pep8: - files: - - ^.*\.py$ - - airship-drydock-lint-chart: - files: - - ^charts/.*$ - - airship-drydock-unit-py35 + - airship-drydock-omni-test - airship-drydock-docker-build-gate - - airship-drydock-security-bandit: - files: - - ^.*\.py$ + post: jobs: - airship-drydock-doc-publish @@ -54,43 +33,12 @@ label: ubuntu-xenial - job: - name: airship-drydock-lint-ws + name: airship-drydock-omni-test description: | - Lints all files for trailing whitespace - run: tools/gate/playbooks/zuul-linter.yaml - timeout: 300 - nodeset: airship-drydock-single-node - -- job: - name: airship-drydock-lint-pep8 - description: | - Lints Python files against the PEP8 standard - run: tools/gate/playbooks/pep8-linter.yaml - timeout: 300 - nodeset: airship-drydock-single-node - -- job: - name: airship-drydock-lint-chart - description: | - Lints Helm charts for validity - run: tools/gate/playbooks/helm-linter.yaml - timeout: 300 - nodeset: airship-drydock-single-node - -- job: - name: airship-drydock-unit-py35 - description: | - Executes unit tests under Python 3.5 - run: tools/gate/playbooks/unit-py35.yaml - timeout: 300 - nodeset: airship-drydock-single-node - -- job: - name: airship-drydock-security-bandit - description: | - Executes the Bandit security scanner against Python files - run: tools/gate/playbooks/security-bandit.yaml - timeout: 300 + Run a set of lightweight lints and tests + (pep8, Helm chart lint, Sphinx build, Python unit tests, Bandit scan) + run: tools/gate/playbooks/omni_test.yaml + timeout: 900 nodeset: airship-drydock-single-node - job: @@ -126,14 +74,6 @@ static: - latest -- job: - name: airship-drydock-doc-build - description: | - Locally build the documentation to check for errors - run: tools/gate/playbooks/doc-build.yaml - timeout: 300 - nodeset: airship-drydock-single-node - - job: name: airship-drydock-doc-publish description: | diff --git a/tools/gate/playbooks/doc-build.yaml b/tools/gate/playbooks/doc-build.yaml deleted file mode 100644 index b7b2aa16..00000000 --- a/tools/gate/playbooks/doc-build.yaml +++ /dev/null @@ -1,20 +0,0 @@ -# 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: Build documents locally - make: - chdir: "{{ zuul.project.src_dir }}" - target: docs - register: result - failed_when: result.failed diff --git a/tools/gate/playbooks/helm-linter.yaml b/tools/gate/playbooks/omni_test.yaml similarity index 51% rename from tools/gate/playbooks/helm-linter.yaml rename to tools/gate/playbooks/omni_test.yaml index 60452935..5cbbb94d 100644 --- a/tools/gate/playbooks/helm-linter.yaml +++ b/tools/gate/playbooks/omni_test.yaml @@ -1,4 +1,3 @@ - # 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 @@ -11,11 +10,34 @@ # See the License for the specific language governing permissions and # limitations under the License. +# Combine several test tasks into a single playbook +# to minimize Zuul node consumption + - hosts: primary tasks: + - name: Execute the make target for PEP8 linting + make: + chdir: "{{ zuul.project.src_dir }}" + target: pep8 + register: result - name: Execute the make target for Helm chart linting make: chdir: "{{ zuul.project.src_dir }}" target: helm_lint register: result - failed_when: result.failed + - name: Build documents locally + make: + chdir: "{{ zuul.project.src_dir }}" + target: docs + register: result + - name: Execute the make target for security scanning + make: + chdir: "{{ zuul.project.src_dir }}" + target: security + register: result + - name: Execute the make target for unit testing + make: + chdir: "{{ zuul.project.src_dir }}" + target: unit_tests + register: result + diff --git a/tools/gate/playbooks/pep8-linter.yaml b/tools/gate/playbooks/pep8-linter.yaml deleted file mode 100644 index b4ec66e8..00000000 --- a/tools/gate/playbooks/pep8-linter.yaml +++ /dev/null @@ -1,20 +0,0 @@ -# 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: pep8 - register: result - failed_when: result.failed diff --git a/tools/gate/playbooks/security-bandit.yaml b/tools/gate/playbooks/security-bandit.yaml deleted file mode 100644 index 927ea05f..00000000 --- a/tools/gate/playbooks/security-bandit.yaml +++ /dev/null @@ -1,20 +0,0 @@ -# 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: security - register: result - failed_when: result.failed diff --git a/tools/gate/playbooks/unit-py35.yaml b/tools/gate/playbooks/unit-py35.yaml deleted file mode 100644 index 7f73036f..00000000 --- a/tools/gate/playbooks/unit-py35.yaml +++ /dev/null @@ -1,20 +0,0 @@ -# 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: unit_tests - register: result - failed_when: result.failed diff --git a/tools/gate/playbooks/zuul-linter.yaml b/tools/gate/playbooks/zuul-linter.yaml deleted file mode 100644 index 3da76231..00000000 --- a/tools/gate/playbooks/zuul-linter.yaml +++ /dev/null @@ -1,20 +0,0 @@ -# Copyright 2017 The Openstack-Helm Authors. -# -# 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 a Whitespace Linter check - command: find . -not -path "*/\.*" -not -path "*/docs/build/*" -not -path "*/docs/source/images/*" -not -name "*.tgz" -type f -exec egrep -l " +$" {} \; - register: result - failed_when: result.stdout != ""