维护 TFS 发布管理的密码 [英] Maintain password for TFS Release Management

查看:23
本文介绍了维护 TFS 发布管理的密码的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用 TFS 2015 Update2 Release Management 为我们的内部 LOB 应用程序开发发布管道.有各种任务,例如Windows 机器文件复制"和在目标机器上运行 PowerShell",需要将管理员凭据作为输入参数传递.这些管理员凭据在目标节点上具有管理访问权限.我正在为这些使用 Windows 服务帐户.我们有组织安全政策每年轮换密码.

I'm developing Release pipeline for our internal LOB applications using TFS 2015 Update2 Release Management. There are various tasks like "Windows Machine File Copy" and "Run PowerShell on Target machines" which needs admin credentials to be passed as input parameters. These admin credentials have Administrative access on target nodes. I'm using Windows service accounts for these. We have an organizational security policy to rotate passwords every year.

考虑到这一点,每年为新密码更新数百个 TFS 版本定义是很麻烦的.

With that in mind, it is cumbersome to update hundreds of TFS release definitions for new password every year.

你有更好的主意来处理这个问题吗?

Do you have a better idea to handle this?

感谢您的帮助和建议.

推荐答案

您可以通过 REST API,文档齐全且相当简单.

You can update release definitions programmatically via the REST API, which is well-documented and fairly straightforward.

Ex(请注意,这是针对 Update 3 及更高版本,根据文档,TFS 2015.2 中的 API 可能略有不同):

Ex (note that this is for Update 3 and later, per the documentation, the API in TFS 2015.2 may differ slightly):

PUT https://fabfiber.vsrm.visualstudio.com/DefaultCollection/ff213d65-d61d-447c-b39d-d16f21b18364/_apis/release/definitions/28?api-version=3.0-preview.1

内容类型:application/json

<代码>{身份证":28,"name": "Fabrikam.CD","createdOn": "2016-04-11T11:04:05.197Z",由...制作": {"id": "52a5bc8d-4730-400a-95c7-7276d4ae5953","displayName": "查克莱因哈特","uniqueName": "chuckreinhart@outlook.com","url": "https://fabfiber.vssps.visualstudio.com/_apis/Identities/52a5bc8d-4730-400a-95c7-7276d4ae5953","imageUrl": "https://fabfiber.visualstudio.com/DefaultCollection/_api/_common/identityImage?id=52a5bc8d-4730-400a-95c7-7276d4ae5953"},环境":[{"name": "开发",等级":1,部署步骤":{任务": []},所有者": {"id": "52a5bc8d-4730-400a-95c7-7276d4ae5953","displayName": "查克莱因哈特","uniqueName": "chuckreinhart@outlook.com","url": "https://fabfiber.vssps.visualstudio.com/_apis/Identities/52a5bc8d-4730-400a-95c7-7276d4ae5953","imageUrl": "https://fabfiber.visualstudio.com/DefaultCollection/_api/_common/identityImage?id=52a5bc8d-4730-400a-95c7-7276d4ae5953"},"queueId": 2,需要": [],状况": [],变量":{},运行选项":{},环境选项":{"emailNotificationType": "始终",skipArtifactsDownload":假,超时分钟":0},执行政策":{并发计数":0,队列深度计数":0},preDeployApprovals":{批准":[{等级":1,isAutomated":真,isNotificationOn":假}],批准选项":空},postDeployApprovals":{批准":[{等级":1,isAutomated":真,isNotificationOn":假}],批准选项":空}}],文物":[{"别名": "FabrikamCI","type": "构建",定义参考":{项目": {"name": "Fabrikam",id":ff213d65-d61d-447c-b39d-d16f21b18364"},定义": {"name": "Fabrikam.CI",id":1"}},isPrimary":假}],变量":{},触发器":[],修订":1,"releaseNameFormat": "",保留政策":{保留天数":60}}

这篇关于维护 TFS 发布管理的密码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