怎样在Azure DevOps创建一个pipeline

You learned how to set up Azure Pipelines in an earlier module. If you need a refresher, head over to Create a build pipeline with Azure Pipelines .

Since your solution has just the one project in it, the scope of the job agent is limited and cannot access the package. To make sure the agent has the permissions it needs to publish the artifact, you need to turn off Limit job authorization scope to current project in the pipeline settings.

To turn off this setting:

  1. In Azure DevOps, navigate to your organization.

  2. Select Organization settings from the bottom corner.

  3. Under Pipelines, select Settings.

  4. Turn off Limit job authorization scope to current project.

    Azure DevOps showing how to set the job authorization scope setting

You need to make a similar change to your project:

  1. From Azure DevOps, go to the Space Game - web - Dependencies project.
  2. Select Project settings at the bottom left.
  3. Under Pipelines, select Settings
  4. Turn off Limit job authorization scope to current project.

Next, you'll set up a second pipeline to build the package and upload that package to Azure Artifacts.

  1. From Azure DevOps, go to the Space Game - web - Dependencies project.

  2. Select Pipelines, from the menu on the left.

  3. Select + New Pipeline.

  4. From the Connect tab, select GitHub.

  5. From the Select tab, select mslearn-tailspin-spacegame-web-models.

    If prompted, enter your GitHub credentials. From the page that appears, scroll to the bottom and select Approve and install.

  6. From the Review tab, you see the new pipeline's azure-pipelines.yml file.

  7. Select Run.

  8. Watch the pipeline run.

  9. Go to the Artifacts tab.

  10. From the dropdown at the top, select Tailspin.SpaceGame.Web.Models.

    Screenshot of Azure Artifacts dropdown selection

    You see the resulting package, Tailspin.SpaceGame.Web.Models, in Azure Artifacts.

    Screenshot of Azure Artifacts, showing version 1.0 of the package

  11. Select the package to go to the details page. Then copy the version number to a location where you can easily access it later.

    Screenshot of Azure Artifacts dropdown selection

    You'll use this version number in the next part.

 

 

原文:

https://docs.microsoft.com/zh-cn/learn/modules/manage-build-dependencies/5-create-package-pipeline

Create the pipeline in Azure Pipelines

  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值