简体   繁体   English

维护TFS版本管理的密码

[英]Maintain password for TFS Release Management

I'm developing Release pipeline for our internal LOB applications using TFS 2015 Update2 Release Management. 我正在使用TFS 2015 Update2 Release Management为内部LOB应用程序开发Release管道。 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. 有许多任务,例如“ Windows计算机文件复制”和“在目标计算机上运行PowerShell”,需要将管理凭据作为输入参数进行传递。 These admin credentials have Administrative access on target nodes. 这些管理员凭据对目标节点具有管理访问权限。 I'm using Windows service accounts for these. 我正在使用Windows服务帐户。 We have an organizational security policy to rotate passwords every year. 我们有一项组织安全政策,每年轮换一次密码。

With that in mind, it is cumbersome to update hundreds of TFS release definitions for new password every year. 考虑到这一点,每年都要为新密码更新数百个TFS版本定义。

Do you have a better idea to handle this? 您有更好的主意来解决这个问题吗?

Thanks for your help and suggestions. 感谢您的帮助和建议。

You can update release definitions programmatically via the REST API , which is well-documented and fairly straightforward. 您可以通过REST API来以编程方式更新发行版定义,该文件有据可查且相当简单。

Ex (note that this is for Update 3 and later, per the documentation, the API in TFS 2015.2 may differ slightly): 例如(请注意,这是针对Update 3和更高版本的,根据文档,TFS 2015.2中的API可能会略有不同):

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

Content-Type: application/json

{ "id": 28, "name": "Fabrikam.CD", "createdOn": "2016-04-11T11:04:05.197Z", "createdBy": { "id": "52a5bc8d-4730-400a-95c7-7276d4ae5953", "displayName": "Chuck Reinhart", "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" }, "environments": [ { "name": "Dev", "rank": 1, "deployStep": { "tasks": [] }, "owner": { "id": "52a5bc8d-4730-400a-95c7-7276d4ae5953", "displayName": "Chuck Reinhart", "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, "demands": [], "conditions": [], "variables": {}, "runOptions": {}, "environmentOptions": { "emailNotificationType": "Always", "skipArtifactsDownload": false, "timeoutInMinutes": 0 }, "executionPolicy": { "concurrencyCount": 0, "queueDepthCount": 0 }, "preDeployApprovals": { "approvals": [ { "rank": 1, "isAutomated": true, "isNotificationOn": false } ], "approvalOptions": null }, "postDeployApprovals": { "approvals": [ { "rank": 1, "isAutomated": true, "isNotificationOn": false } ], "approvalOptions": null } } ], "artifacts": [ { "alias": "FabrikamCI", "type": "Build", "definitionReference": { "project": { "name": "Fabrikam", "id": "ff213d65-d61d-447c-b39d-d16f21b18364" }, "definition": { "name": "Fabrikam.CI", "id": "1" } }, "isPrimary": false } ], "variables": {}, "triggers": [], "revision": 1, "releaseNameFormat": "", "retentionPolicy": { "daysToKeep": 60 } }

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

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM