Page MenuHomePhabricator

Convert all repos to use npm Jenkins job with jsonlint and eslint
Closed, ResolvedPublic

Description

Some repos are using jshint and jsonlint Jenkins jobs as their main testing, whereas it would be better to use npm with jsonlint and eslint.

In the CI config t should be set out like:

template:
 - name: npm

We need to get a list of all repos that are using the jshint and jsonlint test.

Event Timeline

Paladox created this task.Dec 1 2015, 4:33 PM
Paladox updated the task description. (Show Details)
Paladox raised the priority of this task from to Needs Triage.
Paladox added a subscriber: Paladox.
Restricted Application added subscribers: StudiesWorld, Aklapper. · View Herald TranscriptDec 1 2015, 4:33 PM
hashar set Security to None.
hashar moved this task from Backlog to Repo setup on the Continuous-Integration-Config board.
hashar triaged this task as Normal priority.
Paladox renamed this task from Convert all repos to use npm instead of jslint which is deprecated to Convert all repos to use npm with fallback to jshint and jsonlint for non-whitelisted users.Feb 29 2016, 3:03 PM
Paladox updated the task description. (Show Details)
Paladox updated the task description. (Show Details)

Change 273961 had a related patch set uploaded (by Paladox):
Add npm entry point

https://gerrit.wikimedia.org/r/273961

Change 273963 had a related patch set uploaded (by Paladox):
[AbuseFilter] Add npm test

https://gerrit.wikimedia.org/r/273963

Change 273963 merged by jenkins-bot:
[AbuseFilter] Add npm test

https://gerrit.wikimedia.org/r/273963

Change 273961 merged by jenkins-bot:
Add npm entry point

https://gerrit.wikimedia.org/r/273961

Change 274800 had a related patch set uploaded (by Paladox):
Add npm entry point with jsonlint and banana checker tests

https://gerrit.wikimedia.org/r/274800

Change 274801 had a related patch set uploaded (by Paladox):
[Arrays] Add npm test

https://gerrit.wikimedia.org/r/274801

Change 274801 merged by jenkins-bot:
[Arrays] Add npm test

https://gerrit.wikimedia.org/r/274801

greg assigned this task to Paladox.Mar 8 2016, 11:28 PM
greg added a subscriber: greg.

You're making good progress on this, so setting the assignee to you (feel free, of course, to undo that if you don't plan to work on it more).

@greg thanks yes, I'm going to work on it. It will be hard for non mw repos since they would like it set differently.

Change 274800 merged by jenkins-bot:
Add npm entry point with jsonlint and banana checker tests

https://gerrit.wikimedia.org/r/274800

Restricted Application added a subscriber: TerraCodes. · View Herald TranscriptApr 19 2016, 2:09 PM
hashar renamed this task from Convert all repos to use npm with fallback to jshint and jsonlint for non-whitelisted users to Convert all repos to use npm with jsonlint and jshint|eslint.Jan 20 2017, 11:53 AM
hashar updated the task description. (Show Details)
hashar added a subscriber: hashar.

I have repurposed this task to phase out the Jenkins jobs jshint and jsonlint.

hashar renamed this task from Convert all repos to use npm with jsonlint and jshint|eslint to Convert all repos to use npm Jenkins job with jsonlint and jshint|eslint.Jan 20 2017, 12:10 PM

Change 335800 had a related patch set uploaded (by Hashar):
Clean out usage of jshint/jsonlint/phplint

https://gerrit.wikimedia.org/r/335800

Change 335803 had a related patch set uploaded (by Hashar):
Remove check jobs from wikimedia/fundraising

https://gerrit.wikimedia.org/r/335803

Change 335800 merged by jenkins-bot:
Clean out usage of jshint/jsonlint/phplint

https://gerrit.wikimedia.org/r/335800

Change 335803 merged by jenkins-bot:
Remove check jobs from wikimedia/fundraising

https://gerrit.wikimedia.org/r/335803

Change 349439 had a related patch set uploaded (by Hashar):
[integration/config@master] Clean out jsonlint/jshint

https://gerrit.wikimedia.org/r/349439

I am sending 190 patches that adds grunt-contrib-jshint to MediaWiki extensions. See Gerrit topic:T119973.

Jdforrester-WMF renamed this task from Convert all repos to use npm Jenkins job with jsonlint and jshint|eslint to Convert all repos to use npm Jenkins job with jsonlint and eslint.Apr 21 2017, 7:19 PM
Jdforrester-WMF updated the task description. (Show Details)
Jdforrester-WMF added a subscriber: Jdforrester-WMF.

I am sending 190 patches that adds grunt-contrib-jshint to MediaWiki extensions. See Gerrit topic:T119973.

And I'm going to have to C-1 all of them. :-( See T118941: Switch to eslint for our linting and our code styling in all Wikimedia JavaScript code.

