Merge "Consolidate linter jobs"
This commit is contained in:
commit
ec2ed74f05
|
@ -17,13 +17,11 @@
|
|||
check:
|
||||
jobs:
|
||||
- openstack-tox-pep8
|
||||
- airship-pegleg-linter
|
||||
- airship-pegleg-doc-build
|
||||
- airship-pegleg-docker-build-gate
|
||||
gate:
|
||||
jobs:
|
||||
- openstack-tox-pep8
|
||||
- airship-pegleg-linter
|
||||
- airship-pegleg-doc-build
|
||||
- airship-pegleg-docker-build-gate
|
||||
post:
|
||||
|
@ -36,13 +34,6 @@
|
|||
- name: primary
|
||||
label: ubuntu-xenial
|
||||
|
||||
- job:
|
||||
name: airship-pegleg-linter
|
||||
description: |
|
||||
Lints all files by checking them for whitespace.
|
||||
run: tools/gate/playbooks/zuul-linter.yaml
|
||||
nodeset: airship-pegleg-single-node
|
||||
|
||||
- job:
|
||||
name: airship-pegleg-doc-build
|
||||
description: |
|
||||
|
|
|
@ -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 "*/doc/build/*" -not -path "*/doc/source/images/*" -not -name "*.tgz" -type f -exec egrep -l " +$" {} \;
|
||||
register: result
|
||||
failed_when: result.stdout != ""
|
|
@ -0,0 +1,13 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
set -xe
|
||||
RES=$(find . \
|
||||
-not -path "*/\.*" \
|
||||
-not -path "*/doc/build/*" \
|
||||
-not -path "*/doc/source/images/*" \
|
||||
-not -name "*.tgz" \
|
||||
-type f -exec egrep -l " +$" {} \;)
|
||||
|
||||
if [[ -n $RES ]]; then
|
||||
exit 1;
|
||||
fi
|
Loading…
Reference in New Issue