A "log rotation" strategy should be implemented in the Jenkins pipeline to only store the last 5 builds
This change should be made in the pipeline script itself (not through the Jenkins UI) to ensure the configuration is checked in.
A "log rotation" strategy should be implemented in the Jenkins pipeline to only store the last 5 builds
This change should be made in the pipeline script itself (not through the Jenkins UI) to ensure the configuration is checked in.
I'm assuming you're using the Jenkins Artifactory plugin.
You can configure build retention before the publish build info step:
stage ('Set build retention') {
steps {
rtBuildInfo (
maxBuilds: 5
)
}
}
You can find a good example here.
buildInfo.retention maxBuilds: 5
You can find a good example here.