简体   繁体   English

Azure DevOps 发布管道 - 如何自动注册部署组目标

[英]Azure DevOps Release Pipeline - How to Automate Registration of Deployment Group targets

Currently the Deployment Group 'Register' script needs to be run interactively by providing information like tags, Token, account credentials etc.目前,部署组“注册”脚本需要通过提供标签、令牌、帐户凭据等信息以交互方式运行。

It becomes a tedious task to run this interactive script on hundreds of machines to register them into Azure Pipeline Deployment Group.在数百台机器上运行此交互式脚本以将它们注册到 Azure Pipeline 部署组成为一项繁琐的任务。

Is there a way, where we can run in non-interactive mode by passing the required information as a parameter to script?有没有办法通过将所需信息作为参数传递给脚本来在非交互模式下运行?

For eg .\\scriptToAddToDeploymentGroup.ps1 <--tags appServer, domainController, etc> <--token 43875783457834545>例如 .\\scriptToAddToDeploymentGroup.ps1 <--tags appServer, domainController, etc> <--token 43875783457834545>

Can we automate this task from command line by passing parameter values?我们可以通过传递参数值从命令行自动执行此任务吗?

For this issue , the answer is yes.对于这个问题,答案是肯定的。 You could add tags and token as parameters to the Registration script.您可以将标签和令牌作为参数添加到注册脚本中。 For details ,please refer to this document .有关详细信息,请参阅此文档

If you chose --auth pat : --token <token> - specifies your personal access token如果您选择--auth pat : --token <token> - 指定您的个人访问令牌

--deploymentGroupTags <tags> - used with --addDeploymentGroupTags to specify the comma separated list of tags for the deployment group agent - for example "web, db" --deploymentGroupTags <tags> - 与--addDeploymentGroupTags一起使用,为部署组代理指定逗号分隔的标签列表 - 例如“web, db”

For example:例如:

\config.cmd --deploymentgroup --deploymentgroupname "xxx" --agent $env:COMPUTERNAME --runasservice --work '_work' --url 'https://dev.azure.com/xx/' --projectname 'xxx' 

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Azure DevOps 将发布管道链接到部署组 - Azure DevOps link release pipeline to deployment group 在 Azure DevOps 发布管道中,如何将具有不同目标文件夹的部署组部署到多个 VM - In an Azure DevOps release pipeline how do you deploy to multiple VMs a deployment group with different target folders 如何使用部署组的 Azure 管道代理知道在 DevOps 发布期间跳过了哪些机器 - How to know which machines were skipped during DevOps Release using Azure Pipeline Agents for a Deployment Group Azure DevOps 发布管道上的 ClickOnce 部署 - ClickOnce deployment on Azure DevOps release pipeline Azure DevOps发布管道优先级部署 - Azure DevOps Release Pipeline Priority Deployment 如何使用 Azure DevOps REST API 获取 azure devops 发布管道部署日志? - How to get azure devops release pipeline deployment logs using Azure DevOps REST API? Azure DevOps发布管道的动态变量组 - Dynamic variable group for Azure DevOps release pipeline Azure DevOps 管道即代码和部署组 - Azure DevOps Pipeline as Code and Deployment Group Azure DevOps - 使用部署组或部署作业向环境发布管道? - Azure DevOps - Release Pipeline using Deployment Groups or Deployment Job to an Environment? Azure DevOps 发布管道 - Azure Devops Release Pipeline
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM