tektoncd / tektoncd/pipelines-as-code

Bitbucket Data Center: Support required builds

Open
#2,936 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Go
Stars
214
Forks
144
Avg merge
2d 11h
Merged PRs (30d)
27

Description

Feature request

Bitbucket Data Center required builds currently rely on build statuses reported back to Bitbucket (https://confluence.atlassian.com/bitbucketserver/checks-for-merging-pull-requests-776640039.html).
However, Bitbucket Data Center supports grouping multiple build statuses under a common parent build through the parent field. This allows several individual jobs, tasks, or pipeline executions to be aggregated into a single required build.

Pipeline as Code currently does not provide a way to define this parent build when reporting status back to Bitbucket Data Center. As a result, each PipelineRun or TaskRun appears as an independent build status, making it difficult to represent a logical build composed of multiple PipelineRuns.

We propose adding support for configuring the Bitbucket/Stash build status parent via a new annotation on either PipelineRun and/or TaskRun. Pipeline as Code would use this annotation when creating build status updates, allowing related runs to be grouped under the same required build in Bitbucket Data Center.

This feature depends on support being added to the underlying go-scm Bitbucket/Stash implementation:

https://github.com/jenkins-x/go-scm/issues/540

Example annotation in pipelinerun/taskrun:

  annotations:
    pipelinesascode.tekton.dev/bitbucket-parent-build: "container-image-build"

All PipelineRuns using the same parent value would then be grouped together under the corresponding required build in Bitbucket Data Center.

Use case

Our CI/CD workflows are split across multiple independent PipelineRuns. For example:

  • PipelineRun A builds and publishes a base container image.
  • PipelineRun B may execute security scans, compliance checks, or validation tests.

From a Bitbucket Data Center perspective, these executions are part of a single logical validation process and should be represented as one required build. Today, each PipelineRun creates an independent build status. However, Pipeline as Code does not currently expose the Bitbucket Data Center parent build status field, which is required to integrate with Bitbucket's required builds functionality. As a result, users cannot configure Pipeline as Code statuses as required builds, either for a single PipelineRun or for a logical workflow composed of multiple PipelineRuns.

Notes

I am willing to implement this feature and submit a pull request. Guidance from the maintainers on the preferred annotation name, supported resources (PipelineRun, TaskRun, or both), and overall design approach would be appreciated.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing the linked go-scm Bitbucket/Stash issue and the Pipeline as Code path that creates Bitbucket build status updates. Clarify the preferred annotation name and whether PipelineRun, TaskRun, or both should be supported with maintainers. Done means related runs use the configured parent build while existing status reporting remains unaffected.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
ci-cd, devops
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.