[英]How to use Jenkins Build Keeper Plugin
I would like to use the Jenkins 'Build Keeper Plugin' but I don't know how. 我想使用Jenkins的“ Build Keeper插件”,但我不知道如何。 The plugin site doesn't describe how to use it.
插件站点没有描述如何使用它。 Plugin Site
插件网站
On this page I found the extension points which I would like to use, eg the org.jenkins_ci.plugins.build_keeper.KeepFirstFailedPolicy
在此页面上,我找到了要使用的扩展点,例如
org.jenkins_ci.plugins.build_keeper.KeepFirstFailedPolicy
But in the configuration part of my project, I can't find any place to configure it to use that policy. 但是在我的项目的配置部分,我找不到任何地方可以配置它以使用该策略。 So where do I have to add it?
那么我必须在哪里添加它?
Jenkins version is 1.544 詹金斯版本为1.544
Have you tried to open Job configuration page and look for settings ? 您是否尝试过打开“作业配置”页面并寻找设置?
For example it is another plugin but it is very similar : Build Discard plugin, may be you will use it for your purposes: 例如,它是另一个插件,但非常相似:Build Discard插件,可能是出于您的目的使用它:
You can configure it in the job under the section Build Environment. 您可以在“构建环境”部分下的作业中对其进行配置。
For screenshots see also https://issues.jenkins-ci.org/browse/JENKINS-25293 有关屏幕截图,请参见https://issues.jenkins-ci.org/browse/JENKINS-25293
If used from within a pipeline, it is enough to write 'currentBuild.rawBuild.keepLog(true)' 如果从管道内部使用,则编写'currentBuild.rawBuild.keepLog(true)'就足够了
That is unfortunately not an interface to the plugin, just a jobs setting, but can solve it when You want to keep all builds, or decide within the build if to keep it. 不幸的是,这不是插件的接口,只是工作设置,但是当您要保留所有构建或在构建中决定是否保留它时可以解决该问题。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.