(zuul) Consolidate tests

- Consolidate tests to minimize Zuul node consumption
- Remove WS linting as content-specific lints should catch
  this if it is valuable

Change-Id: I18065027644b8412d88219a40d490c12d558969b
This commit is contained in:
Scott Hussey 2018-07-10 12:41:45 -05:00
parent 4423ee985e
commit e27eaf94f5
7 changed files with 32 additions and 170 deletions

View File

@ -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: |

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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 != ""