How to block write in bitbucket-pipeline.yml file

Rafael Pereira Silva October 26, 2022

Hello there, 

 

In my stack i have a lot of repositories and teams, so i have a template pipeline that and

we want everyone in the company to use this same template passing only parameters. 

So, what would be the best approach in this case?

  • I would have a bitbucket-pipeline.yml (default) and in it I would have all the steps differentiating only the arguments?
  • Or is it possible to include another .yml from another repository?
  • It is possible to block anyone from writing to the bitbucket-pipeline.yml file

 

thanks.

 

1 answer

0 votes
Theodora Boudale
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
October 28, 2022

Hi Rafael and welcome to the community!

 

  • I would have a bitbucket-pipeline.yml (default) and in it I would have all the steps differentiating only the arguments?
  • Or is it possible to include another .yml from another repository?

At the moment, it is not possible to share the same bitbucket-pipeline.yml among multiple repsoitories, each repository uses its own bitbucket-pipeline.yml file. You can of course create the same bitbucket-pipeline.yml file for each repo, but there is no way to enforce all repos of a workspace to use the same template.

We have a feature request in our issue tracker for the ability to have centrally managed and customizable templates for the bitbucket-pipeline.yml file:

 

  • It is possible to block anyone from writing to the bitbucket-pipeline.yml file

I'm afraid this is not possible either. In case you'd be interested in that in order to have more control over deployments or who can access certain variables, one solution could be deployment permissions (deployments can be restricted to admins only) and the use of deployment variables https://bitbucket.org/blog/deployment-permissions-now-available-in-bitbucket-pipelines. Please note that this feature is available for the Premium plan.

We have a feature request for what you are asking as well:

If the reason you're asking for this feature is different, you can share it in the feature request for our product managers to take into account.

I would also suggest adding your vote (by selecting the Vote for this issue link) to both feature requests to further express your interest. You can also add yourself as a watcher (by selecting the Start watching this issue link) if you'd like to get notified via email on updates.

 

If you have any questions, please feel free to let me know.

 

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