When a manual deploy occurs within octopus and fails, I want a message to be displayed to the releaser in Slack

Hi, I was wondering if anyone knew how to do this?
Thank you

Hi Mark,

Thanks for getting in touch! It sounds like you could make good use of a feature we released in Octopus 3.5 called Subscriptions. The way it works is you ‘Subscribe’ to audited events (like failed deployments). Whenever those events occur within Octopus, the Subscription will trigger email or webhook notifications. You can filter which events fire the notifications down to specific Projects, Environments, Users, etc. We wrote this blog post to introduce the feature, which shows the process of creating the Subscription, using Zapier to catch the webhook, and then notifying a Slack channel. You can also refer to more detailed info in our documentation.

I hope that helps! Let us know if you have any further questions.

Kenny

Hi Ken

It’s just the version numer we require, can this be done with a
subscription or in a deployment poweshell script (a line for version
number)?

Also Ken, Octopus: can we add dll + versions to each release within a
project?

Hi Ken following up on this, i hopew this is cleaer…

When a manual deploy occurs within octopus and fails, I want a message
to be displayed to the release in Slack, giving them a link to the
deploy log, and an option to attempt a redeploy.

Investigate if we can do this via Zapier, or if we need a slack bot for
this.

The major sticking point will be the mapping between Octopus Users and
Slack Users.

ok set all that zapier/slacup up, we are getting test noticiations, but
no npayload

Do we have to add something like this in a deployment script?

{ “Timestamp”: “0001-01-01T00:00:00+00:00”, “EventType”:
“SubscriptionPayload”, “Payload”: { “ServerUri”:
http://my-octopus.com”, “ServerAuditUri”: “http://my-octopus.com”,
“BatchProcessingDate”: “0001-01-01T00:00:00+00:00”, “Subscription”: {},
“Event”: {} } }

Hi Mark,

Thanks for following up and expanding a bit on what you’d like to accomplish. Currently, our Subscriptions feature is limited when it comes to Slack. In our 2017 Roadmap, we talk about a Slack app for Octopus that we have really been aiming towards. Subscriptions, while useful now, are kind of building blocks towards providing first class support for Slack integration. Check out our UserVoice suggestion for an official Slack app as well. Feel free to also add any input on how you’d like to use it, and we’ll refer to it to help us plan for the feature.

At the moment, the notifications use a basic template as you see, with no way to modify the template. I’ve stumbled across an interesting blog post you may like where a user manually created a sort of ReleaseBot to do some cool things via PowerShell script step.

Feel free to ask any further questions, or leave comments on UserVoice or our Roadmap Blog post.

Kenny

Hi Mark,

Just jumping back in here to clarify about your most recent question. When you say you’re getting no payload, is it Zapier or Slack that isn’t getting the payload? If Slack isn’t getting it, did you select the Payload Event Message option in your Slack message step in Zapier? You can refer back to our blog post which shows this specific step I’m referring to :slight_smile:

Best regards,

Kenny

Thanks Kenny, you have been a great help

Hi Mark,

No problem at all! Don’t hesitate to reach out if you have any further questions.

Kind regards,

Kenny

Hi Ken

Do you have any info on azure webjobs and how they are managed within
Octopus?

Thank you

Hi Mark,

We do have information! Check out our documentation page covering Web Job deployments within Octopus. Additionally, we have some great customers who have written in detail on their blogs and on public forums about their processes of deploying Web Jobs in Octopus. You may find these useful :slight_smile:

http://michaelsync.net/2014/06/10/deploying-the-azure-website-and-azure-webjob-from-octopusdeploy-teamcity

I hope these resources help! Let me know if you have any further questions.

Kenny

/*Hi Ken

What has happened is that the Octopus version has been updated to have
a suffix.

This doesn’t match the assembly inside the package…
We need to strip the suffix off both the Octopus and Assembly version
before the version check.

Do you know how to do this please?

Thank you

Mark

*/

