

Don’t forget add FAILURE to your list of highlighted words in Slack! Some credit for this code goes to the comment section here. This build-step should be the last and should run even if other steps fail. Here we use the TeamCity API to check if the build failed, or was stopped, using the guestAuth account. Package.NuGetPackageVersion' ] + " to " $OctopusParameters. Package.NuGetPackageId' ] + " " + $OctopusParameters. $WebhookText = $ ( "Deploying " + $OctopusParameters. I put the following snippet as the first and last step in TeamCity, the last one only running if all other steps were successful: Please note that I’m no expert at PowerShell, so this should be considered a proof of concept rather than a solution! It’s supported as steps in both TeamCity and Octopus Deploy, and I get access to a lot of variables (Build number, version control hash and so on). To solve the problem I choose PowerShell. Luckily for us we can fix that with Slacks webhook support. So we have a nice chat client and a smooth deployment pipeline, but no integration between them. Now we can simply push a button to have the same package promoted to the QA environment, and later to the production environment. It then automatically deploys the package to the test environment. In the last step of the build, it packs the solution into a package and sends it to Octopus Deploy. TeamCity starts a new build every time a checkin happens in the source-control. They usually play together in the following way: NET developer, so my Continuous Delivery tools of choice are TeamCity and Octopus Deploy, but neither has an integration option in Slack (TeamCity is available to vote for as an upcoming integration).įor those who are not familiar with these tools: TeamCity is a build server (some would prefer to call it an all-in-one pre-integrated solution) and Octopus Deploy is a deployment automation system. Integrations in a functional and good looking chat client. Slack has been widely adopted lately because of the intense IRC nostalgia it invokes in people, but its main selling point(s) are integrations. NET developer, so my Continuous Delivery tools of choice are TeamCity and Octopus Deploy, but neither has an integration option in the chat client Slack.
