【发布时间】:2020-08-23 01:08:48
【问题描述】:
我们的 Jenkins 实例当前报告所有作业的所有构建的 BUILDS_ALL_TIME 为 999。有没有其他人经历过这种情况并了解让它按预期处理这个环境变量的阻力最小的路径?
背景故事: 昨天早上,我将 Jenkins 实例上的所有插件都更新到了最新的稳定版本。有六个或更多插件要更新,我从不密切关注它们,但 Credentials Binding plugin 突出显示,因为它使我的显示器因关键安全更新而变红并启动了整个过程。
昨天下午,我的同事注意到他的一个版本的版本号从 1.0.0.7 变为 1.0.0.999,我能够用我的一个确认同样的事情。现在,所有依赖 BUILDS_ALL_TIME 环境变量的作业都会在每个构建中为该变量报告 999。
Version Number Plugin 已安装且是最新的,以下是受影响版本的 build.xml 的摘录:
<org.jvnet.hudson.tools.versionnumber.VersionNumberAction plugin="versionnumber@1.9">
<info>
<buildsToday>34</buildsToday>
<buildsThisWeek>40</buildsThisWeek>
<buildsThisMonth>40</buildsThisMonth>
<buildsThisYear>40</buildsThisYear>
<buildsAllTime>24</buildsAllTime> <!-- This is correct, is incremented properly between builds, and is updated appropriately when overridden in the job configuration GUI -->
</info>
<versionNumber>999.0.0</versionNumber> <!-- This is incorrect and NOT incremented properly between builds -->
</org.jvnet.hudson.tools.versionnumber.VersionNumberAction>
这种行为的时机似乎与插件升级有关(这种关联并不确定,但这是我目前所拥有的最好的)。因此,我尝试使用管理 GUI 中可用的选项逐一降级每个插件,以查看是否能找到罪魁祸首。这是徒劳的。我无法选择降级版本号插件,但这个东西的最后一个版本是两年前。
【问题讨论】:
标签: jenkins environment-variables jenkins-plugins