The image shows an isometric illustration of a central octopus-like icon connected to multiple brain icons in a hub-and-spoke network pattern against a purple-to-blue gradient background.

Octopus Easy Mode - Lifecycles

Matthew Casperson
Matthew Casperson

In the previous post, you added a custom channel to the project. In this post, you’ll define custom lifecycles.

Prerequisites

  • An Octopus Cloud account. If you don’t have one, you can sign up for a free trial.
  • The Octopus AI Assistant Chrome extension. You can install it from the Chrome Web Store.

The Octopus AI Assistant will work with an on-premises Octopus instance, but it requires more configuration. The cloud-hosted version of Octopus doesn’t need extra configuration. This means the cloud-hosted version is the easiest way to get started.

Creating the project

Paste the following prompt into the Octopus AI Assistant and run it:

Create a Script project called "13. Script App with Lifecycle", and then:
* Define a lifecycle called "Auto Deploy" that includes:
  * The "Development" phase with the "Development" environment as the first phase set to automatically deploy
  * The "Test" phase with the "Test" environment as the second phase
  * The "Production" phase with the "Production" environment as the third phase
* Define a channel to the project called "Application" that uses the "Auto Deploy" lifecycle, and make this the default channel

You can now create a release and see it automatically deployed to the Development environment as part of the Auto Deploy lifecycle. This is because the first phase of the lifecycle is set to deploy automatically.

What just happened?

You created a sample project with:

  • A custom lifecycle to automatically deploy to the Development environment when a release is created, followed by the Test and Production environments.
  • A new channel called Application using the Auto Deploy lifecycle as the default channel for the project.

What’s next?

The next step is to create a mock Kubernetes deployment project.

Matthew Casperson

Related posts