jenkins-bot has submitted this change and it was merged.

Change subject: Refactor tabs detector to job template
......................................................................


Refactor tabs detector to job template

Trivially updates operations-puppet-tabs

Bug: 68769
Change-Id: I72a64bb8831909d4fec004e93453a8df89f0ab69
---
M job-templates.yaml
M operations-puppet.yaml
2 files changed, 26 insertions(+), 19 deletions(-)

Approvals:
  Hashar: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/job-templates.yaml b/job-templates.yaml
index 65cd5be..47df1b8 100644
--- a/job-templates.yaml
+++ b/job-templates.yaml
@@ -247,6 +247,30 @@
      - ruby-lint:
         interpreter: 'ruby1.9.3'
 
+# Verifiy whether there is any leading tabs in files matching 'fileselector'.
+#
+# 'fileselector': the parameter is passed to grep --include= option and is
+# comma separated.
+#
+- job-template:
+    name: '{name}-tabs'
+    defaults: use-remote-zuul-no-submodules
+    concurrent: true
+    logrotate:
+        daysToKeep: 90
+
+    triggers:
+     - zuul
+
+    builders:
+     - shell: |
+         #!/bin/bash -e
+         echo "Looking for tabulations in files matching: {fileselector}"
+         set -x
+         (grep --recursive -P '^\t' --exclude-dir='.git' 
--include='{fileselector}' .) && HAS_TAB=1 || HAS_TAB=0
+         exit $HAS_TAB
+
+
 - job-template:
     name: '{name}-yamllint'
     defaults: use-remote-zuul-no-submodules
diff --git a/operations-puppet.yaml b/operations-puppet.yaml
index a8fb196..e5fd943 100644
--- a/operations-puppet.yaml
+++ b/operations-puppet.yaml
@@ -93,24 +93,6 @@
         (fgrep -R --file=typos --exclude=typos *) && HAS_TYPO=1 || HAS_TYPO=0
         exit $HAS_TYPO
 
-- job-template:
-    name: 'operations-puppet-tabs'
-    defaults: use-remote-zuul-no-submodules
-    concurrent: true
-    logrotate:
-        daysToKeep: 90
-
-    triggers:
-     - zuul
-
-    builders:
-     - shell: |
-         #!/bin/bash -e
-         echo "Looking for tabulations in puppet manifests..."
-         set -x
-         (grep --recursive -P '^\t' --exclude-dir='.git' --include='*.pp' .) 
&& HAS_TAB=1 || HAS_TAB=0
-         exit $HAS_TAB
-
 - project:
     name: 'operations-puppet'
 
@@ -122,7 +104,8 @@
      - '{name}-puppetlint-lenient'
      - '{name}-puppetlint-strict'
      - '{name}-tox-{toxenv}'
-     - operations-puppet-tabs
+     - '{name}-tabs':
+         fileselector: '*.pp'
      - operations-puppet-typos
      - operations-puppet-spec
      - operations-puppet-test

-- 
To view, visit https://gerrit.wikimedia.org/r/151064
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I72a64bb8831909d4fec004e93453a8df89f0ab69
Gerrit-PatchSet: 1
Gerrit-Project: integration/jenkins-job-builder-config
Gerrit-Branch: master
Gerrit-Owner: Hashar <has...@free.fr>
Gerrit-Reviewer: Hashar <has...@free.fr>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to