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

    • Type: Bug
    • Status: Resolved (View Workflow)
    • Priority: Major
    • Resolution: Not A Defect
    • Component/s: pipeline
    • Labels:
      None
    • Environment:
       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
    • Similar Issues:

      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

            Hide
            oleg_nenashev Oleg Nenashev added a comment -

            Seems to be a duplicate

            Show
            oleg_nenashev Oleg Nenashev added a comment - Seems to be a duplicate
            Hide
            jglick Jesse Glick added a comment -
            Show
            jglick Jesse Glick added a comment - example
            Hide
            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']]]

            Show
            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'] ]]
            Hide
            vektory79 Victor Verbitsky added a comment -

            Thank you. It's really helped me.

            Show
            vektory79 Victor Verbitsky added a comment - Thank you. It's really helped me.
            Hide
            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.

            Show
            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.
            Hide
            jglick Jesse Glick added a comment -

            Update your plugins.

            Show
            jglick Jesse Glick added a comment - Update your plugins.

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved: