Hashar has submitted this change and it was merged.

Change subject: perlint job and jobs for timeline extension
......................................................................


perlint job and jobs for timeline extension

The '{name}-perlint' will run a basic linter on any .pl or .pm file. The
macro will lint all the scripts and fail afterward.

Had to make the wikibugs perlint a specific job since its script is
lacking the .pl file extension.

bug: 46263
Change-Id: I6eca8079c05e137baf9e56cd0c6234c1cc11b316
---
M job-templates.yaml
M macro.yaml
M mediawiki-extensions.yaml
M wm-bugzilla-wikibugs.yaml
4 files changed, 38 insertions(+), 2 deletions(-)

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



diff --git a/job-templates.yaml b/job-templates.yaml
index 79b405a..2abbae4 100644
--- a/job-templates.yaml
+++ b/job-templates.yaml
@@ -19,6 +19,15 @@
      - pplint-HEAD
 
 - job-template:
+    name: '{name}-perllint'
+    node: hasSlaveScripts
+    defaults: use-zuul
+    triggers:
+     - zuul
+    builders:
+     - perllint
+
+- job-template:
     name: '{name}-phplint'
     node: hasSlaveScripts
     defaults: use-zuul
diff --git a/macro.yaml b/macro.yaml
index 6668080..430246b 100644
--- a/macro.yaml
+++ b/macro.yaml
@@ -277,6 +277,23 @@
             pattern: '**/pep8.txt'
 
 - builder:
+      name: perllint
+      builders:
+       - shell: |
+          # File used to track down whether a perl file is failing syntax check
+          rm -f PHPLINT_FAILED
+
+          find . \
+            \( -name '*.pm' -or -name '*.pl' \) \
+            \( -exec perl -Mstrict -Mdiagnostics -cw {} \; \
+            -or -exec touch PHPLINT_FAILED  \; \)
+
+          # Set exit code to fail the build
+          if [ -e PHPLINT_FAILED ]; then
+              exit 1
+          fi;
+
+- builder:
     name: pyflakes
     builders:
      - shell: "pyflakes"
diff --git a/mediawiki-extensions.yaml b/mediawiki-extensions.yaml
index 23612b5..f283041 100644
--- a/mediawiki-extensions.yaml
+++ b/mediawiki-extensions.yaml
@@ -362,6 +362,7 @@
      - TemplateSandbox
      - Thanks
      - TimedMediaHandler
+     - timeline
      - TitleBlacklist
      - TitleKey
      - TocTree
@@ -557,3 +558,9 @@
     gerrit-name: mediawiki/extensions/PoolCounter
     jobs:
      - 'mwext-PoolCounter-build'
+
+- project:
+    name: 'mwext-timeline'
+    gerrit-name: mediawiki/extensions/timeline
+    jobs:
+     - '{name}-perllint'
diff --git a/wm-bugzilla-wikibugs.yaml b/wm-bugzilla-wikibugs.yaml
index d926443..1205343 100644
--- a/wm-bugzilla-wikibugs.yaml
+++ b/wm-bugzilla-wikibugs.yaml
@@ -1,5 +1,8 @@
+# Specific perllint jobs since wikibugs perl script is not having
+# a .pl file extension which is used by '{name}-perllint' to find
+# perl scripts.
 - job-template:
-    name: '{name}-perllint'
+    name: 'wikimedia-bugzilla-wikibugs-perllint'
 
     defaults: use-zuul
 
@@ -14,4 +17,4 @@
     gerrit-name: 'wikimedia/bugzilla/wikibugs'
 
     jobs:
-     - '{name}-perllint'
+        - 'wikimedia-bugzilla-wikibugs-perllint'

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I6eca8079c05e137baf9e56cd0c6234c1cc11b316
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