Skip to content
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

Enable changing artifact staging location #15445

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

Conversation

chcosta
Copy link
Member

@chcosta chcosta commented Jan 23, 2025

This change adds an environment variable (ARCADE_STAGINGDIRECTORY) which can be used to control where artifacts and packages are populated.

This change is desired because there are some systems which run and needlessly scan artifacts simply because they reside in the sources folder. Those scan should be intentional. This change will allow us to avoid scanning unnecessary files which will dramatically reduce overall build times (times have not yet been measured but I believe this to be true).

This is the first of two changes which will be required to support this. Arcade provides a lot of templates which have hard-coded paths to the artifacts location, those will need to be updated after this change is published.

The following outlines the behavior changes on Windows. Behavior changes are the same for Linux/Mac.

Previous behavior

With -ci option:

  • artifacts -> [repo root]\artifacts
  • toolset -> [repo root]\artifacts\toolset
  • .packages -> [repo root]\.packages (controllable via NUGET_PACKAGES env variable)

Without -ci option:

  • artifacts -> [repo root]\artifacts
  • toolset -> [repo root]\artifacts\toolset
  • .packages -> [UserProfile]\.nuget\packages (controllable via NUGET_PACKAGES env variable)

New behavior

If ARCADE_STAGINGDIRECTORY is not set, behavior is unchanged.

If ARCADE_STAGINGDIRECTORY is set to a local path then:

With -ci option:

  • artifacts -> [ARCADE_STAGINGDIRECTORY]\artifacts
  • toolset -> [repo root]\.toolset (toolset moves out of artifacts folder because it requires discovering the repo's NuGet.config file
  • .packages -> [ARCADE_STAGINGDIRECTORY]\.packages (controllable via NUGET_PACKAGES env variable)

Without -ci option:

  • artifacts -> [ARCADE_STAGINGDIRECTORY]\artifacts
  • toolset -> [repo root]\.toolset (toolset moves out of artifacts folder because it requires discovering the repo's NuGet.config file
  • .packages -> [UserProfile]\.nuget\packages (controllable via NUGET_PACKAGES env variable)

To double check:

Validated locally on Windows and Ubuntu with Arcade version 10.0.0-beta.25074.2 from the general-testing public feed.

@chcosta chcosta force-pushed the dev/chcosta/silo-artifacts branch from 760afb7 to 39f4c1f Compare January 24, 2025 17:38
@chcosta
Copy link
Member Author

chcosta commented Jan 24, 2025

It's been a while since I made any change of this nature in Arcade so I've tagged anyone I can think of that might have an opinion on this type of change.

This change is to address dotnet/dnceng#2646

@chcosta chcosta changed the title Add siloArtifacts option Enable changing artifact staging location Jan 24, 2025
@chcosta chcosta marked this pull request as ready for review January 24, 2025 19:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant