From 01b105a1142e7a51ce46d1b43c60ec9308b69156 Mon Sep 17 00:00:00 2001 From: Roman Gorshunov Date: Wed, 25 Sep 2019 21:21:47 +0200 Subject: [PATCH] Fix: post job can not have files section - Fix post job, which can not have files section - Make jobs naming look more like in other Airship projects - Use git grep in whitespace linter as simplier way to get list of files mathing pattern, than find & grep combination Change-Id: Ie6c82855dd1513d6047160363f2d4606e69673d1 --- tools/gate/playbooks/zuul-linter.yaml | 8 +++----- zuul.d/base.yaml | 14 +++++++------- zuul.d/mysqlclient-utility.yaml | 9 ++++----- 3 files changed, 14 insertions(+), 17 deletions(-) diff --git a/tools/gate/playbooks/zuul-linter.yaml b/tools/gate/playbooks/zuul-linter.yaml index 0ca34751..608b06ff 100644 --- a/tools/gate/playbooks/zuul-linter.yaml +++ b/tools/gate/playbooks/zuul-linter.yaml @@ -15,10 +15,8 @@ - hosts: primary tasks: - name: Execute a Whitespace Linter check - command: > - find . - -not -path "*/.git/*" - -type f - -exec egrep -l " +$" {} \; + command: git grep -E -l " +$" + args: + chdir: "{{ zuul.project.src_dir }}" register: result failed_when: result.stdout != "" diff --git a/zuul.d/base.yaml b/zuul.d/base.yaml index e1a30f55..2adcebd6 100644 --- a/zuul.d/base.yaml +++ b/zuul.d/base.yaml @@ -15,17 +15,17 @@ - project: check: jobs: - - porthole-lint - - porthole-image-build-mysqlclient-utility + - airship-porthole-linter + - airship-porthole-images-build-gate-mysqlclient-utility gate: jobs: - - porthole-lint - - porthole-image-build-mysqlclient-utility + - airship-porthole-linter + - airship-porthole-images-build-gate-mysqlclient-utility post: jobs: - - porthole-image-upload-mysqlclient-utility + - airship-porthole-images-publish-mysqlclient-utility - nodeset: name: airship-porthole-single-node @@ -34,7 +34,7 @@ label: ubuntu-xenial - job: - name: porthole-images + name: airship-porthole-images abstract: true timeout: 1800 post-timeout: 1800 @@ -50,7 +50,7 @@ - latest - job: - name: porthole-lint + name: airship-porthole-linter description: | Lints files for trailing whitespace run: tools/gate/playbooks/zuul-linter.yaml diff --git a/zuul.d/mysqlclient-utility.yaml b/zuul.d/mysqlclient-utility.yaml index 544ca08c..18ccd1a4 100644 --- a/zuul.d/mysqlclient-utility.yaml +++ b/zuul.d/mysqlclient-utility.yaml @@ -13,12 +13,12 @@ # limitations under the License. - job: - name: porthole-image-build-mysqlclient-utility - parent: &parent porthole-images + name: airship-porthole-images-build-gate-mysqlclient-utility + parent: &parent airship-porthole-images vars: image_name: &image_name mysqlclient-utility distro_suffix: &distro_suffix ubuntu_xenial - files: &mysqlclient_files + files: - ^Dockerfiles/mysqlclient-utility/.*$ - ^install_mysqlclient_utility.sh$ - ^mysqlclient-utility/.*$ @@ -27,7 +27,7 @@ - ^zuul.d/.*$ - job: - name: porthole-image-upload-mysqlclient-utility + name: airship-porthole-images-publish-mysqlclient-utility parent: *parent secrets: - name: quay_credentials @@ -40,4 +40,3 @@ tags: dynamic: commit: true - files: *mysqlclient_files