I clarified the idea with James over IRC. The intent is to phase out the legacy Jenkins jobs that runs an outdated jshint version. The straightforward way is to migrate jshint from the hardcoded version on the CI nodes to package.json. This way I can phase out the old jobs quite easily.

So at least the outcome is that all extensions will have a job running npm test. That will benefit the migration to eslint.

Change 349439 merged by jenkins-bot:
[integration/config@master] Clean out jsonlint/jshint

https://gerrit.wikimedia.org/r/349439

The Jenkins job that runs jshint has been removed from all the repositories. They now solely run npm test and whatever developers have defined in their repo.

Change 350141 had a related patch set uploaded (by Hashar):
[wikimedia/wikimania-scholarships@master] build: jsonlint/jshint via npm

https://gerrit.wikimedia.org/r/350141

Change 350141 merged by jenkins-bot:
[wikimedia/wikimania-scholarships@master] build: jsonlint/jshint via npm

https://gerrit.wikimedia.org/r/350141

Change 350146 had a related patch set uploaded (by Hashar):
[integration/config@master] wikimedia/fundraising/tools: drop jshint/jsonlint

https://gerrit.wikimedia.org/r/350146

Change 350146 merged by jenkins-bot:
[integration/config@master] wikimedia/fundraising/tools: drop jshint/jsonlint

https://gerrit.wikimedia.org/r/350146

Change 350147 had a related patch set uploaded (by Hashar):
[integration/config@master] Remove all jshint references

https://gerrit.wikimedia.org/r/350147

Change 350148 had a related patch set uploaded (by Hashar):
[integration/jenkins@master] Remove jshint entirely

https://gerrit.wikimedia.org/r/350148

hashar claimed this task.Apr 25 2017, 9:46 AM
hashar added a subscriber: Krinkle.

@Krinkle for info, CI no more uses the jshint version from integration/jenkins.git. All repositories have been migrated to use npm instead. JJB/Zuul/slave-scripts have been cleaned up.

hashar removed a subscriber: Krinkle.Apr 25 2017, 9:47 AM

Change 350148 merged by jenkins-bot:
[integration/jenkins@master] Remove jshint entirely

https://gerrit.wikimedia.org/r/350148

Change 350147 merged by jenkins-bot:
[integration/config@master] Remove all jshint references

https://gerrit.wikimedia.org/r/350147

Change 350152 had a related patch set uploaded (by Hashar):
[integration/config@master] Remove jsonlint from check pipeline

https://gerrit.wikimedia.org/r/350152

Change 350154 had a related patch set uploaded (by Hashar):
[integration/config@master] Remove 'jsonlint' job

https://gerrit.wikimedia.org/r/350154

Change 350152 merged by jenkins-bot:
[integration/config@master] Remove jsonlint from check pipeline

https://gerrit.wikimedia.org/r/350152

Change 350154 merged by jenkins-bot:
[integration/config@master] Remove 'jsonlint' job

https://gerrit.wikimedia.org/r/350154

Change 350160 had a related patch set uploaded (by Hashar):
[integration/config@master] Drop mwgate-jsonlint from some repositories

https://gerrit.wikimedia.org/r/350160

Change 350160 merged by jenkins-bot:
[integration/config@master] Drop mwgate-jsonlint from some repositories

https://gerrit.wikimedia.org/r/350160

Change 350166 had a related patch set uploaded (by Hashar):
[integration/config@master] Remove mwgate-jsonlint from mw-checks-test

https://gerrit.wikimedia.org/r/350166

Change 350166 merged by jenkins-bot:
[integration/config@master] Remove mwgate-jsonlint from mw-checks-test

https://gerrit.wikimedia.org/r/350166

hashar added a comment.EditedApr 25 2017, 11:03 AM

Last job to migrated is wikimedia-fundraising-crm-jsonlint though that repo does not have a npm entry point at all. Tracked by T163781: CiviCRM: lint json and php files using composer.

Change 351187 had a related patch set uploaded (by Hashar; owner: Hashar):
[integration/config@master] Remove all jsonlint references

https://gerrit.wikimedia.org/r/351187

Change 351188 had a related patch set uploaded (by Hashar; owner: Hashar):
[integration/jenkins@master] Remove jsonlint entirely

https://gerrit.wikimedia.org/r/351188

Change 351188 merged by jenkins-bot:
[integration/jenkins@master] Remove jsonlint entirely

https://gerrit.wikimedia.org/r/351188

hashar closed this task as Resolved.May 1 2017, 8:05 PM

The jobs taht ran an hardcoded/obsolete version of jshint and the one running a custom jsonlint, are now entirely removed from Jenkins and the CI infrastructure. They have been replaced by grunt-jsonlint and either grunt-contrib-jshint or grunt-eslint.

Change 351187 merged by jenkins-bot:
[integration/config@master] Remove all jsonlint references

https://gerrit.wikimedia.org/r/351187