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

Only one PipelineRun status reported to Bitbucket Cloud for push events (multiple PipelineRuns started)

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Undefined Undefined
    • None
    • None
    • Pipelines as Code
    • Pipelines Sprint CrookShank 44

      When triggering multiple PipelineRuns from a Bitbucket Cloud push event, Pipelines-as-Code (PAC) only reports a single build status back to Bitbucket Cloud, even though multiple PipelineRuns are created and executed. The Bitbucket UI shows only one “build” entry for the commit, and the last PipelineRun that reports status overwrites the previous one.

      This issue occurs only for push events. Pull request events do not have this limitation because PAC reports status as comments and uses the original PipelineRun name.

      Root Cause:
      The code responsible for reporting commit status to Bitbucket Cloud uses a static key derived from the PAC application name:

      https://github.com/openshift-pipelines/pipelines-as-code/blob/main/pkg/provider/bitbucketcloud/bitbucket.go#L112

      Relevant snippet:
      cso := &bitbucket.CommitStatusOptions

      { Key: v.pacInfo.ApplicationName, Url: detailsURL, State: statusopts.Conclusion, Description: statusopts.Title, }

      The key sent to Bitbucket Cloud is always the same value (ApplicationName from a ConfigMap) and does not depend on the actual PipelineRun name. Since Bitbucket Cloud identifies build statuses by this key, each PipelineRun overwrites the previous one.

      In contrast, the code path for pull request events uses statusopts.OriginalPipelineRunName, which is dynamic and correctly distinguishes multiple PipelineRuns.

      Expected Behavior:

      • Bitbucket Cloud should show a separate build status entry for every PipelineRun triggered by a push event.
      • PAC should provide a unique “key” per PipelineRun when reporting commit statuses for push events.
      • Multiple PipelineRuns must not overwrite each other’s statuses.

      Actual Behavior:

      • Only one build status appears in Bitbucket Cloud for a given commit.
      • Subsequent PipelineRuns overwrite the previous status.
      • Users cannot see individual PipelineRun results for push events.

      Impact:

      • In multi-Pipeline workflows (e.g., separate CI, security scan, lint, deploy pipelines), only the final reported status is visible.
      • Users cannot determine which PipelineRun succeeded or failed.
      • Bitbucket Cloud presentation of build results is misleading and incomplete.

      Request:
      Please update PAC to use a unique commit status key per PipelineRun (similar to PR event handling using OriginalPipelineRunName) so Bitbucket Cloud can display multiple build entries for a single commit.

              rh-ee-zashaikh Zaki Shaikh
              rh-ee-zashaikh Zaki Shaikh
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated: