Skip to content

Creating Sequences

This guide walks you through creating sequences that combine actions into ordered workflows.

Make sure you have:

  • At least one action to include
  • Understanding of your deployment workflow
  • Access to create sequences in Lens
  1. Open Lens in your browser
  2. Click Sequences in the sidebar
  3. Click New Sequence
FieldDescriptionExample
NameDisplay name; used to derive the slugdeploy-web-application
Initial VersionStarting semantic version1.0.0
  1. Click Add Action — a blank action row appears inline (there is no pop-up dialog)
  2. Select an action from the row’s dropdown
  3. Specify the version requirement in the same row

Repeat to add more actions. Each row has / buttons to set the order.

For each action, set a version requirement:

RequirementUse Case
^1.0.0Get compatible updates (recommended)
~1.5.0Patch updates only
=1.2.3Exact version (strict)
>=1.0.0Any version 1.0.0 or newer

Use the up/down arrow buttons next to each step to arrange them:

┌─────────────────────────────────────────────────────────┐
│ Sequence Steps │
├─────────────────────────────────────────────────────────┤
│ │
│ 1. [≡] health-check (^1.0.0) [↑] [↓] [✕] │
│ 2. [≡] stop-service (^1.0.0) [↑] [↓] [✕] │
│ 3. [≡] deploy-files (^2.0.0) [↑] [↓] [✕] │
│ 4. [≡] start-service (^1.0.0) [↑] [↓] [✕] │
│ 5. [≡] smoke-test (^1.0.0) [↑] [↓] [✕] │
│ │
│ [+ Add Action] │
│ │
└─────────────────────────────────────────────────────────┘

Click Save to create your sequence.

StepActionVersionPurpose
1pre-flight-check^1.0.0Verify target is ready
2backup-config^1.0.0Save current configuration
3stop-application^1.0.0Graceful shutdown
4deploy-files^2.0.0Copy new application files
5update-config^1.0.0Apply configuration changes
6start-application^1.0.0Start the service
7health-check^1.0.0Verify deployment succeeded
StepActionVersionPurpose
1backup-database^2.0.0Create backup before changes
2validate-migrations^1.0.0Check migration scripts
3apply-migrations^1.0.0Run database migrations
4verify-schema^1.0.0Confirm schema changes
StepActionVersionPurpose
1drain-connections^1.0.0Stop accepting new requests
2stop-service^1.0.0Stop the service
3start-service^1.0.0Start the service
4health-check^1.0.0Verify service is healthy

The same action can appear multiple times in a sequence:

StepActionNotes
1health-checkPre-deployment check
2deploy-filesDeploy application
3health-checkPost-deployment verification

You can use different version requirements:

StepActionVersionReason
1deploy-files=1.0.0Legacy deployment
2deploy-files^2.0.0New deployment method
┌─────────────────────────────────────────────────────────┐
│ Edit Sequence: deploy-web-application │
├─────────────────────────────────────────────────────────┤
│ │
│ Name: [deploy-web-application ] │
│ Version: 1.0.0 │
│ │
│ ───────────────────────────────────────────────────── │
│ │
│ Steps: │
│ │
│ ┌─────┬─────────────────────┬────────────┬─────────┐ │
│ │ # │ Action │ Version │ Actions │ │
│ ├─────┼─────────────────────┼────────────┼─────────┤ │
│ │ 1 │ pre-flight-check │ ^1.0.0 │ [↑][↓][✕]│ │
│ │ 2 │ stop-application │ ^1.0.0 │ [↑][↓][✕]│ │
│ │ 3 │ deploy-files │ ^2.0.0 │ [↑][↓][✕]│ │
│ │ 4 │ start-application │ ^1.0.0 │ [↑][↓][✕]│ │
│ │ 5 │ health-check │ ^1.0.0 │ [↑][↓][✕]│ │
│ └─────┴─────────────────────┴────────────┴─────────┘ │
│ │
│ [+ Add Action] │
│ │
│ [Cancel] [Save] │
└─────────────────────────────────────────────────────────┘

Before saving, Mantis validates:

CheckDescription
Actions existAll referenced actions are available
Versions availableMatching versions exist for requirements
Slug uniquenessNo other sequence with the same slug in this scope (derived from the name unless overridden)

Your sequence is ready to:

  1. Be added to solutions
  2. Be deployed directly
  3. Be versioned with updates
1. pre-deploy-hook # Notify monitoring systems
2. ... actual deployment steps ...
3. post-deploy-hook # Update dashboards
1. create-snapshot # Save current state
2. ... deployment steps ...
3. verify-deployment # Check success