amplify-hosting icon indicating copy to clipboard operation
amplify-hosting copied to clipboard

Provide build and deploy status for BitBucket repos

Open ankhuve opened this issue 5 years ago • 15 comments

Essentially a copy of this issue for GitHub repos, but for BitBucket.

Is your feature request related to a problem? Please describe. I guess I could manually call the BitBucket endpoint to update the status in my build script, but I feel like this should be integrated by default when connecting a BitBucket repository to the Amplify Console.

Describe the solution you'd like Automatic build status updates to my repository when my builds/deploys are carried out.

Additional context https://developer.atlassian.com/server/bitbucket/how-tos/updating-build-status-for-commits/

Thanks for a great tool so far!

ankhuve avatar Apr 22 '20 12:04 ankhuve

Hi @ankhuve.

Thanks for reporting. We currently don't send build updates back to our source providers.We have added this as a feature request in our backlog.

abhi7cr avatar Apr 23 '20 20:04 abhi7cr

Hi @ankhuve.

Thanks for reporting. We currently don't send build updates back to our source providers.We have added this as a feature request in our backlog.

Thanks for your reply @abhi7cr !

I have another question then, perhaps you can help me answer it. I'm now currently trying to report the build statuses to BitBucket using their API, but I can't find a way to report failed builds when they happen as it seems Amplify terminates the whole build if something goes wrong.

Is there some way to catch a failed build and run commands? Something like a "onError" stage would be useful!

ankhuve avatar Apr 24 '20 07:04 ankhuve

@ankhuve Sorry missed this! We currently don't have an onError hook. I will add this as a separate item in our backlog.

abhi7cr avatar Apr 29 '20 17:04 abhi7cr

@ankhuve Sorry missed this! We currently don't have an onError hook. I will add this as a separate item in our backlog.

Great, thanks! Looking forward to it as our failed builds now still show as ongoing in BitBucket :slightly_smiling_face:

ankhuve avatar May 05 '20 15:05 ankhuve

I’d also like to see this feature. In the mean-time, I’ve come up with the below workaround.

  1. Replace build/test command with custom Node script
  2. Inside the custom script, execute the build/test command as a child process (child_process.exec)
  3. In the exec callback, check for the presence of an error and update BitBucket accordingly using their API
  4. Exit the process using the code from the error, or 0 if no error occurred

tgwilkins avatar Jun 20 '20 08:06 tgwilkins

@tgwilkins Any example code you're comfortable sharing?

davad avatar Feb 12 '21 16:02 davad

@tgwilkins Any example code you're comfortable sharing?

@davad I wrote a blog post on it as it happens: Notifying BitBucket of your Amplify Build Status

tgwilkins avatar Feb 12 '21 16:02 tgwilkins

@tgwilkins Any example code you're comfortable sharing?

@davad I wrote a blog post on it as it happens: Notifying BitBucket of your Amplify Build Status

Dead end. @tgwilkins can you please update blog url?

waqasdilawar avatar Aug 24 '21 06:08 waqasdilawar

@tgwilkins Any example code you're comfortable sharing?

@davad I wrote a blog post on it as it happens: Notifying BitBucket of your Amplify Build Status

Dead end. @tgwilkins can you please update blog url?

Thanks for letting me know, looks like my DNS got wiped! It should be back up now.

tgwilkins avatar Aug 24 '21 08:08 tgwilkins

Do we have any update on this?

waqasdilawar avatar Aug 26 '21 11:08 waqasdilawar

Any updates on this? @abhi7cr

sefasenturk95 avatar Apr 14 '22 11:04 sefasenturk95

Any updates?

Jammyo avatar Jul 21 '22 11:07 Jammyo

Still no updates?

kuladeeparun avatar Feb 21 '23 10:02 kuladeeparun

Hi, it's been a few years, any update on this?

straygar avatar Oct 18 '23 11:10 straygar