You're on your way to the next level! Join the Kudos program to earn points and save your progress.
Level 1: Seed
25 / 150 points
Next: Root
1 badge earned
Challenges come and go, but your rewards stay with you. Do more to earn more!
What goes around comes around! Share the love by gifting kudos to your peers.
Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!
Join now to unlock these features and more
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.
Hi @chekju and welcome to the community!
import: harmony-helm-chart:kube-linter:share-pipeline-lint
Kind regards,
Theodora
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"
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.