Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

BitBucket (self hosted) Pipeline / Post-Receive-Hook / Continous Integration - How To

Marc Mantei
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
July 21, 2020

Dear Atlassians,

we build up a inhouse vfx pipeline.

we have several machines with software packages loading startup scripts from a network folder. Now we want to use bitbucket for managing and tracking the development of those scripts.

my wish is the continous approach, that all changes in the repos, update as files on the network folder (best would be with subfolders with version from the tags).

So far i found in the bitbucket / admin / storage section a  -non-editable path.

So my question is:

Can anyone please help me out with the first steps in generating a working post-receive hook?

What is the best practive and reliable solution? 

thanks for your help!

regards,
x

1 answer

0 votes
Kristy
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
August 2, 2020

Hi @Marc Mantei ,

 

There are two options for you: Using a webhook and using a post-receive hook.

If you would like your solution to be a microservice managed by you, then a webhook is the way to go. All you have to do is expose an endpoint for the webhook to trigger on push, and enable the Webhook in the Bitbucket Server repository. Bitbucket Server will then send your microservice a notification to that endpoint after every push (or whatever event you want the webhook to trigger on). See this page for more details.

If you want your solution to be a custom plugin within Bitbucket Server, you can do that too, and that would be using the post-receive hook that you were referring to. To do this you would need to implement a Java Plugin, and then implement a custom hook. Some details on how to do that can be found here:

 

In terms of which is more practical and reliable - both are fine. It really just depends on how you want to implement your solution (self-managed microservice or plugin installed in Bitbucket Server)

 

Hope that helps! Let us know if you have any more questions. 

 

Regards,

Kristy

Developer on Bitbucket Server

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events