rushstack
rushstack copied to clipboard
[rush-build-graph-plugin] Add plugin for generating a build graph file for the given command
Summary
We are working with BuildXL to hand Rush's build graph to their build orchestrator, in order to vastly simplify and future-proof the interface between the two.
Details
This plugin runs when a rush command is run with the option --drop-graph FILE_PATH
. It taps into the createOperations hook, extracts the necessary info from the graph that it's handed, removes empty commands and forwards their dependencies, validates the resulting graph, drops it as json to the provided FILE_PATH, and exits.
How it was tested
A test repo was created for running the plugin. The graph resulting from running on that repo is saved to a file where unit tests are run against it.
Impacted documentation
Docs should be created on the website only after this plugin is solidified and compatible with BuildXL.
Make sure you include a LICENSE
file like this one: https://github.com/microsoft/rushstack/blob/main/rush-plugins/rush-serve-plugin/LICENSE