Skip to content

[rush] Add a RUSH_BUILD_CACHE_OVERRIDE_JSON env var to override the build cache configuration. #5154

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

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

iclanton
Copy link
Member

Summary

This PR adds support for a RUSH_BUILD_CACHE_OVERRIDE_JSON environment variable that allows users to override the build cache configuration.

How it was tested

Tested by setting up and pulling cache from a Gradle server in this repo.

Impacted documentation

https://rushjs.io/pages/configs/environment_vars/#docusaurus_skipToContent_fallback

D4N14L
D4N14L previously approved these changes Mar 10, 2025
const rushUserConfiguration: RushUserConfiguration = await RushUserConfiguration.initializeAsync();
): Promise<BuildCacheConfiguration | undefined> {
let buildCacheJson: IBuildCacheJson;
const buildCacheOverrideJson: string | undefined = EnvironmentConfiguration.buildCacheOverrideJson;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, it's raw JSON in the environment variable. Should we add support for a file path to do the same thing?

@iclanton iclanton moved this from Needs triage to In Progress in Bug Triage Mar 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: In Progress
Development

Successfully merging this pull request may close these issues.

2 participants