Uploaded image for project: 'OpenShift Pipelines'
  1. OpenShift Pipelines
  2. SRVKP-7468

Add new dynamic variable git tag in PAC

XMLWordPrintable

    • stub-KONFLUX-7807
    • 1
    • False
    • Hide

      None

      Show
      None
    • False
    • To Do
    • KONFLUX-7807 - Add git tag as a separate dynamic variable
    • On tag push events, a new dynamic variable git_tag is now available in PaC. This variable reflects the git tag value. For example, if tag v1.0 is pushed to a git repository, the git_tag variable will hold the value v1.0
    • Feature
    • Done
    • Pipelines Sprint Crookshank 27

      Currently, when a tag is pushed to a Git provider, it is handled as a "push" event by Pipelines as Code (PaC). If users want to access the tag value (e.g., v1.0.1) in their PipelineRun, they must extract it from the event payload using {}{{ body.ref }}{}. However, this field includes the full Git reference path — for example: refs/tags/v1.0.1

       

      What needs to done

      When a tag is pushed, PaC should expose the tag value directly — without the full refs/tags/ prefix — through a separate dynamic variable. This would simplify usage in templates and avoid the need for custom parsing.

      For example: 

      params:
        image: myregistry/myapp:{{ git_tag }}

              rh-ee-zashaikh Zaki Shaikh
              rhtap-jira-bot RHTAP Jira Bot
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: