Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Celebration

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

Bitbucket Pipeline Shared Configuration not running on dependent repository

Hello community.

I am new to Bitbucket Pipeline Shared Configuration .

https://support.atlassian.com/bitbucket-cloud/docs/share-pipelines-configurations/

I have two repos in the same Bitbucket Repository workspace project.

repo1 named : harmony-helm-chart, has the bitbicket-pipeline.yml. The repo built successfully.

"
export: true

image: stackrox/kube-linter:main-alpine

definitions:
pipelines:
share-pipeline-lint: &share-pipeline-lint
- step:
name: Kube-Linter Lint
script:
- /kube-linter lint . --config ci/kube-linter-config.yaml


pipelines:
custom:
manifest-share-pipeline: *share-pipeline-lint


"

the second repo2 is referencing the "share-pipeline-lint"

as in

""
pipelines:
custom:
import-pipeline:
import: harmony-helm-chart:kube-linter:share-pipeline-lint
""

 

repo2 is referencing harmony-helm-chart but not building.

I had been debugging the failed pipeline. Could need some help.

1 answer

0 votes
Theodora Boudale
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
Oct 04, 2023

Hi @chekju and welcome to the community!

  • What error do you see when you try to run a build on repo2?

  • Do these repos belong to a workspace on the Premium plan?

  • In the yml file of repo2, I see
    import: harmony-helm-chart:kube-linter:share-pipeline-lint

    Does the branch kube-linter exist in the repo harmony-helm-chart? If so, is there a definition for share-pipeline-lint in the yml file of this branch?

Kind regards,
Theodora


Hi @Theodora Boudale 

Thanks for the response

The error on repo2 is this this, Repo2 is not building at all, I have this Bitbucket-pipeline.yml inside the repo as in

""
pipelines:
custom:
import-pipeline:
import: harmony-helm-chart:kube-linter:share-pipeline-lint

""

but the pipeline does not build.

I am on a Premium plan and both repo1 and repo2 are in the same workspace.


For the repo1 named : harmony-helm-chart, kube-linter does exist and there is definition in the yml file as seen in the yml file


""
export: true

image: stackrox/kube-linter:main-alpine

definitions:
pipelines:
share-pipeline-lint: &share-pipeline-lint
- step:
name: Kube-Linter Lint
script:
- /kube-linter lint . --config ci/kube-linter-config.yaml

pipelines:
custom:
manifest-share-pipeline: *share-pipeline-lint


""

in line 5  there is a defined definition called "share-pipeline-lint"

Theodora Boudale
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
Oct 04, 2023

Hi @chekju,

It is not clear from your reply if the definition exists in the branch named kube-linter in repo1. The yml file may have different versions across different branches.

If you open the Source page of repo1 in Bitbucket Cloud, there is a dropdown to switch branches right above the file list. Click on that dropdown, select the branch kube-linter, and then inspect the yml file in that branch. Is the definition there?

 

Is Pipelines enabled in repo2? You can check that from Repository settings > section PIPELINES, Settings.

 

If the answer to the questions I asked is yes, I would suggest creating a ticket with the support team and sharing the URL of the two repos, so we can check your config and investigate.

You can create a ticket via https://support.atlassian.com/contact/#/, in "What can we help you with?" select "Technical issues and bugs" and then Bitbucket Cloud as product. When you are asked to provide the workspace URL, please make sure you enter the URL of the workspace that is on the premium plan to proceed with ticket creation.

Please feel free to let me know if you have any questions.

Kind regards,
Theodora

Hi @Theodora Boudale how do I set up definition  in the branch named kube-linter in repo1.

Pipelines is enabled in repo2 from the Repository settings > section PIPELINES, Settings, but I do need help in setting up definition n the branch named kube-linter

Theodora Boudale
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
Oct 06, 2023

Hi @chekju,

If you don't have a branch named kube-linter in repo1 already, it is not necessary to set it up.

You will just need to change the definition in repo2, and replace kube-linter with the name of the branch in repo1 where the yml definition exists.

For example, if the shared pipeline is defined in repo1, in the yml file of master branch, then in repo2 you define the pipeline as follows:

pipelines:
custom:
import-pipeline:
import: harmony-helm-chart:master:share-pipeline-lint

The part after harmony-helm-chart should be the name of the branch in harmony-helm-chart repo, that has the yml with the exported pipeline.

Otherwise, if there is a branch named kube-linter in repo1, you simply edit the yml file in that branch and add the definition that exports the pipeline.

Does this help?

Kind regards,
Theodora

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PERMISSIONS LEVEL
Site Admin
TAGS
AUG Leaders

Atlassian Community Events