Octopus Deploy
  • 2 Minutes to read
  • Dark
    Light
  • PDF

Octopus Deploy

  • Dark
    Light
  • PDF

Article Summary

Using Octopus Deploy you can download Stackify's Retrace API Template from the Community Step Templates library. Once this is accomplished you can set up the parameters necessary in your deployment process and set the script to run from the Octopus Agent. Here is a step by step guide on how to do that:

  1. Open your Octopus Agent and Navigate to Library > Step Templates.
  2. Search for the Stackify's Retrace Deployment Script Step Template and click Install.
  3. Now Navigate to Projects > {Your_Project} > Process

  1. Click Add Step in the upper left hand corner and select Stackify's Retrace API Template from the list.

  1. For your execution plan choose Octopus Server. This will ensure that the powershell script is ran from a Windows host and that it is only run once.

  1. Add your Retrace Parameters to our Step Template. Required fields are ApiKey, AppName, Environment, Version, and Action. See the next section for details on how to set up the Stackify.ApiKey variable for Octopus Deploy.

  1. The Action chosen will determine what message is sent to our API. Click here for more information.

  2. For Run Conditions select "Always Run". We have logic built into the script to automatically send a Cancel request to the API if the deployment fails.

Using Octopus Parameters with Stackify's Retrace API Template

You will notice that Stackify's Retrace API Template has default values automatically filled in for your convenience. To learn more about System Octopus Parameters click here. The Stackify.ApiKey is a custom variable that will require you to set up a Variable set in your Octopus library. This will remove the need to paste your Stackify Api Key into every new step that uses our Template. Here is how to create the Variable set:

  1. Navigate to Library > Variable Sets in the Octopus Deploy app. Click "Add New Variable Set"

  1. Name this set Stackify and click save.

  1. In the Name field type Stackify.ApiKey. For the Value field paste in your API key from your Retrace Account.

  1. Now click "Add To List" and then click "Save". Now you have a Variable Set that can be implemented into any of your Octopus Projects.

  1. Next go to Projects > {Your_Project} > Variables > Library Sets.

  1. Click "Include Library Variable Sets" and check the Stackify box then hit save.

Examples

The Finish step example is the standard for notifying Retrace of your deployment. This will provide the majority of the desired functionality for your deployments. The Start/Finish example is for more complex scenarios where the time spent in your deployment is an important number. Keep in mind when using the Start/Finish example that if you cancel a deployment after the Start step has ran you will have to Cancel the call to the API by using the Retrace UI in Deployment Requests.

Using Finish

Using Start and Finish

Note: When using Stackify's Retrace API template multiple times the given Parameters must be the same across both templates.


Was this article helpful?

What's Next