如何在Active Choices参数中使用在构建中注入的密码作为环境变量 [英] How can I use passwords injected in the build as environment variables in Active Choices Parameter

查看:295
本文介绍了如何在Active Choices参数中使用在构建中注入的密码作为环境变量的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在构建配置部分定义了密码,标题为将密码作为环境变量注入到构建中":

I have passwords defined in the build configuration section titled "Inject passwords to the build as environment variables":

我想在我的主动选择"中使用MYVAR(未加密的值).不幸的是,它不起作用.对MYVAR的引用失败.

I want to use MYVAR (unencrypted value) in my Active Choices. Unfortunately, it's not working. The reference to MYVAR fails.

在下面的示例中,为了进行测试,我只是尝试显示MYVAR的值作为选择.您会看到它失败了,并改用了fallback active choices脚本.

In the example below, for testing, I am just trying to display the value of MYVAR as a choice. You can see it fails and the fallback active choices script is used instead.

最终,我想使用此变量对服务进行身份验证以构建选项列表,但是甚至无法在我的脚本中引用它.我被卡住了.

Ultimately, I want to use this variable to authenticate to a service to build a list of choices but without being able to even reference it in my script. I'm stuck.

当我尝试使用参数构建"时:

When I try "build with parameters":

谢谢您的帮助!

推荐答案

我认为这行不通.为什么?好吧, EnvInject插件中的构建环境选项 a>阅读:

I think this is not going to work. Why? Well, the Build Environment options of the EnvInject Plugin read:

将环境变量注入到构建过程中

将密码作为环境变量注入到构建中

Active Choices插件开始发挥作用构建尚未开始,因此尚未进行注入.

At the time the Active Choices Plugin comes into play the build hasn't started yet and hence the injection hasn't taken place.

这篇关于如何在Active Choices参数中使用在构建中注入的密码作为环境变量的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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