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

Tag match filter shows more entries than direct command (git tag -l "$tagFilter")

    Details

    • Type: Improvement
    • Status: Resolved (View Workflow)
    • Priority: Minor
    • Resolution: Fixed
    • Component/s: git-parameter-plugin
    • Labels:
      None
    • Environment:
      OS: Ubuntu 16.04.5 LTS
      Jenkins version: 2.150.1
      Git parameter plugin: 0.9.6
      git command line version: 2.7.4
    • Similar Issues:

      Description

      The help documentation indicates that tag filtering should behave like:
           git tag -l "$tagFilter"

      However, we see different tag lists for the command line git filter versus the plugin filter.

      Example:

      • Git Command:      git tag -l "MTRS-MBP-*"
        • Returns (truncated):
          MTRS-MBP-v02.02.00.RRC05
      • Plugin Filter:         MTRS-MBP-*
        • Returns (truncated):
          MTRS-MBP-v02.02.00.RRC05
          release/MTRS-MBP-v00.03.01.int.1.0.0.2_armhf

      The plugin appears to behave as though "*MTRS-MBP-*" is implied.
      Yet, we have other entries, like "CDR_MTRS-MBP-v01.00.00_Demo", that the plugin does not show.

      The expectation here is that the behavior of the filter follows the stated 'git tag -l' behavior.

       

        Attachments

          Issue Links

            Activity

            Hide
            klimas7 Boguslaw Klimas added a comment - - edited

            Hi,

            I have a similar example for you:

            git ls-remote -t git@github.com:klimas7/Learn.git "v*" 
            fb76e1fcbc6af5396f044489e4167ba3c06bb675        refs/tags/release-tags/v1.0.0 
            dbac4ccfa19f03fc79587c0159ba553b37895a1b        refs/tags/release/v1.0.0 
            dbac4ccfa19f03fc79587c0159ba553b37895a1b        refs/tags/v1.0.0
            git ls-remote -t git@github.com:klimas7/Learn.git "refs/tags/v*"
            dbac4ccfa19f03fc79587c0159ba553b37895a1b        refs/tags/v1.0.0

            if you set plugin as that:

            you get

             

            Help was changed in release 0.9.10

            Show
            klimas7 Boguslaw Klimas added a comment - - edited Hi, I have a similar example for you: git ls-remote -t git@github.com:klimas7/Learn.git "v*" fb76e1fcbc6af5396f044489e4167ba3c06bb675        refs/tags/release-tags/v1.0.0 dbac4ccfa19f03fc79587c0159ba553b37895a1b        refs/tags/release/v1.0.0 dbac4ccfa19f03fc79587c0159ba553b37895a1b        refs/tags/v1.0.0 git ls-remote -t git@github.com:klimas7/Learn.git "refs/tags/v*" dbac4ccfa19f03fc79587c0159ba553b37895a1b refs/tags/v1.0.0 if you set plugin as that: you get   Help was changed in release 0.9.10
            Hide
            klimas7 Boguslaw Klimas added a comment -

            Release 0.9.10

            Show
            klimas7 Boguslaw Klimas added a comment - Release 0.9.10
            Hide
            kbowen Kevin Bowen added a comment - - edited

            I tried the updated plugin.

            Thank you for the adjustments and functional explanation.

            I fully realize that there are limitations to how the standard "git ls-remote -t" works.

            Your suggestion to prepend "refs/tags/" to the match helps with one of our job config cases.
            However, it does not help with our need for a "refs/tags/*-MBP-*" match in other cases.
            The wildcarding picks up the extra "release/" still.

            I believe that I saw another ticket/request for a regex style filter for the tags.
            Given my use case and other user cases, you may want to consider it as a future enhancement.

            Thank you again for the adjustments/update for this ticket.

             

            Show
            kbowen Kevin Bowen added a comment - - edited I tried the updated plugin. Thank you for the adjustments and functional explanation. I fully realize that there are limitations to how the standard "git ls-remote -t" works. Your suggestion to prepend "refs/tags/" to the match helps with one of our job config cases. However, it does not help with our need for a "refs/tags/*-MBP-*" match in other cases. The wildcarding picks up the extra "release/" still. I believe that I saw another ticket/request for a regex style filter for the tags. Given my use case and other user cases, you may want to consider it as a future enhancement. Thank you again for the adjustments/update for this ticket.  
            Hide
            mouzaffar_a mouz added a comment -

            After update plugin to 0.9.9, the field Filter is disabled when Quick Filter. is checked. Anyone have this problem ?

            Show
            mouzaffar_a mouz added a comment - After update plugin to 0.9.9, the field Filter is disabled when Quick Filter. is checked. Anyone have this problem ?
            Hide
            kbowen Kevin Bowen added a comment -

            We are running in production with the updated 0.9.10 version and have not noticed and problems.

            Show
            kbowen Kevin Bowen added a comment - We are running in production with the updated 0.9.10 version and have not noticed and problems.

              People

              • Assignee:
                klimas7 Boguslaw Klimas
                Reporter:
                kbowen Kevin Bowen
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: