This needs to be configurable at the root level. Adding it into every Jenkinsfile in a Github organization is not feasible when we have hundreds of repos.
David, love the pic, I've joked about using that image as a "wall paper" of sorts for my entire 'hexicle' (not quite a cube!). I agree, it would make sense for this to be configurable as a default in Jenkins and then allow a Jenkinsfile to override the instance settings. This is a fairly common convention in many places, a hierarchy of command/authority.
Comments
4 comments
Using this suggestion leads to invalid code.
This needs to be configurable at the root level. Adding it into every Jenkinsfile in a Github organization is not feasible when we have hundreds of repos.
David, love the pic, I've joked about using that image as a "wall paper" of sorts for my entire 'hexicle' (not quite a cube!). I agree, it would make sense for this to be configurable as a default in Jenkins and then allow a Jenkinsfile to override the instance settings. This is a fairly common convention in many places, a hierarchy of command/authority.
import hudson.model.*
Hudson.instance.getAllItems(org.jenkinsci.plugins.workflow.job.WorkflowJob).each { job ->
if(job.getBuildDiscarder() == null) {
job.logRotator = new hudson.tasks.LogRotator(int,int) // (int,int,int,int) to include artifacts
}
}
You should have the Pipeline plugin installed.
Please sign in to leave a comment.