如何在VSTS中添加秘密变量作为任务环境变量 [英] How to add secret variable as task environment variable in VSTS

查看:17
本文介绍了如何在VSTS中添加秘密变量作为任务环境变量的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

然后它们可以作为输入传递给任务,如下所示:

This documentation states that secret variables are

Not decrypted into environment variables. So scripts and programs run by your build steps are not given access by default.

One of my build tasks require that an environment variable be set that is stored in a secret variable. Does this mean it's impossible to do this using secret varaibles in VSTS? If not, how do I do this?

For further background, I'm trying to code sign my electron app using electron-builder. It requires that two environment variables be set: CSC_LINK and CSC_KEY_PASSWORD. One of these is the password to a code signing certificate so needs to be kept secure.

解决方案

You can supply variables to pass to tasks in the Variables page of the build definition:

Then they can be passed in to a task as an input like so:

这篇关于如何在VSTS中添加秘密变量作为任务环境变量的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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