Hashar has uploaded a new change for review.
https://gerrit.wikimedia.org/r/49828
Change subject: jslint job now always show the help message
......................................................................
jslint job now always show the help message
The JSHint execution would exit 1 whenever there is JavaScript error
which would skip the basic help message we echo. Instead we intercept
the exit code, echo the message and restore the exit code afterward.
Change-Id: I12d314ad5b526518453c6c993b81564bc4a2d5a6
---
M macro.yaml
1 file changed, 7 insertions(+), 2 deletions(-)
git pull
ssh://gerrit.wikimedia.org:29418/integration/jenkins-job-builder-config
refs/changes/28/49828/1
diff --git a/macro.yaml b/macro.yaml
index 3d5ccae..b0ffb23 100644
--- a/macro.yaml
+++ b/macro.yaml
@@ -48,8 +48,13 @@
- shell: |
#!/bin/bash -e
cd "{dir}"
- /var/lib/jenkins/bin/jshint . --checkstyle-reporter >
"$WORKSPACE/checkstyle-jshint.xml"
- echo 'Check the "Checkstyle Warnings" report for JSHint report.'
+ /var/lib/jenkins/bin/jshint . \
+ --checkstyle-reporter > "$WORKSPACE/checkstyle-jshint.xml" \
+ && HAS_ERROR=0 || HAS_ERROR=1
+ echo
+ echo 'Check the "Checkstyle Warnings" link on the left for JSHint
report.'
+ echo
+ exit $HAS_ERROR
- builder:
name: jshint
--
To view, visit https://gerrit.wikimedia.org/r/49828
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I12d314ad5b526518453c6c993b81564bc4a2d5a6
Gerrit-PatchSet: 1
Gerrit-Project: integration/jenkins-job-builder-config
Gerrit-Branch: master
Gerrit-Owner: Hashar <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits