Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-34738

Discarding of the old builds don't performed in multibranch pipeline with Mercurial SCM

    XMLWordPrintable

Details

    • Bug
    • Status: Resolved (View Workflow)
    • Major
    • Resolution: Not A Defect
    • pipeline
    • None
    •  CentOS 7 Server
      Jenkins 2.2 from standard Docker image
      latest versions of plugins:
      - pipeline plugin 2.1
      - pipeline multibranch plugin 2.3
      - Mercurial plugin 1.54

    Description

      I created multibranch pipeline with Mercurial SCM. But after the creation, configuration "Discard old builds" in the subtasks are not setted up. As a result, the discarding don't performed.

      Attachments

        Issue Links

          Activity

            oleg_nenashev Oleg Nenashev added a comment -

            Seems to be a duplicate

            oleg_nenashev Oleg Nenashev added a comment - Seems to be a duplicate
            jglick Jesse Glick added a comment - example

            You simply need to add to your pipline somthing like:
            properties [[$class: 'BuildDiscarderProperty', strategy: [$class: 'LogRotator', artifactDaysToKeepStr: '20', artifactNumToKeepStr: '30', daysToKeepStr: '20', numToKeepStr: '30']]]

            rpaasche Robert Paasche added a comment - You simply need to add to your pipline somthing like: properties [[$class: 'BuildDiscarderProperty', strategy: [$class: 'LogRotator', artifactDaysToKeepStr: '20', artifactNumToKeepStr: '30', daysToKeepStr: '20', numToKeepStr: '30'] ]]

            Thank you. It's really helped me.

            vektory79 Victor Verbitsky added a comment - Thank you. It's really helped me.

            I had to use the syntax:

            properties([[...]])

            as explained here: http://stackoverflow.com/a/35471196/768100 to get this to work.

            kalahari Blake MItchell added a comment - I had to use the syntax: properties([[...]]) as explained here: http://stackoverflow.com/a/35471196/768100 to get this to work.
            jglick Jesse Glick added a comment -

            Update your plugins.

            jglick Jesse Glick added a comment - Update your plugins.

            People

              jglick Jesse Glick
              vektory79 Victor Verbitsky
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: