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

Multibranch pipeline still showing Git tags older than configured threshold

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      I've got some Multibranch pipeline jobs configured to use a Git repository, together with "Build strategies" -> "Any Strategies Match" -> "Any of" -> "Tags" -> "Ignore tags older than" -> 7. But when looking at the "Tags" tab of those jobs, they still show (subjobs for) tags that are way older than 7 days.

      Configuring the same for branches works just fine.

        Attachments

          Activity

          Hide
          markewaite Mark Waite added a comment -

          I reassigned this to the basic branch build strategies plugin because it provides this capability and describes it in the user documentation.

          Show
          markewaite Mark Waite added a comment - I reassigned this to the basic branch build strategies plugin because it provides this capability and describes it in the user documentation .
          Hide
          humblebroski Austin Orth added a comment -

          I just experienced this issue with child scans of multibranch pipelines in a GitHub organization folder. I had child scans set to run weekly, if not run otherwise, and when run, the scans picked up all tags, regardless of date, causing Jenkins to be flooded with hundreds of builds. Later today, I am going to try an organization scan to see if the issue occurs when scanning at that level, as well as tweaking the number of days of tags to keep.

          I've attached a screenshot with my current settings, so hopefully this helpful for whoever decides to take this on. I will also take a look at the code this afternoon, but it's been a while since I've worked with Java, so I don't know how much I'll be able to help. Thanks in advance!

          cc: rsandell, Liam Newman

          Show
          humblebroski Austin Orth added a comment - I just experienced this issue with child scans of multibranch pipelines in a GitHub organization folder. I had child scans set to run weekly, if not run otherwise, and when run, the scans picked up all tags, regardless of date, causing Jenkins to be flooded with hundreds of builds. Later today, I am going to try an organization scan to see if the issue occurs when scanning at that level, as well as tweaking the number of days of tags to keep. I've attached a screenshot with my current settings, so hopefully this helpful for whoever decides to take this on. I will also take a look at the code this afternoon, but it's been a while since I've worked with Java, so I don't know how much I'll be able to help. Thanks in advance! cc: rsandell , Liam Newman
          Hide
          dhs Dirk Heinrichs added a comment -

          BTW: There's also no log retention setting in the generated sub jobs, which results in long living branches, like master, keeping their history forever.

          Show
          dhs Dirk Heinrichs added a comment - BTW: There's also no log retention setting in the generated sub jobs, which results in long living branches, like master , keeping their history forever.
          Hide
          duemir Denys Digtiar added a comment -

          As far as I understand, this works as expected. A Build Strategy is responsible for the decision whether to build a newly discovered Tag Pipeline or not. The default strategy is not to build. The "Tags" build strategy changes the default to build but can be configured to ignore old or new tags.

          For the tags not to be discovered or to be skipped in the first place the "Discover Tags" behavior of the Github Branch Source plugin needs to be extended or an extra plugin developed that adds a tag filter behavior.

          Show
          duemir Denys Digtiar added a comment - As far as I understand, this works as expected. A Build Strategy is responsible for the decision whether to build a newly discovered Tag Pipeline or not. The default strategy is not to build. The "Tags" build strategy changes the default to build but can be configured to ignore old or new tags. For the tags not to be discovered or to be skipped in the first place the "Discover Tags" behavior of the Github Branch Source plugin needs to be extended or an extra plugin developed that adds a tag filter behavior.
          Hide
          dhs Dirk Heinrichs added a comment -

          OK, maybe I need to clarify further. I'm referring to tags that have actually been built. As opposed to branches, tags will most likely not go away again, so a multibranch pipeline collects subjobs for all the tags it has ever built. My request is that jobs for those tags that would now be ignored because of their age be removed again.

          Show
          dhs Dirk Heinrichs added a comment - OK, maybe I need to clarify further. I'm referring to tags that have actually been built. As opposed to branches, tags will most likely not go away again, so a multibranch pipeline collects subjobs for all the tags it has ever built. My request is that jobs for those tags that would now be ignored because of their age be removed again.

            People

            Assignee:
            Unassigned Unassigned
            Reporter:
            dhs Dirk Heinrichs
            Votes:
            1 Vote for this issue
            Watchers:
            6 Start watching this issue

              Dates

              Created:
              Updated: