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

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

datadog send event


I need some guide implementing the bitbucket data send event. From the documentation it should be added to the script part, but I have few questions. From the implementation these are the properties:

ITLE: '<string>'
    # TEXT: '<string>' # Optional.
    # PRIORITY: '<string>' # Optional.
    # ALERT_TYPE: '<string>' # Optional.
    # TAGS: '<string>' # Optional.
    # DEBUG: '<boolean>' # Optional.
    # EU_ENDPOINT: '<boolean>' # Optional.


So how can datadog notify if a build fails? 

1 answer

1 accepted

0 votes
Answer accepted

Hi @Zuberu Abdulraman ,

Thank you for your question!

You can use $BITBUCKET_EXIT_CODE variable in the after-script section.
$BITBUCKET_EXIT_CODE - the exit code of a step, if step success value setup to 0.

- <some build logic>
- ALERT_TYPE="success"
- if [[ $BITBUCKET_EXIT_CODE -ne 0 ]]; then ALERT_TYPE="error" ; fi
- pipe: atlassian/datadog-send-event:1.1.2




Hi Alex,

Thanks for the information. I really appreciate that :) One more thing about TAGS, I was trying to use the ALERT TYPE as TAG but I was not successful. How can that be done?


So that incase its failure or success the alert will have tags.e.g of alert will be:

This is the title #status:error/success #branch:master #repository:aws #workspace:xxxxx%%% \n Alert sent from [Pipeline #60](åxxxx/aws/addon/pipelines/home#!/results/60) \n %%%

Got this working with tags by defining 2 tags as variables. error and success. So that when failure the tag will be added to the log sent as tag.

Suggest an answer

Log in or Sign up to answer
Community showcase
Published in Apps & Integrations

🍻🍂Apptoberfest Update: Upcoming Virtual Events 🎉

Hello Community! I hope you've been enjoying the 🍂Apptoberfestivities🍂 (I know I have!) The event is heating up next week with a series of virtual events that we're calling the 🍻🍂Partner App ...

112 views 1 8
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you