Community Step Templates

Last updated

Community step templates are publicly available step templates that have been contributed by the Octopus Community, they're third party code that is licensed under the Apache 2.0 license.

If you can't find a built-in step template that includes the actions you need, you should check the community step template. There is a large number and variety of step templates (and it's growing all the time) that can help you automate your deployments without writing any scripts yourself.

Octopus Community step templates integration was introduced in Octopus 3.7 and is enabled by default, but it can be disabled.

Enable/Disable Community Step Templates Integration

  1. Navigate to Configuration ➜ Features.
  2. Expand the Octopus Community Step Template section by clicking on it.
  3. Toggle the selection to either Enabled or Disabled, and click SAVE.

Community Step Template Synchronization

The Community Step Templates are synchronized with the Octopus Server. The synchronization process is executed as a standard Octopus task and you can view its execution details from the Tasks area. The Octopus Server synchronizes with the Octopus Library on startup and then every 24 hours over the Internet thus it requires Internet access. If there are any updates or changes, the sync process retrieves all the step templates and stores the relevant community step templates in the Octopus database. Step templates are persisted locally, but they cannot be used in a deployment process until they are explicitly installed.

The Octopus Server uses a sync task to connect to http://library.octopus.com/ over http (port 80). If you don't see any Community Step Templates after enabling the feature, verify outbound traffic is enabled on port 80.

NOTE: The relevant permissions to install and manage step templates are ActionTemplateCreate, ActionTemplateEdit, ActionTemplateView and ActionTemplateDelete.

Adding Community Step Templates

Unlike the built-in steps included in Octopus, you need to install Community Step Templates. There are three ways you can do this:

  • As you define your deployment processes.
  • From the Library area of the Octopus Web Portal.
  • By importing them from the Community Library.

Add a Community Step Template as you Define the Deployment Process

  1. Navigate to your project's overview page by selecting Projects and clicking on the project you are working with.
  2. Click the DEFINE YOUR DEPLOYMENT PROCESS button, and click ADD STEP.
  3. Scroll past the built-in step templates, and find the Community Step Template you want either by choosing from the available technologies or clicking SHOW ALL.
  4. Before you install the template you can click VIEW DETAILS to view the parameters of the step and the source code.
  5. To install the step template, hover over the step template's card and click INSTALL AND ADD and SAVE.

After the step template has been installed, it will be available alongside the built-in step templates.

Add a Community Step Template from the Octopus Library

  1. In the Octopus Web Portal, navigate to Library ➜ Step Templates.
  2. Click BROWSE LIBRARY.
  3. Find the Community Step Template you want either by choosing from the available technologies or clicking SHOW ALL.
  4. Before you install the template you can click VIEW DETAILS to view the parameters of the step and the source code.
  5. To install the step template, hover over the step template's card and click INSTALL and SAVE.

After the step template has been installed, it will be available alongside the built-in step templates.

Import a Community Step Template From the Community Library

If the Community Step Template feature has been disabled, you can still use community step templates by manually importing the JSON file (which contains all of the information required by Octopus) from the Community Library into the step template library in Octopus.

  1. Navigate to the Community Library website.
  2. Find the template you want to use, review the details, and click the Copy to clipboard button.
  3. Navigate to Library ➜ Step Templates in the Octopus web portal and select Import from the custom step templates section.
  4. Paste in the JSON document for the Step Template into the import window and click SAVE.

After the step template has been installed, it will be available alongside the built-in step templates.

Adding an Updated Version of a Community Step Template

Sometimes updates are available for step templates.  In this case, you will notice the step template has an option to update the step.  If you select update, you will be taken to the community step details with the option to update the latest version of the step template.  Community step templates can also be updated from the library as needed.