Bitbucket Pipeline not found even it is exists in main branch.
Asked by thanhle97:

Hi Community,

Hope you guys are doing well :).

I have created a bitbucket-pipelines.yml file and merged it to the main branch of our repository, however the pipeline setting can not detect my yml pipeline and keep require create a new pipeline from the template sample.

Is there any body also counter this problem and figured out the solution for this?

I would be grateful for any tips or helps over here.


Answers:
author: Theodora Boudale
body: Hi [@thanhle97](/t5/user/viewprofilepage/user-id/5152290) and welcome to the community!

If I understand correctly, the bitbucket-pipelines.yml file was initially created in a branch other than the main one?

Can you please try the following steps:

* Open this repository on Bitbucket Cloud website
* Select **Repository settings** (from the left sidebar)
* On the new sidebar that opens, look for the PIPELINES section and **Settings** on that section and select that option
* On the new page that opens, select **Enable Pipelines**
* Afterwards, go back and select the Pipelines page of the repo again, you should see the following page that you can use to run the initial pipeline:

![Screenshot 2023-02-22 at 11.43.52.png](https://community.atlassian.com/t5/image/serverpage/image-id/241658i9C7D933643B58227/image-size/large?v=v2&px=999 "Screenshot 2023-02-22 at 11.43.52.png")Please feel free to let me know how it goes and if you have any questions!

Kind regards,  
Theodora

comments: author: thanhle97
body: Hi [@Theodora Boudale](/t5/user/viewprofilepage/user-id/818086) ,

Thank you very much for the details in solution. I have following and resolve the issue. Also, the pipeline not triggered due to I was missing indent in my YAML file.


author: Stephen Breakey
body: This isnt working for me.

I've toggled the setting multiple times to no avail.

If i go to a specific commit and click run pipeline there, a popup appears with nothing in the drowdown, so i click "see configurations" which links to:

<https://bitbucket.org/REDACTED/src/COMMIT_REF/bitbucket-pipelines.yml>

but this shows an error. The file is definitely present at the linked commit ref.


author: Theodora Boudale
body: Hi [@Stephen Breakey](/t5/user/viewprofilepage/user-id/5200252) ,

I would like to ask if you could please create a new question via <https://community.atlassian.com/t5/forums/postpage/board-id/bitbucket-questions> and we will look into your issue.

It's best to have a separate question for an issue you would like us to troubleshoot, especially when the root cause seems to be different, as a question can become convoluted and difficult to follow if we try to troubleshoot multiple users' issues.

When you create a new question, please provide screenshots of any errors and also the content of your bitbucket-pipelines.yml file. If you don't feel comfortable sharing this here, you can also create a ticket with the support team, which will be visible only to you and Atlassian staff. 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.

Kind regards,  
Theodora


author: Vincent Maugein
body: If someone's arrives here and is still blocked:  

Check there is no space at the beginning of the *bitbucket-pipelines.yml* filename.  

Easy to check in the url:

<https://bitbucket.org/org/repo/src/master/>**%20** bitbucket-pipelines.yml  

Just in case...


author: Vincent Maugein
body: If someone's arrives here and is still blocked:  

Check there is no space at the beginning of the *bitbucket-pipelines.yml* filename.  

Easy to check in the url:

<https://bitbucket.org/org/repo/src/master/>**%20** bitbucket-pipelines.yml  

Just in case...


author: Mark Teese
body: How difficult would it be for Atlassian to provide a more useful message in the bitbucket pipeline? Right now, a user:

* commits a bitbucket-pipelines.yml
* opens the pull-request and looks too see if the pipeline has run
* sees a message "It looks like you haven't configured a build tool yet. You can use Bitbucket Pipelines to build, test and deploy your code. Your existing plan already includes build minutes. Set up a pipeline"
* clicks on "Set up a pipeline"
* and then is very confused, because this offers a series of bitbucket-pipelines.yml templates, which the user has already committed.  

Here's an alternative logic:  
IF branch contains a bitbucket-pipelines.yml, and **Enable Pipelines** is FALSE, show message "It looks like you haven't enabled pipelines in your repository. To enable, go to repository settings, PIPELINES section, Settings, and **Enable Pipelines**"


author: Theodora Boudale
body: Hi Mark,

Thank you for the feedback. I understand that this behavior can be confusing to users.

I went ahead and created a request to improve it here:

* <https://jira.atlassian.com/browse/BCLOUD-23278>

Kind regards,  
Theodora


Tags: bitbucket-cloud

bitbucket-pipelines

cloud