jenkins-bot has submitted this change and it was merged.
Change subject: Add tests for the Collection OCG
......................................................................
Add tests for the Collection OCG
* Test the OCG branch of Collection.
* Add the ability to have Jenkins run "npm test". The job-template is
bound to the label hasNpm which would be on a Jenkins slave in labs.
* Add jshint and npmtest for the OCG nodejs repos.
Change-Id: I3043f827c57c72799eb5c5a5abf291c825e1addf
---
M job-templates.yaml
M macro.yaml
M mediawiki-extensions.yaml
3 files changed, 60 insertions(+), 0 deletions(-)
Approvals:
Hashar: Looks good to me, approved
jenkins-bot: Verified
diff --git a/job-templates.yaml b/job-templates.yaml
index d0c37ed..002d845 100644
--- a/job-templates.yaml
+++ b/job-templates.yaml
@@ -22,6 +22,18 @@
- jshint
- job-template:
+ name: '{name}-npmtest'
+ node: hasNpm
+ defaults: use-remote-zuul
+ triggers:
+ - zuul
+ scm:
+ - git-remote-zuul
+ builders:
+ - npmtest:
+ node-modules: '{node-modules}'
+
+- job-template:
name: '{name}-pplint-HEAD'
node: hasSlaveScripts
defaults: use-remote-zuul-no-submodules
diff --git a/macro.yaml b/macro.yaml
index fb69608..1533210 100644
--- a/macro.yaml
+++ b/macro.yaml
@@ -73,6 +73,23 @@
dir: '$WORKSPACE'
- builder:
+ name: npmtest-in
+ builders:
+ - shell: |
+ #!/bin/bash -xe
+ cd "{dir}"
+ [[ -n '{node-modules}' ]] && git clone
'https://gerrit.wikimedia.org/r/p/{node-modules}' node_modules
+ npm test
+
+# - node-modules: Gerrit project name for an appropriate node_modules subdir
(may be empty)
+- builder:
+ name: npmtest
+ builders:
+ - npmtest-in:
+ dir: '$WORKSPACE'
+ node-modules: '{node-modules}'
+
+- builder:
name: jsduck
builders:
# Zuul uses Python str.format(obj) for {config} substitutions
diff --git a/mediawiki-extensions.yaml b/mediawiki-extensions.yaml
index d15dd5a..ab208c7 100644
--- a/mediawiki-extensions.yaml
+++ b/mediawiki-extensions.yaml
@@ -11,6 +11,16 @@
- jshint
- job-template:
+ name: '{name}-{ext-name}-npmtest'
+ node: hasNpm
+ defaults: use-remote-zuul
+ triggers:
+ - zuul
+ builders:
+ - npmtest:
+ node-modules: '{node-modules}'
+
+- job-template:
# TODO: Use global '{name}-phplint' template instead
name: '{name}-{ext-name}-lint'
node: hasSlaveScripts
@@ -545,6 +555,27 @@
- '{name}-ruby1.9.3lint'
- project:
+ name: mwext-Collection-OfflineContentGenerator
+ jobs:
+ - '{name}-jslint'
+ - '{name}-npmtest':
+ node-modules:
mediawiki/extensions/Collection/OfflineContentGenerator/node_modules
+
+- project:
+ name: mwext-Collection-OfflineContentGenerator-bundler
+ jobs:
+ - '{name}-jslint'
+ - '{name}-npmtest':
+ node-modules:
mediawiki/extensions/Collection/OfflineContentGenerator/node_modules
+
+- project:
+ name: mwext-Collection-OfflineContentGenerator-latex_renderer
+ jobs:
+ - '{name}-jslint'
+ - '{name}-npmtest':
+ node-modules:
mediawiki/extensions/Collection/OfflineContentGenerator/node_modules
+
+- project:
name: 'mwext-ConfirmEdit'
jobs:
- python-jobs
--
To view, visit https://gerrit.wikimedia.org/r/96480
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I3043f827c57c72799eb5c5a5abf291c825e1addf
Gerrit-PatchSet: 9
Gerrit-Project: integration/jenkins-job-builder-config
Gerrit-Branch: master
Gerrit-Owner: Anomie <[email protected]>
Gerrit-Reviewer: Anomie <[email protected]>
Gerrit-Reviewer: Hashar <[email protected]>
Gerrit-Reviewer: jenkins-bot
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits