1

We are started migration from TeamCity+Proget to Azure Pipelines and Azure Artifacts. For builds we use cake scripts and it's a part of problem.
In our cake scripts a lot of #addin nuget:?package=My.Private.Package Unfortunately cake nuget cannot authenticate on Azure Artifacts, which is required by it. #addin is run before other code inside cake scripts, so i cant add any internal authentication.
Also problem is that we are using Hosted Agents.

So my idea is for resolving it, is download nuget packages from Azure Artifacts (with Download Package steps), unzip them (cause its downloaded as zip files), pack again to nupkg files and somehow add to local cache.

So i got few questions:
1. Maybe somebody know better way to resolve authentication problem between cake addin nuget and Azure Artifacts?
2. If not, how to add to local cache nuget packages from .nupkg files on Hosted Agents without adding it to csproj/sln files. (Dev team is totally against it, cause those packages needed for build and not a part of application).

Will be appreciate for any ideas. Thanks

ndm
  • 59,784
  • 9
  • 71
  • 110
Oleg Usmanov
  • 43
  • 2
  • 7
  • FWIW, I blogged about similar problems but in the other direction (publishing to Artifacts from Pipelines). Maybe it'll be helpful: https://daveaglick.com/posts/pushing-packages-from-azure-pipelines-to-azure-artifacts-using-cake#system.accesstoken - perhaps if you can set up the authenticated NuGet feed before calling the Cake script? – daveaglick Nov 26 '18 at 18:53
  • @daveaglick Saw your post, it's very good. Made additional cake file with task which is authenticated on feed. But for another files it will not work with addins, cause addins called before processing file code. So I can use it only if somehow remake scripts without addins usage (connect nuget package with some internal method). If you know how to make it, please share. Cause everywhere in those scripts used methods from dlls which are part of nuget packages. – Oleg Usmanov Nov 27 '18 at 09:27

0 Answers0