Page MenuHomePhabricator

Publish WVUI to NPM through CI
Closed, DeclinedPublic

Description

Publish WVUI rolling dev release to NPM as part of Jenkins CI when a new patch is merged into master.

Event Timeline

Based on some trial and error, I don't believe checkbox 1 Publish WVUI prerelease to NPM as part of Jenkins CI when a new patch is merged into master can be achieved in CI as Blubber stands.

When publishing, we want to run some commands prior (e.g. the npm preversion script) which executes some git commands (e.g. git status). The user running the command (in Blubber's case, it is runuser) doesn't have permission to execute these commands, and I think that is by design. This could technically be achieved by adding runs: insecurely: true to the Blubber config, but that config options is only meant for dev environments.
It seems like we will need to run those /bin/release-* scripts locally for the time being.

For checkbox 2, Publish WVUI build products to a location that will be accessible by production wikis based on some conversations with @phuedx and @jeena, I was pointed to T158980, which gave some good background info on implementation ideas:

  1. Push the build products from WVUI to Vector repo in CI, which would create a new patch set that would need to be manually approved to be merged (change would need to happen in PipelineLib job templates)
  2. Create a separate repo for WVUI build products (I believe Parsoid and maybe others do this?) which would also need to be manually +2ed to merge

Option 1 sounds like a decent option to me, although i'm unsure how we would handle versioning of those files.

Based on some trial and error, I don't believe checkbox 1 Publish WVUI prerelease to NPM as part of Jenkins CI when a new patch is merged into master can be achieved in CI as Blubber stands.

When publishing, we want to run some commands prior (e.g. the npm preversion script) which executes some git commands (e.g. git status). The user running the command (in Blubber's case, it is runuser) doesn't have permission to execute these commands, and I think that is by design. This could technically be achieved by adding runs: insecurely: true to the Blubber config, but that config options is only meant for dev environments.
It seems like we will need to run those /bin/release-* scripts locally for the time being.

Meeting with @nnikkhoui on Monday to figure out how we can get this working in CI.

Change 631857 had a related patch set uploaded (by Nikki Nikkhoui; owner: Nikki Nikkhoui):
[wvui@master] Blubber config npm publish

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

Change 631864 had a related patch set uploaded (by Nikki Nikkhoui; owner: Nikki Nikkhoui):
[integration/config@master] WVUI pipeline update

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

Change 631857 merged by jenkins-bot:
[wvui@master] Blubber config npm publish

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

Change 631864 merged by jenkins-bot:
[integration/config@master] WVUI pipeline update

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

Change 637774 had a related patch set uploaded (by Nikki Nikkhoui; owner: Nikki Nikkhoui):
[wvui@master] Add optional build attribute

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

Change 637774 merged by jenkins-bot:
[wvui@master] Add optional build attribute

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

Change 637812 had a related patch set uploaded (by Nikki Nikkhoui; owner: Nikki Nikkhoui):
[wvui@master] Use nodejs 10 buster image

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

Change 637812 merged by jenkins-bot:
[wvui@master] Use nodejs 10 buster image

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

Change 638167 had a related patch set uploaded (by Nikki Nikkhoui; owner: Nikki Nikkhoui):
[wvui@master] Add Blubber generated Dockerfile to gitignore

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

Change 638167 merged by jenkins-bot:
[wvui@master] Add Blubber generated Dockerfile to gitignore

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

nnikkhoui renamed this task from Publish WVUI: build products and NPM to Publish WVUI to NPM through CI.Dec 9 2020, 10:44 PM
nnikkhoui updated the task description. (Show Details)
nnikkhoui removed a subscriber: Niedzielski.

Change 647378 had a related patch set uploaded (by Nikki Nikkhoui; owner: Nikki Nikkhoui):
[wvui@master] Allow WVUI dev-releases in CI

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

Change 647378 abandoned by Nikki Nikkhoui:

[wvui@master] Allow WVUI dev-releases in CI

Reason:

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

Volker_E subscribed.

As WVUI is deprecated and on the brink of being removed from MediaWiki, I'll decline this task. All focus is on Codex now.