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

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,554,351
Community Members
 
Community Events
184
Community Groups

Webhook from AWS Codebuild to Bitbucket

As the title, I want to receive the results from AWS CodeBuild to Bitbucket Pipeline,

For example, I want to know some results of CodeBuild (success, failure) at Bitbucket 

Is there a way to do that?

1 answer

1 accepted

2 votes
Answer accepted
Patrik S
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
Mar 28, 2023

Hello @Eunbi LEE ,

Thank you for reaching out to the Community!

My understanding is that you use AWSCodeBuild to build your code hosted in Bitbucket Cloud, and you would like the build status on AWS to be reported back into Bitbucket. If that is the case, AWS has the below article with steps on how to build that integration : 

This should allow you to have the AWS build status posted back to Bitbucket Cloud

Thank you, @Eunbi LEE !
Patrik S

Thank you for answer,

 

And yes, I already read this article but furthermore, I want to send build status of AWS Codebuild not CodePipeline to Bitbucket,

Is there a way with REST API ?

 

Thank you @Patrik S 

Eunbi LEE

Patrik S
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
Apr 04, 2023

Hello @Eunbi LEE ,

To create/update the build status for a commit, you can use the following Bitbucket API endpoints : 

curl -X POST -u username:app_password https://api.bitbucket.org/2.0/repositories/my-workspace/my-repo/commit/e10dae226959c2194f2b07b077c07762d93821cf/statuses/build/ -H 'Content-Type: application/json' -d '{ "key": "MY-BUILD", "state": "SUCCESSFUL", "description": "42 tests passed", "url": "https://www.example.org/my-build-result" }'

The valid values for state are FAILED, SUCCESSFUL, INPROGRESS, STOPPED.

curl -X PUT -u username:app_password https://api.bitbucket.org/2.0/repositories/my-workspace/my-repo/commit/e10dae226959c2194f2b07b077c07762d93821cf/statuses/build/{key} -H 'Content-Type: application/json' -d '{"state": "FAILED", "description": "10 tests failed", "url": "https://www.example.org/my-build-result" }'

You can find more details about the build status endpoints in our API reference documentation : 

Thank you, @Eunbi LEE !

Patrik S

It works :) Thank you so much ! @Patrik S 

Like Patrik S likes this
Patrik S
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
Apr 20, 2023

You're very welcome!

Feel free to reach out to Community again if you ever need help in the future :) 

Like Eunbi LEE likes this

Suggest an answer

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

Atlassian Community Events