Azure DevOps Project pipeline not able to access NuGet package from Artifact Feed in different Project

前端 未结 3 949
庸人自扰
庸人自扰 2021-01-05 00:19

Updated 20-Feb-2020

Summary

Azure DevOps pipeline build not able to find NuGet package from our private feed under Artifacts.

相关标签:
3条回答
  • 2021-01-05 00:43

    In my LibsProject I have a LibsFeed (OP's RED), which I wanted to use in a pipeline in my ConsumingProject.

    I had to add the following permissions to get it to work:

    • LibsFeed: Add ConsumingProject Build Service as Contributor (Read automatically changed to Contributor somehow)
    • LibsProject: Add ConsumingProject Team to the LibsProject Team under LibsProject -> Project Settings -> Team

    I can not even enable OP's solution, even with all thinkable admin rights

    Limit job authorization scope to current project

    0 讨论(0)
  • 2021-01-05 00:44

    Azure DevOps Project pipeline not able to access Artifact Feed in different project

    I think you are going the right ways. There is known issue about the project scope feed.

    As the document Package permissions in Azure Pipelines stated:

    To use packages from a feed in Azure Pipelines, the appropriate build identity must have permission to your feed. By default, the Project Collection Build Service is a Contributor. If you've changed your builds to run at project scope, you'll need to add the project-level build identity as a Reader or Contributor, as desired. The project-level build identity is named as follows:

    [Project name] Build Service ([Organization name]) (e.g. FabrikamFiber Build Service (codesharing-demo))

    You could check this thread for some more details.

    Hope this helps.

    0 讨论(0)
  • 2021-01-05 00:54

    Finally, I found the problem. I wonder if this is a bug, or just poorly documented....(or maybe I just didn't interpret it correctly).

    As per Leo Lui-MSFT's suggestion above (documented by Microsoft), I'd added the permissions to the NuGet feed, and this didn't work. However, I was intrigued by his sentence:

    If you've changed your builds to run at project scope

    Personally, I hadn't, so I got with our System Administrator and we went through all the possible settings. Eventually, we found it - it wasn't something I had the ability to change.

    So in my example above, BLUE and GREEN are the two projects that are trying to use the NuGet package in RED's Artifact feed.

    So picking BLUE (or GREEN), in the bottom left hand corner of Azure DevOps you'll see a link "Project Settings". Under "Pipelines > Settings" there are four settings. We had to change the following to be:

    Limit job authorization scope to current project = false

    Hope that helps!

    0 讨论(0)
提交回复
热议问题