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

Failing to setup Pipeline creation via pipeline_config api

Pallav Kumar February 16, 2024

I am trying to automate pipeline creation for a given repo via api :

https://api.bitbucket.org/2.0/repositories/{workspace}/{repo_slug}/pipelines_config

but even though I am getting success response, I not seeing bitbucket-pipeline.yml file getting created for my repo. 

Is there anything I am missing or my understanding of this api is wrong ?

1 answer

1 vote
Theodora Boudale
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
February 19, 2024

Hi @Pallav Kumar,

If you use this API call with data

{
"enabled": true
}

you can enable Pipelines for the repository. However, the API call is not going to create a bitbucket-pipeline.yml file.

If you have a bitbucket-pipeline.yml file that you want to upload to a repo after you enable Pipelines, you can use the following API endpoint:

This API endpoint will create a commit to the repo by uploading a certain file.

Please feel free to reach out if you have any questions!

Kind regards,
Theodora

Pallav Kumar February 19, 2024

Thanks @Theodora Boudale . I will check and come back if needed.

Theodora Boudale
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
February 20, 2024

You are very welcome! Please feel free to let me know if you need any further help on this.

Suggest an answer

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

Atlassian Community Events