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

Add hashtags support in Jenkins building parameters

    • Icon: New Feature New Feature
    • Resolution: Unresolved
    • Icon: Minor Minor
    • gerrit-trigger-plugin
    • None

      As we know, after triggering by Gerrit, there are built-in parameters available in Jenkins building, like GERRIT_PROJECT,

      GERRIT_TOPIC, GERRIT_REFSPEC. We hope the hashtags of Gerrit can also be set in building environment, e.g. GERRIT_HASHTAGS

          [JENKINS-55342] Add hashtags support in Jenkins building parameters

          Kane Gong created issue -
          Kane Gong made changes -
          Description New: As we know, after triggering by Gerrit, there are built-in parameters available in building environment, like GERRIT_PROJECT,

          GERRIT_TOPIC, GERRIT_REFSPEC. We hope the hashtags of Gerrit can also be set in building environment, e.g. GERRIT_HASHTAGS
          Kane Gong made changes -
          Summary Original: Add hashtag support in Jenkins build environment variable like GERRIT_TOPIC New: Add hashtags support in Jenkins building parameters
          Kane Gong made changes -
          Description Original: As we know, after triggering by Gerrit, there are built-in parameters available in building environment, like GERRIT_PROJECT,

          GERRIT_TOPIC, GERRIT_REFSPEC. We hope the hashtags of Gerrit can also be set in building environment, e.g. GERRIT_HASHTAGS
          New: As we know, after triggering by Gerrit, there are built-in parameters available in Jenkins building, like GERRIT_PROJECT,

          GERRIT_TOPIC, GERRIT_REFSPEC. We hope the hashtags of Gerrit can also be set in building environment, e.g. GERRIT_HASHTAGS

          Joe Hansche added a comment -

          Would be great to also allow a change to be triggered via hashtags.  For example, if we push with HEAD:refs/for/branch%t=trivial, that can be a signal that it doesn't need to trigger a build.  It could then work just like the Topic filter.

          Joe Hansche added a comment - Would be great to also allow a change to be triggered via hashtags.  For example, if we push with HEAD:refs/for/branch%t=trivial , that can be a signal that it doesn't need to trigger a build.  It could then work just like the Topic filter.

          Stone Lee added a comment -

          Hi rsandell ,

          I think we also need this feature to support hashtag in building environment and also have a hashtag filter.

           

          Would you like me to create a PR about hashtags support?

          It need uplift gerrit events to 2.20.0 or higher.

          This feature would including:

          1. Support hashtags in gerrit parameters, for example GERRIT_HASHTAGS for hashtags of current change patchset, GERRIT_ADDED_HASHTAGS/GERRIT_REMOVED_HASHTAGS for hashtag changed event.
          2. Support filter gerrit event with hashtags, only gerrit events match hashtag pattern would trigger jobs.
          3. Support hashtags changed event in gerrit trigger. match added or removed hashtags with regex.

          Stone Lee added a comment - Hi rsandell , I think we also need this feature to support hashtag in building environment and also have a hashtag filter.   Would you like me to create a PR about hashtags support? It need uplift gerrit events to 2.20.0 or higher. This feature would including: Support hashtags in gerrit parameters, for example GERRIT_HASHTAGS for hashtags of current change patchset, GERRIT_ADDED_HASHTAGS/GERRIT_REMOVED_HASHTAGS for hashtag changed event. Support filter gerrit event with hashtags, only gerrit events match hashtag pattern would trigger jobs. Support hashtags changed event in gerrit trigger. match added or removed hashtags with regex.

          Stone Lee added a comment -

          Hi,

          The Hashtag support has been merged in commit https://github.com/jenkinsci/gerrit-trigger-plugin/commit/eccef61910b524a3c34225a44a5323248b5bece3.

          I think this ticket could be closed.

          Stone Lee added a comment - Hi, The Hashtag support has been merged in commit https://github.com/jenkinsci/gerrit-trigger-plugin/commit/eccef61910b524a3c34225a44a5323248b5bece3. I think this ticket could be closed.
          Basil Crow made changes -
          Link New: This issue causes JENKINS-75328 [ JENKINS-75328 ]

          Basil Crow added a comment -

          Causes JENKINS-75328.

          Basil Crow added a comment - Causes JENKINS-75328 .

            rsandell rsandell
            kaneg Kane Gong
            Votes:
            6 Vote for this issue
            Watchers:
            8 Start watching this issue

              Created:
              Updated: