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

How to send out notifications after each task in deployment is completed?

Mallika Dasanoor January 30, 2019

I have a scenario where we have a task to run smoke tests after the deployment is successful.  We would like to know if the deployment failed or if the smoke tests task failed.  So, would prefer to receive email notification from bamboo saying deployment is successful and smoke tests task is starting.

Can we accomplish this?

 

1 answer

1 accepted

0 votes
Answer accepted
Jobin Kuruvilla [Adaptavist]
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
January 31, 2019

You might want to create a separate build for the smoke tests and add it is a child build of the original deployment build.

That way, you can configure separate notifications for the builds. Also, the smoke tests won't be triggered if the deployment failed. Would that help?

Mallika Dasanoor January 31, 2019

Thanks for the reply.  But the way we have it set up is that we have a build plan which generates the artifacts and we have a deployment plan set up which is tied to that build plan.  once we have a successful build, the deployment is triggered.  I dont see an option to set up dependencies for a deployment plan like we have it for build plans.  Am i clear?  If not i can try to explain it in more detail.  Let me know.  Thanks!

Jobin Kuruvilla [Adaptavist]
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
January 31, 2019

Yeah, that's a bummer. You can work around by defining a new environment in the same deployment project that just does the smoke tests. And it can have a trigger to start after the successful deployment of the actual deploy.

It is not pretty as environments are meant for deploys not tests but it is a workaround.

Another option is to use a script task in the deployment to trigger the test plan using the REST API.

Like Mallika Dasanoor likes this
Mallika Dasanoor January 31, 2019

Yeah, that's a bummer. You can work around by defining a new environment in the same deployment project that just does the smoke tests. And it can have a trigger to start after the successful deployment of the actual deploy. .>> I just checked and there is no trigger based off a successful deployment .. but there are triggers based of off successful builds ...

Do you have an example script using REST API? I am fairly new to this approach and would like to customize based of your sample.

But thank you so much.  You have been extremely helpful!!

Jobin Kuruvilla [Adaptavist]
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
January 31, 2019

I just checked and there is no trigger based off a successful deployment

Did you check the trigger in a deployment env? I was talking about adding a new env and then add a trigger on it to start the env tasks as soon as the actual deploy is done.

Env1: DEV DEPLOY

Env2: DEV SMOKE TEST

DEV DEPLOY will be triggered by the build. DEV SMOKE TEST will be triggered after a successful deploy of DEV DEPLOY.

Again, as I mentioned, a deploy to DEV SMOKE TEST is a bit odd given that it won't be deploying anything. It will just be doing some tests.

Like # people like this
Mallika Dasanoor January 31, 2019

I see what you are saying and I could see that trigger show up when I added the 2nd environment.  When it was just one environment, the trigger did not show up and thats where i was confused.  Thanks again!

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events