Thanks for reply, and for providing both the Pipeline syntax formats. This
is the first time I noticed that there are two distinct Pipeline syntaxes.
I'm trying out the Scripted Pipeline syntax now.
I tried to find documentation on the difference between 'numToKeepStr' and
'artifactNumToKeepStr' but couldn't. I set them both the same number in
hopes that will have the desired effect of saving a particular number of
builds.
Mark
On Wednesday, March 1, 2017 at 4:08:53 AM UTC-5, Baptiste Mathus wrote:
>
> I don't think there's something per branch, but you probably want to
> either search JIRA and/or file a new feature request about it.
>
> You shouldn't need a special plugin, this is a standard feature. Here's
> the way to do it with Declarative Pipeline:
>
> pipeline {
> options {
> buildDiscarder(logRotator(numToKeepStr: '20'))
> }
> ...
> }
>
> Or with scripted Pipeline:
> https://github.com/jenkinsci/jenkins/blob/master/Jenkinsfile#L17-L19
>
> HTH
>
> 2017-02-28 20:24 GMT+01:00 Mark Stosberg <[email protected]
> <javascript:>>:
>
>> For cleaning up old builds, the "Discard Old Builds" plugin is
>> recommended:
>>
>> https://wiki.jenkins-ci.org/display/JENKINS/Discard+Old+Build+plugin
>>
>> However, the instructions for reference a "post build" step which doesn't
>> exist in the Configure interface for Multibranch Pipeline projects.
>>
>> What's the recommended way to clean-up builds from multi-branch pipeline
>> projects? Ideally I'd like different pruning policies for different
>> branches.
>>
>> Thanks,
>>
>> Mark
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Jenkins Users" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to [email protected] <javascript:>.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/jenkinsci-users/1d9e0343-bbce-474f-a4fe-7623a4f39aaf%40googlegroups.com
>>
>> <https://groups.google.com/d/msgid/jenkinsci-users/1d9e0343-bbce-474f-a4fe-7623a4f39aaf%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>
--
You received this message because you are subscribed to the Google Groups
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/jenkinsci-users/ec6ee4ea-0deb-45f4-ba64-b5ad4f33ff8a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.