How to use Prismics webhook to trigger a BitBucket pipeline?

Does anyone have any insights on using Prismics webhook to trigger a BitBucket pipeline? I have a pipeline set up in BitBucket that builds my gatsby site and deploys it to an S3 bucket but I need to trigger this pipeline when a change is made in Prismic.

I’ve scoured the internet and found this endpoint which triggers a BitBucket pipeline but I’ve only managed to get it to fire a post request using a curl command (which isn’t much use for Prismics webhook).

Do I need a service in between Prismic and Bitbucket that connects the two?

Any help would be massively appreciated.

Hi Rob,

Thank you for contributing in Prismic community.

Unfortunately Bitbucket Pipelines doesn’t support Build hooks in the same way other build tools does, it seems that they only have a Post + authentication endpoint that doesn’t work with most CMS as far as I know.

So to do that either you need to migrate to another build tool that support build hooks with a ‘build link’ or you build some sort of middle-where to connect Prismic to Pipelines.

Here is an article of some platforms that we recommend.

Please note that I will move this thread into dashboard / writing room category since it’s about webhooks.

Fares

Thanks Fares,

I thought that might be the case, good to confirm it.

I normally use Netlify to handle this side of things but my clients has their whole infrastructure setup on BitBucket and AWS so they want to keep it in this stack.

Decided to go down the Lambda route to handle the middle-where to connect the two together.

Thanks

1 Like