本文介绍了如何更改Jenkins保留的内部版本数?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Jenkins如何设置一份特定工作的构建数量?

How can one set the number of builds kept by Jenkins for a specific job?

Jenkins保留我们所有工作的最后30个构建。不过,对于一项特定的工作,我们希望保留60个版本,而不是30个。

Jenkins keeps the last 30 builds of all our jobs. For a specific job, though, we would like to keep 60 builds, not 30.

我转到工作的配置页面,勾选了放弃旧版本,输入 60放入保留的最大构建数量,保存作业配置,然后重新启动Jenkins。

I went to the job's configuration page, ticked "Discard old builds", entered "60" into "Max # of builds to keep", saved the job configuration, and restarted Jenkins.

此更改后,Jenkins仍然仅保留30个构建版本。我在做什么错?

After this change, Jenkins still keeps only 30 builds of the job. What am I doing wrong?

相关问题:为什么只保留30个构建? (我认为默认值是不删除任何内部版本。)

Related question: Why are only 30 builds kept? (I thought the default was not to delete any builds.)

我们在Linux下使用Jenkins版本2.164.1。

We use Jenkins version 2.164.1 under Linux.

推荐答案

UI限于30个内部版本。尝试通过带有版本号f的url访问较早的版本。

The UI is limited to 30 builds. Try accessing older builds via the url with the build number, f.e.

https://myjenkins.uk/view/TWIN/job/myjob/insert-build-number-here/

您还可以在詹金斯母版上使用存储的工件访问构建,例如:

You can also access the builds with stored artifacts on your jenkins master, f.e.:

/var/lib/jenkins/jobs/myjob/builds

这篇关于如何更改Jenkins保留的内部版本数?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-29 19:32