Skip to content

Pipeline properties

Patrick O'Hannigan edited this page Nov 15, 2016 · 7 revisions

One important option you may want to set up is the log rotation, meaning how long pipeline runs are retained for:

pipeline {
    agent any

    jobProperties {
        buildDiscarder(logRotator(numToKeepStr:'5'))
    }

    ...
}

There are other advanced properties that you may need to set from time to time - they go in this section. It is likely you won't need more than what is shown above.