Repository navigation
BUILD-12160 Add config-nuget to resolve NuGet packages through Repox - #354
Conversation
julien-carsique-sonarsource
left a comment
There was a problem hiding this comment.
Test plan: the live check is still unchecked. Please tick it once sonar-dotnet-enterprise#2653 restores from the Edge on a Windows runner, with a link to the run, before this is merged.
Read the Repox reader token for repox-url, export it for the NuGet package source credentials, and rewrite the SaaS Repox package sources of the listed NuGet configuration files to repox-url. Files that already resolve through repox-url are skipped, so the action can be called again.
a09a8a6 to
518cd4e
Compare
|
Code Review ✅ Approved 2 closed / 2 findings🟡 Medium risk · Adds Vault-backed NuGet credentials and rewrites package sources for configured builds New ✅ 2 closed✅ Edge Case: xargs trimming mangles backslashes and quotes in config paths
✅ Quality: config-nuget added to kcov coverage but not to sonar.sources
VerificationFunctional validation No results Rules No rules evaluated Auto-approval Not enabledFor more verification details, comment OptionsAuto-apply is off → Gitar will not commit updates to this branch. Comment with these commands to change the behavior for this request:
Was this helpful? React with 👍 / 👎 | Gitar |



Part of BUILD-12160
Summary
New
config-nugetaction, so .NET repositories can resolve NuGet packages through the JFrog Edge with the samerepox-urlopt-in as the otherconfig-*actions.config-*actions:development/artifactory/token/...onvault.sonar.buildby default,development/artifactory-edge-dev/token/...onvault.dev.sonar.buildwith an Edgerepox-url.ARTIFACTORY_URL,ARTIFACTORY_USERNAMEandARTIFACTORY_ACCESS_TOKEN, plusARTIFACTORY_USERandARTIFACTORY_PASSWORD, which the NuGet configurations reference inpackageSourceCredentials.repox-urlother than SaaS, rewrites every package sourcevaluestarting withhttps://repox.jfrog.io/artifactory/innuget-config-filestorepox-url. The committed files keep SaaS Repox for local builds, andtrustedSignersservice indexes are unchanged. It fails when a listed file is missing or has no Repox package source.get-build-number, so it runs on Windows runners (Git Bash) and only needsid-token: write.config-nugetsection.Test plan
spec/config-nuget_spec.sh: 10 examples, 0 failures. pre-commit passes.repox-url: https://repox-internal.dev.sonar.build: on Windows warp runners the action rewritesanalyzers/NuGet.Config,private/analyzers/NuGet.Configandprivate/its/projects/NuGet.config, anddotnet restoresucceeds from the Edge (.NET UTs NetFx, .NET UTs Net)..NET ITsfails on a S9415 ruling difference after a successful restore, the same as on master (run).