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

Running a Docker Image in pre-receive

yasreeb July 11, 2022

Hi Team,

I would like to execute/run a Docker Image in pre-receive hook before pushing it to bitbucket repository. 


Is that possible?

 

Any sample code snipped would be appreciated here.


1 answer

0 votes
Mark C
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
July 14, 2022

Hi @yasreeb,

Welcome to the community.

Unfortunately, it is not possible to run Bitbucket Pipelines build in a pre-receive hook event.
This is because Bitbucket Cloud does not support server-side pre-receive hook at the moment.
We do have an existing feature request for it that can be located through this link. - https://jira.atlassian.com/browse/BCLOUD-10471
You can upvote and watch it for now so that you'll be notified of any updates from our team when the feature becomes available on Bitbucket Cloud.
Please do note that we don't have an exact ETA for the feature request as all new features will be implemented according to our policy here.

What you can do for now is to have a workflow where you can push your commits first in a feature branch and run Pipelines builds for that feature branch.
Once all your tests/validations are passed, you can then merge that feature branch to your main branch (or your preferred branch).

Do let me know if you have further questions.

Regards,
Mark C

Suggest an answer

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

Atlassian Community Events