[英]Jenkins' EnvInject Plugin does not persist values
I have a build that uses EnvInject Plugin to set an environmental value. 我有一个使用EnvInject插件来设置环境值的版本。 A different job needs to scan last good Jenkins build of that job and get the value of that environmental variable.
一项不同的工作需要扫描该工作的最后一份詹金斯模型,并获取该环境变量的值。
This all works well, except sometimes the variable will disappear from build history. 这一切都很好,除了有时变量将从构建历史记录中消失。 It seems that after some time passes, when I look at the 'Environment variables' section in build history, the injected value simply disappears.
似乎经过一段时间,当我查看构建历史记录中的“环境变量”部分时,注入的值只是消失了。
How can I make this persist? 我该如何保持下去? Is this a bug, or part of the design?
这是错误还是设计的一部分?
If it make any difference, the value of the injected variable is +1500 chars and in the following format: 'component1=1.1.2;component2=1.1.3,component3=4.1.2,component4=1.1.1,component4=1.3.2,component4=1.1.4' 如果有任何区别,则注入的变量的值为+1500个字符,并采用以下格式:'component1 = 1.1.2; component2 = 1.1.3,component3 = 4.1.2,component4 = 1.1.1,component4 = 1.3 .2,component4 = 1.1.4'
Looks like EnvInject and/or JobDSL have a bug. 看起来EnvInject和/或JobDSL有错误。
Steps to reproduce: 重现步骤:
Set up a job that runs this JobDSL: 设置运行此JobDSL的作业:
job('run_deploy_mock') { steps { environmentVariables { env('deployedArtifacts', 'component1=1.0.0.2') } } }
Run it and it will create a job called 'deploy_mock' 运行它,它将创建一个名为“ deploy_mock”的作业
If I substitute the '=' for something else, it works as expected. 如果我用'='代替其他东西,它将按预期工作。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.