Jenkins Build History

by Filip Cosmin   Last Updated April 15, 2019 10:05 AM - source

I'm facing some problems with Jenkins Build History. For some reason Jenkins does not persist the build history even if I'm using the Build Discarder in the declarative pipeline. The syntax I'm using is the following:

options { buildDiscarder logRotator(artifactDaysToKeepStr: '', artifactNumToKeepStr: '', daysToKeepStr: '', numToKeepStr: '30') }

I would expect this to persist the last 30 builds but this does not happen. After applying this to my Jenkins file, it constantly resets to build 1 after only 7,8 builds.

Is there any other method of persisting a number of builds in Jenkins, other than Build Discarder, or I'm using it wrong?

Our Jenkins is installed on Kubernetes and we are using Jenkins LTS version 2.164.2.

Thanks



Related Questions


What DevOps architect do?

Updated October 15, 2017 03:05 AM