Hi Mark,

Just taking this ticket from Kenny. Could you explain a little bit more about the problem you are having, as I am making some assumptions.
Do you mean that the Octopus Release version number has a suffix and that doesn’t match the package metadata?

How are you building and creating your package and release? Could you provide a build log and maybe screenshots of how you have configured, what errors you are getting, and anything else you think may be appropriate.

Hopefully we can figure this out :slight_smile:
Vanessa

Hi Venessa, does this help? This is an example.

Task progress

This task started 18 hours ago and ran for 1 minute
Deploy EmailNotificationGenerator release 1.1.112-enabledinstructagreement-forQa to QA
March 8th 2017 14:24:46
Fatal
The deployment failed because one or more steps failed. Please see the deployment log for details.
Acquire packages
Step 1: Deploy EmailNotification.UI
March 8th 2017 14:24:46
Fatal
The step failed: Activity Deploy EmailNotification.UI on Azure failed with error 'The remote script failed with exit code 1'.

 Deploy EmailNotificationGenerator release 1.1.112-enabledinstructagreement-forQa to QA
March 8th 2017 14:24:46
Fatal
The deployment failed because one or more steps failed. Please see the deployment log for details.
March 8th 2017 14:23:37
Info
Acquiring packages
March 8th 2017 14:23:37
Info
Making a list of packages to download
March 8th 2017 14:23:37
Info
Delta compression is enabled for package transfers from the Octopus Server to deployment targets
March 8th 2017 14:23:37
Info
Looking up the package location from the built-in package repository...
March 8th 2017 14:23:41
Info
All packages have been acquired
March 8th 2017 14:24:46
Fatal
The step failed: Activity Deploy EmailNotification.UI on Azure failed with error 'The remote script failed with exit code 1'.

Hi Vanessa

I hope ,my last email as ok?

Another quick question please?

Octopus: can we add dll + versions  to each release within a project?

Thank you

Mark


From: "Vanessa Love" <tender2+dc38904a9e@tenderapp.com>
Date: 09/03/2017 at 02:54:17
To: <mark.crisp@purplebricks.com>
Subject: Re: When a manual deploy occurs within octopus and fails, I want a message to be displayed to the releaser in Slack [Questions #10977]

// Please reply above this line
==================================================

From: Vanessa Love (Support staff)

Hi Mark,

Just taking this ticket from Kenny. Could you explain a little bit more about the problem you are having, as I am making some assumptions.
Do you mean that the Octopus Release version number has a suffix and that doesn't match the package metadata?

How are you building and creating your package and release? Could you provide a build log and maybe screenshots of how you have configured, what errors you are getting, and anything else you think may be appropriate.

Hopefully we can figure this out :)
Vanessa

On Wed, Mar 08 at 08:23 AM PST, mark.crisp wrote:

/*Hi Ken

What has happened is that the Octopus version has been updated to have
a suffix.

This doesn't match the assembly inside the package..
We need to strip the suffix off both the Octopus and Assembly version
before the version check.

Do you know how to do this please?

Thank you

Mark

*/

Having trouble reading this? View this discussion online: When a manual deploy occurs within octopus and fails, I want a message to be displayed to the releaser in Slack.

To unsubscribe and stop receiving emails from http://help.octopusdeploy.com, visit this page

Hi Mark,

I am still unsure of the problem. Could you answer my question of when you said ‘octopus version’ did you mean the release version created for the project?
Could you also answer how you are creating the release and building your package? Could I have a full build log?
Could you provide a full deployment log: https://octopus.com/docs/how-to/get-the-raw-output-from-a-task
Could you attach both please!

For your quick question, the only artifacts that Octopus will use for deployments are packages, be it NuGet or Zip (gz, tgz etc). These can contain DLLS and should always have a version in the name. But if you mean after a deployment attached to the project from the deployment, we have artifacts: https://octopus.com/docs/deploying-applications/artifacts

Vanessa