【发布时间】:2016-10-30 20:05:49
【问题描述】:
我有 2 个属性文件,我希望通过邮件发送它们的内容。我的做法是这样的:
- 用EnvInject读取这些文件
那些配置文件包含不同的链接和日期,我在电子邮件中看到相同的输出:
Android Mobile Client Release Notes CH
Link: ftp://testlink_CH
Date: 28/06/2016
Android Mobile Client Release Notes PL
Link: ftp://testlink_CH
Date: 28/06/2016
当 ${Link} 被设置时,即使我尝试“unset”命令,它也不会被忽略。
[EnvInject] - Injecting environment variables from a build step.
[EnvInject] - Injecting as environment variables the properties file path 'AndroidDev/CH/config.properties'
[EnvInject] - Variables injected successfully.
[EnvInject] - Injecting as environment variables the properties content
LINK_CH=${Link}
DATE_CH=${Date}
[EnvInject] - Variables injected successfully.
[mvandroid] $ /bin/sh -xe /tmp/hudson108948632979693109.sh
+ unset Link
+ unset Date
[EnvInject] - Injecting environment variables from a build step.
[EnvInject] - Injecting as environment variables the properties file path 'AndroidDev/PL/config.properties'
[EnvInject] - Variables injected successfully.
[EnvInject] - Injecting as environment variables the properties content
LINK_PL=ftp://testlink_CH
DATE_PL=28/06/2016
你能帮我解决这个问题吗?或者给我你煽动这个?
【问题讨论】:
-
您无法取消设置系统环境变量。您只能删除继承的环境变量。
-
您能详细说明一下吗?我对此比较陌生...我正在设置系统环境变量?什么是继承的环境变量?
标签: jenkins environment-variables