(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:
parent
4423ee985e
commit
e27eaf94f5
76
.zuul.yaml
76
.zuul.yaml
@ -13,35 +13,14 @@
|
|||||||
- project:
|
- project:
|
||||||
check:
|
check:
|
||||||
jobs:
|
jobs:
|
||||||
- airship-drydock-lint-ws
|
- airship-drydock-omni-test
|
||||||
- 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-docker-build-gate
|
- airship-drydock-docker-build-gate
|
||||||
|
|
||||||
gate:
|
gate:
|
||||||
jobs:
|
jobs:
|
||||||
- airship-drydock-lint-ws
|
- airship-drydock-omni-test
|
||||||
- airship-drydock-doc-build
|
|
||||||
- airship-drydock-lint-pep8:
|
|
||||||
files:
|
|
||||||
- ^.*\.py$
|
|
||||||
- airship-drydock-lint-chart:
|
|
||||||
files:
|
|
||||||
- ^charts/.*$
|
|
||||||
- airship-drydock-unit-py35
|
|
||||||
- airship-drydock-docker-build-gate
|
- airship-drydock-docker-build-gate
|
||||||
- airship-drydock-security-bandit:
|
|
||||||
files:
|
|
||||||
- ^.*\.py$
|
|
||||||
post:
|
post:
|
||||||
jobs:
|
jobs:
|
||||||
- airship-drydock-doc-publish
|
- airship-drydock-doc-publish
|
||||||
@ -54,43 +33,12 @@
|
|||||||
label: ubuntu-xenial
|
label: ubuntu-xenial
|
||||||
|
|
||||||
- job:
|
- job:
|
||||||
name: airship-drydock-lint-ws
|
name: airship-drydock-omni-test
|
||||||
description: |
|
description: |
|
||||||
Lints all files for trailing whitespace
|
Run a set of lightweight lints and tests
|
||||||
run: tools/gate/playbooks/zuul-linter.yaml
|
(pep8, Helm chart lint, Sphinx build, Python unit tests, Bandit scan)
|
||||||
timeout: 300
|
run: tools/gate/playbooks/omni_test.yaml
|
||||||
nodeset: airship-drydock-single-node
|
timeout: 900
|
||||||
|
|
||||||
- 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
|
|
||||||
nodeset: airship-drydock-single-node
|
nodeset: airship-drydock-single-node
|
||||||
|
|
||||||
- job:
|
- job:
|
||||||
@ -126,14 +74,6 @@
|
|||||||
static:
|
static:
|
||||||
- latest
|
- 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:
|
- job:
|
||||||
name: airship-drydock-doc-publish
|
name: airship-drydock-doc-publish
|
||||||
description: |
|
description: |
|
||||||
|
@ -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
|
|
@ -1,4 +1,3 @@
|
|||||||
|
|
||||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
# you may not use this file except in compliance with the License.
|
# you may not use this file except in compliance with the License.
|
||||||
# You may obtain a copy of the License at
|
# You may obtain a copy of the License at
|
||||||
@ -11,11 +10,34 @@
|
|||||||
# See the License for the specific language governing permissions and
|
# See the License for the specific language governing permissions and
|
||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
|
|
||||||
|
# Combine several test tasks into a single playbook
|
||||||
|
# to minimize Zuul node consumption
|
||||||
|
|
||||||
- hosts: primary
|
- hosts: primary
|
||||||
tasks:
|
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
|
- name: Execute the make target for Helm chart linting
|
||||||
make:
|
make:
|
||||||
chdir: "{{ zuul.project.src_dir }}"
|
chdir: "{{ zuul.project.src_dir }}"
|
||||||
target: helm_lint
|
target: helm_lint
|
||||||
register: result
|
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
|
||||||
|
|
@ -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
|
|
@ -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
|
|
@ -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
|
|
@ -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 != ""
|
|
Loading…
Reference in New Issue
Block a user