In order to create the production HTML/CSS/JS for the www portals, a node-based build step (using the Gulp build tool) is run that:
- pull new statistics
- compiles js/css/image assets
- updates translations
- processes templates
- minifies/combines/compiles all the above into static HTML/CSS/JS
Currently this build step is run on a developer machine and the output gets submitted as a patch to Gerrit. This build step could be automated if it was periodically run on ToolForge by a Tool instead of manually on a developer machine.
To automate this build step on ToolForge, a new Tool needs to be created that does the following:
- Pulls the repo from Gerrit
- Runs the build-step outlined above
- Submits a new patch to Gerrit with the updated build
Apart from being able to successfully run the build and create the commit (with the Gerrit hooks), this tool would require a Gerrit account in order to submit the patch. Submitting the patch to Gerrit for manual review is still preferable in case the tool messes something up. The patch would then be manually +2d by a developer as it is now.