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

Discover only recent tags

XMLWordPrintable

      gitlab branch source plugin defines multibranch jobs by branch-like entities from GitLab, including git tags.  It implements several discovery configurations to constrain what is discovered, what is instantiated as a pipeline.

      However git tags are different from branches and merge requests, in that you typically do not close/delete/cleanup.  Tags are typically treated as permanent.  Therefore if you define a multibranch job for tags, they will continue to accumulate more and more over time, affecting usability.  There are constraints by name and wildcard, but those would need to be continually updated to keep up with ever increasing tags.  We need to be able to constrain which tag discoverability by recentness.

      Please add an enhancement to discover only the most recent tags, so a multibranch job only instantiates a manageable number of recent the most relevant pipelines.

      Use case - release tags

      As an agile development organization who patches forward, we create releases potentially every week or every sprint.  For each release, we create a release tag in git.  I created a multi-branch pipeline for deploys and used tag discovery to deploy releases.  However some projects have hundreds of tags, which means they have hundreds of release pipelines, making the current one difficult to find.  Git Tags are permanent: never cleaned up, so will continue to accumulate more and more.  We patch forward but may revert to a recent release in an emergency.  We will never revert to an older release so only care about the last few release tags.  

      I need to define a multibranch job for release deploys, such that it discovers, for example, the most recent 5 tags matching a wildcard or regular expression, like /^v\d+\.\d+\.\d+$/


      JENKINS-64810 may be related but misfiled.  The description seems similar to what I wrote here, but it's submitted as a Build Strategy which does not seem like the right place.  That feature is to constrain automatic builds by recentness, but we should also only discover tags by recentness. 

            baymac Parichay Barpanda
            wgc1929 Daniel
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: