arcade icon indicating copy to clipboard operation
arcade copied to clipboard

NuGet Validation fails when a pipeline doesn't produce any nuget packages

Open ericstj opened this issue 1 year ago • 0 comments

  • [x] This issue is blocking
  • [ ] This issue is causing unreasonable pain

We have a repo that needs to disable packages occasionally. When it does so there is no way for the pipeline to disable the NuGet Validation. It fails because it attempts to download

The only way to disable this step is through the enableNugetValidation pipeline parameter. AFAICT we cannot set this dynamically based on the source in the repo, so developers would need to "remember" to enable and disable this parameter.

Ideally this step should automatically skip if there are no packages to publish. I tried to do this but couldn't get the yml authoring correct. My non-working attempt is here: https://dev.azure.com/dnceng/internal/_git/dotnet-maintenance-packages/commit/aa4716ed8a6a16b11e9680e26a5b134a46a2386f?refName=refs%2Fheads%2FconditionPackageValidation I couldn't get the plumbing of the variable correct (and it also needs to be set in the true case).

It would be best if arcade would support this.

ericstj avatar Mar 14 '24 23:03 ericstj