Page MenuHomePhabricator

Add Toolforge-specific deploy script for running npm in a separate job
Closed, ResolvedPublic


Currently we're keeping all built asset files in the repo because back when we started the project there wasn't any way to run Node on Toolforge. There now is, so we can get rid of these files.

The existing deploy script runs both composer and npm in the same place. This isn't great because it doesn't allow for specifying the particular version of either.

It'd be good to split the deploy into two parts: the first that does what it currently does and pulls the latest tagged version; and the second that creates toolforge jobs to run composer and npm. For example:

cd ~/tool
git pull origin main # Or the latest tag etc.
toolforge-jobs load job-deploy.yaml
- name: composer-install
  command: composer -d tool --no-dev -o install 
  image: tf-php74
- name: npm-build
  command: cd tool && npm install && npm run build
  image: tf-node16

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript

The paths referenced in toolforge/install.yaml are always relative to the tool's home directory (I think; I've asked for clarification about this).

After the above patch is merged, it won't need to use the bundle's script, but we might want to talk about the best way forward to support checking out and deploying the latest tag in both Toolforge and VPS contexts.

dom_walden subscribed.

As this appears to be a change to how we deploy/build svgtranslate, I don't know if there is anything I can do to test this.

I see is still up.