-
Notifications
You must be signed in to change notification settings - Fork 72
Bootstrap Arcade tooling metadata #1523
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
Merged
jonathanpeppers
merged 1 commit into
main
from
jonathanpeppers-bootstrap-arcade-tooling
Aug 18, 2026
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,10 @@ | ||
| <Dependencies> | ||
| <ProductDependencies> | ||
| </ProductDependencies> | ||
| <ToolsetDependencies> | ||
| <Dependency Name="Microsoft.DotNet.Arcade.Sdk" Version="11.0.0-beta.26381.103"> | ||
| <Uri>https://github.com/dotnet/dotnet</Uri> | ||
| <Sha>e2c1e00b3d0f96afb892fb261d5921565b400246</Sha> | ||
| </Dependency> | ||
| </ToolsetDependencies> | ||
| </Dependencies> | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| # `eng/common` | ||
|
|
||
| Files under `eng/common` come from [Arcade](https://github.com/dotnet/arcade). | ||
| Edits in `eng/common` will be overwritten by automation unless the changes are made directly in the Arcade repository. | ||
| For more information, see the [Arcade documentation](https://github.com/dotnet/arcade/tree/main/Documentation). |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,4 @@ | ||
| { | ||
| "RetryCountLimit": 1, | ||
| "RetryByAnyError": false | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,2 @@ | ||
| @echo off | ||
| powershell -ExecutionPolicy ByPass -NoProfile -command "& """%~dp0Build.ps1""" -restore -build -test -sign -pack -publish -ci %*" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| @{ | ||
| IncludeRules=@('PSAvoidUsingCmdletAliases', | ||
| 'PSAvoidUsingWMICmdlet', | ||
| 'PSAvoidUsingPositionalParameters', | ||
| 'PSAvoidUsingInvokeExpression', | ||
| 'PSUseDeclaredVarsMoreThanAssignments', | ||
| 'PSUseCmdletCorrectly', | ||
| 'PSStandardDSCFunctionsInResource', | ||
| 'PSUseIdenticalMandatoryParametersForDSC', | ||
| 'PSUseIdenticalParametersForDSC') | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,28 @@ | ||
| # Don't touch this folder | ||
|
|
||
| uuuuuuuuuuuuuuuuuuuu | ||
| u" uuuuuuuuuuuuuuuuuu "u | ||
| u" u$$$$$$$$$$$$$$$$$$$$u "u | ||
| u" u$$$$$$$$$$$$$$$$$$$$$$$$u "u | ||
| u" u$$$$$$$$$$$$$$$$$$$$$$$$$$$$u "u | ||
| u" u$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$u "u | ||
| u" u$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$u "u | ||
| $ $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ $ | ||
| $ $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ $ | ||
| $ $$$" ... "$... ...$" ... "$$$ ... "$$$ $ | ||
| $ $$$u `"$$$$$$$ $$$ $$$$$ $$ $$$ $$$ $ | ||
| $ $$$$$$uu "$$$$ $$$ $$$$$ $$ """ u$$$ $ | ||
| $ $$$""$$$ $$$$ $$$u "$$$" u$$ $$$$$$$$ $ | ||
| $ $$$$....,$$$$$..$$$$$....,$$$$..$$$$$$$$ $ | ||
| $ $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ $ | ||
| "u "$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$" u" | ||
| "u "$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$" u" | ||
| "u "$$$$$$$$$$$$$$$$$$$$$$$$$$$$" u" | ||
| "u "$$$$$$$$$$$$$$$$$$$$$$$$" u" | ||
| "u "$$$$$$$$$$$$$$$$$$$$" u" | ||
| "u """""""""""""""""" u" | ||
| """""""""""""""""""" | ||
|
|
||
| !!! Changes made in this directory are subject to being overwritten by automation !!! | ||
|
|
||
| The files in this directory are shared by all Arcade repos and managed by automation. If you need to make changes to these files, open an issue or submit a pull request to https://github.com/dotnet/arcade first. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,181 @@ | ||
| # This script adds internal feeds required to build commits that depend on internal package sources. For instance, | ||
| # dotnet6-internal would be added automatically if dotnet6 was found in the nuget.config file. In addition also enables | ||
| # disabled internal Maestro (darc-int*) feeds. | ||
| # | ||
| # Optionally, this script also adds a credential entry for each of the internal feeds if supplied. | ||
| # | ||
| # See example call for this script below. | ||
| # | ||
| # - task: PowerShell@2 | ||
| # displayName: Setup internal Feeds Credentials | ||
| # condition: eq(variables['Agent.OS'], 'Windows_NT') | ||
| # inputs: | ||
| # filePath: $(System.DefaultWorkingDirectory)/eng/common/SetupNugetSources.ps1 | ||
| # arguments: -ConfigFile $(System.DefaultWorkingDirectory)/NuGet.config -Password $Env:Token | ||
| # env: | ||
| # Token: $(dn-bot-dnceng-artifact-feeds-rw) | ||
| # | ||
| # Note that the NuGetAuthenticate task should be called after SetupNugetSources. | ||
| # This ensures that: | ||
| # - Appropriate creds are set for the added internal feeds (if not supplied to the scrupt) | ||
| # - The credential provider is installed. | ||
| # | ||
| # This logic is also abstracted into enable-internal-sources.yml. | ||
|
|
||
| [CmdletBinding()] | ||
| param ( | ||
| [Parameter(Mandatory = $true)][string]$ConfigFile, | ||
| $Password | ||
| ) | ||
|
|
||
| $ErrorActionPreference = "Stop" | ||
| Set-StrictMode -Version 2.0 | ||
| [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 | ||
|
|
||
| # This script only consumes helper functions from tools.ps1 to configure NuGet feeds. | ||
| # Skip importing configure-toolset.ps1 so that repo-specific toolset setup (e.g. acquiring | ||
| # a bootstrap SDK) is not triggered as a side effect of feed configuration. | ||
| $disableConfigureToolsetImport = $true | ||
|
|
||
| . $PSScriptRoot\tools.ps1 | ||
|
|
||
| # Adds or enables the package source with the given name | ||
| function AddOrEnablePackageSource($sources, $disabledPackageSources, $SourceName, $SourceEndPoint, $creds, $Username, $pwd) { | ||
| if ($disabledPackageSources -eq $null -or -not (EnableInternalPackageSource -DisabledPackageSources $disabledPackageSources -Creds $creds -PackageSourceName $SourceName)) { | ||
| AddPackageSource -Sources $sources -SourceName $SourceName -SourceEndPoint $SourceEndPoint -Creds $creds -Username $userName -pwd $Password | ||
| } | ||
| } | ||
|
|
||
| # Add source entry to PackageSources | ||
| function AddPackageSource($sources, $SourceName, $SourceEndPoint, $creds, $Username, $pwd) { | ||
| $packageSource = $sources.SelectSingleNode("add[@key='$SourceName']") | ||
|
|
||
| if ($packageSource -eq $null) | ||
| { | ||
| Write-Host "Adding package source $SourceName" | ||
|
|
||
| $packageSource = $doc.CreateElement("add") | ||
| $packageSource.SetAttribute("key", $SourceName) | ||
| $packageSource.SetAttribute("value", $SourceEndPoint) | ||
| $sources.AppendChild($packageSource) | Out-Null | ||
| } | ||
| else { | ||
| Write-Host "Package source $SourceName already present and enabled." | ||
| } | ||
|
|
||
| AddCredential -Creds $creds -Source $SourceName -Username $Username -pwd $pwd | ||
| } | ||
|
|
||
| # Add a credential node for the specified source | ||
| function AddCredential($creds, $source, $username, $pwd) { | ||
| # If no cred supplied, don't do anything. | ||
| if (!$pwd) { | ||
| return; | ||
| } | ||
|
|
||
| Write-Host "Inserting credential for feed: " $source | ||
|
|
||
| # Looks for credential configuration for the given SourceName. Create it if none is found. | ||
| $sourceElement = $creds.SelectSingleNode($Source) | ||
| if ($sourceElement -eq $null) | ||
| { | ||
| $sourceElement = $doc.CreateElement($Source) | ||
| $creds.AppendChild($sourceElement) | Out-Null | ||
| } | ||
|
|
||
| # Add the <Username> node to the credential if none is found. | ||
| $usernameElement = $sourceElement.SelectSingleNode("add[@key='Username']") | ||
| if ($usernameElement -eq $null) | ||
| { | ||
| $usernameElement = $doc.CreateElement("add") | ||
| $usernameElement.SetAttribute("key", "Username") | ||
| $sourceElement.AppendChild($usernameElement) | Out-Null | ||
| } | ||
| $usernameElement.SetAttribute("value", $Username) | ||
|
|
||
| # Add the <ClearTextPassword> to the credential if none is found. | ||
| # Add it as a clear text because there is no support for encrypted ones in non-windows .Net SDKs. | ||
| # -> https://github.com/NuGet/Home/issues/5526 | ||
| $passwordElement = $sourceElement.SelectSingleNode("add[@key='ClearTextPassword']") | ||
| if ($passwordElement -eq $null) | ||
| { | ||
| $passwordElement = $doc.CreateElement("add") | ||
| $passwordElement.SetAttribute("key", "ClearTextPassword") | ||
| $sourceElement.AppendChild($passwordElement) | Out-Null | ||
| } | ||
|
|
||
| $passwordElement.SetAttribute("value", $pwd) | ||
| } | ||
|
|
||
| # Enable all darc-int package sources. | ||
| function EnableMaestroInternalPackageSources($DisabledPackageSources, $Creds) { | ||
| $maestroInternalSources = $DisabledPackageSources.SelectNodes("add[contains(@key,'darc-int')]") | ||
| ForEach ($DisabledPackageSource in $maestroInternalSources) { | ||
| EnableInternalPackageSource -DisabledPackageSources $DisabledPackageSources -Creds $Creds -PackageSourceName $DisabledPackageSource.key | ||
| } | ||
| } | ||
|
|
||
| # Enables an internal package source by name, if found. Returns true if the package source was found and enabled, false otherwise. | ||
| function EnableInternalPackageSource($DisabledPackageSources, $Creds, $PackageSourceName) { | ||
| $DisabledPackageSource = $DisabledPackageSources.SelectSingleNode("add[@key='$PackageSourceName']") | ||
| if ($DisabledPackageSource) { | ||
| Write-Host "Enabling internal source '$($DisabledPackageSource.key)'." | ||
|
|
||
| # Due to https://github.com/NuGet/Home/issues/10291, we must actually remove the disabled entries | ||
| $DisabledPackageSources.RemoveChild($DisabledPackageSource) | ||
|
|
||
| AddCredential -Creds $creds -Source $DisabledPackageSource.Key -Username $userName -pwd $Password | ||
| return $true | ||
| } | ||
| return $false | ||
| } | ||
|
|
||
| if (!(Test-Path $ConfigFile -PathType Leaf)) { | ||
| Write-PipelineTelemetryError -Category 'Build' -Message "Eng/common/SetupNugetSources.ps1 returned a non-zero exit code. Couldn't find the NuGet config file: $ConfigFile" | ||
| ExitWithExitCode 1 | ||
| } | ||
|
|
||
| # Load NuGet.config | ||
| $doc = New-Object System.Xml.XmlDocument | ||
| $filename = (Get-Item $ConfigFile).FullName | ||
| $doc.Load($filename) | ||
|
|
||
| # Get reference to <PackageSources> - fail if none exist | ||
| $sources = $doc.DocumentElement.SelectSingleNode("packageSources") | ||
| if ($sources -eq $null) { | ||
| Write-PipelineTelemetryError -Category 'Build' -Message "Eng/common/SetupNugetSources.ps1 returned a non-zero exit code. NuGet config file must contain a packageSources section: $ConfigFile" | ||
| ExitWithExitCode 1 | ||
| } | ||
|
|
||
| $creds = $null | ||
| $feedSuffix = "v3/index.json" | ||
| if ($Password) { | ||
| $feedSuffix = "v2" | ||
| # Looks for a <PackageSourceCredentials> node. Create it if none is found. | ||
| $creds = $doc.DocumentElement.SelectSingleNode("packageSourceCredentials") | ||
| if ($creds -eq $null) { | ||
| $creds = $doc.CreateElement("packageSourceCredentials") | ||
| $doc.DocumentElement.AppendChild($creds) | Out-Null | ||
| } | ||
| } | ||
|
|
||
| $userName = "dn-bot" | ||
|
|
||
| # Check for disabledPackageSources; we'll enable any darc-int ones we find there | ||
| $disabledSources = $doc.DocumentElement.SelectSingleNode("disabledPackageSources") | ||
| if ($disabledSources -ne $null) { | ||
| Write-Host "Checking for any darc-int disabled package sources in the disabledPackageSources node" | ||
| EnableMaestroInternalPackageSources -DisabledPackageSources $disabledSources -Creds $creds | ||
| } | ||
| $dotnetVersions = @('5','6','7','8','9','10') | ||
|
|
||
| foreach ($dotnetVersion in $dotnetVersions) { | ||
| $feedPrefix = "dotnet" + $dotnetVersion; | ||
| $dotnetSource = $sources.SelectSingleNode("add[@key='$feedPrefix']") | ||
| if ($dotnetSource -ne $null) { | ||
| AddOrEnablePackageSource -Sources $sources -DisabledPackageSources $disabledSources -SourceName "$feedPrefix-internal" -SourceEndPoint "https://pkgs.dev.azure.com/dnceng/internal/_packaging/$feedPrefix-internal/nuget/$feedSuffix" -Creds $creds -Username $userName -pwd $Password | ||
| AddOrEnablePackageSource -Sources $sources -DisabledPackageSources $disabledSources -SourceName "$feedPrefix-internal-transport" -SourceEndPoint "https://pkgs.dev.azure.com/dnceng/internal/_packaging/$feedPrefix-internal-transport/nuget/$feedSuffix" -Creds $creds -Username $userName -pwd $Password | ||
| } | ||
| } | ||
|
|
||
| $doc.Save($filename) |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.