-
Notifications
You must be signed in to change notification settings - Fork 609
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
rush: Support customizing CI builds from Dev builds #2283
Comments
The relationship between However -- considering the design proposal for multiphase builds -- maybe things are changing. One of the goals was to make So maybe And CI jobs would instead run @ifeanyiecheruo I think you are right to expect "script": {
"build": "heft build",
"test": "heft test",
"start": "heft start",
"rush-build": "heft test --clean", // <-- what "rush build" does
} However PR #2298 takes this a step further, essentially allowing a custom command to specify an arbitrary array of package.json script names to try. That seems maybe too flexible. It would allow a mapping like this: "script": {
"build": "heft build", // <-- what "rush test" does 🤔
"test": "heft test", // <-- what "rush build" does 🤔
"start": "heft start"
} It makes sense to generalize the |
This is an interesting problem. I actually started work on a feature we've talked about for a while we've been calling "multi-phase builds," which provides more flexibility in what custom commands do when executed. I'm still working on the updates to Rush's scheduler, but here's a PR that includes the updates to the I really like the idea of aligning |
I'm not sure multi-phased builds resolves with the problem I'm trying to solve
My proposal is to provide a script override for To the best of my knowledge even with phased builds One possible solution is to always be explicit about what scripts a rush command like build executes ["clean", "build", "test"] and allow rush to compose them over the set of projects in the mono repo, while allowing rushx to execute those build atoms directly |
@hbo-iecheruo's concern is valid. We discussed it in the latest meeting about multiphase commands, and I believe it's been solved. The full details were written up as #2300, but the gist is that:
|
I need support for the ability to declare what should happen in a project when
rush build
andrush rebuild
are executed vs whenrushx build
ornpm script build
are executedScenarios
For day to day dev use and for IDE integration: I would want
rushx build
to clean and build a specific projectrushx test
run tests for a built projectrushx start
to optionally run the projectI want this so that my devs can quickly edit and prototype code and pay the cost of linting and testing when they choose to.
For day to day pre-push validation: I would want
rush build
to clean, build, lint, and test only changed projectsWhich is the behavior we have today.
I want this so that my devs can reasonably predict what is going to happen in CI without rebuilding the entire mono-repo
For CI: I would want
rush rebuild
to clean, build, lint, and test all projectsWhich is the behavior we have today
The above scenarios are in conflict today.
If I edit
build
in package.json for the dev scenario, I will break the pre-push and CI senario.Since
rushx
is the wrapper for running package.json scripts we don't want to change its behavior.So it seem reasonable that we give
rush
the ability to optionally declare what should happen to a project it isbuild
ing orrebuild
ingHopefully my scenarios make sense, let me know if this is a reasonable thing to support
The text was updated successfully, but these errors were encountered: