用于发布管理的交互式变量 [英] Interactive variables for release management

查看:144
本文介绍了用于发布管理的交互式变量的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在VSTS的构建定义中,您可以声明一个变量并允许在队列时间对其进行更改,如此快照

In Build definition for VSTS, you could declare a variable and allow to change it at queue time as in this snapshot

我可以对Release定义中的变量做同样的事情吗?

Could I do the same for the variable in Release definition?

现在我有一个Release定义,该定义具有一个名为 Sharepoint 的环境.在这种环境中,我有一个PowerShell任务将构建工件的zip文件上载到Sharepoint Online.要使用SharePoint API上传文件,我需要一个SharePoint帐户凭据,该凭据存储为该 Sharepoint 环境的变量.问题是Microsoft要求每90天更改一次Sharepoint帐户的密码(这是我们的IT部门告诉我的).因此,如果不同的开发人员希望从此发布定义"中请求发布并且我的密码已更改,则将我的凭据存储在环境中的变量中不是一个好选择.

Right now I have a Release definition which has an environment called Sharepoint. In this environment, I have a PowerShell task to upload a zip file of build artifact to Sharepoint Online. To upload a file using SharePoint API, I need a SharePoint account credential which I store as a variable for the this Sharepoint environment. The problem is Microsoft requires to change password for the Sharepoint account every 90 days (that what our IT told me). Therefore, storing my credential in the variable in the environment is not a good choice if different developers would like to request a release from this Release Definition and my password has been changed.

当开发人员想要发布版本时,是否可以通过任何方式提示Sharepoint凭据?

Is there any way I could have an interactive prompt for Sharepoint credential when a developer would like to request a release?

此外,由于我们将Azure Active Directory用于Office365,Sharepoint和VSTS,所以我想知道是否可以从Release API在https://www.visualstudio.com/en-us/docs/integrate/api/rm/releases#for-a-release-definition返回的 createdBy 字段中提取凭据. 并将其用作Sharepoint Online的凭据.

Also, since we use the Azure Active Directory for Office365, Sharepoint as well as VSTS, I wonder if I could extract the credential from the createdBy field returned by Release API at https://www.visualstudio.com/en-us/docs/integrate/api/rm/releases#for-a-release-definition and use it as a credential for Sharepoint Online.

推荐答案

在VSTS中请求发布时,它不支持更改变量值.没有诸如构建定义之类的交互式变量.

It doesn't support to change variable values When request a release in VSTS. No interactive variables like build definition.

您可以对此用户声音进行投票:

You could vote this user voice: https://visualstudio.uservoice.com/forums/330519-team-services/suggestions/16616269-change-release-variables-value-when-deploy-a-rele

您在上面发布的REST API返回用户的ID和displayName,响应中没有密码.因此,这也无法满足您的要求.

The REST API you posted above returns user's ID and displayName, there's no passwords in the response. So this also couldn't meet your requirement.

这篇关于用于发布管理的交互式变量的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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