Skip to content

Comments

feat(octopus): add Octopus Deploy integration#3221

Open
zakaneki wants to merge 1 commit intosuperplanehq:mainfrom
zakaneki:feat/octopus-deploy-integration
Open

feat(octopus): add Octopus Deploy integration#3221
zakaneki wants to merge 1 commit intosuperplanehq:mainfrom
zakaneki:feat/octopus-deploy-integration

Conversation

@zakaneki
Copy link

@zakaneki zakaneki commented Feb 22, 2026

Summary

Closes #2997

This PR adds a base integration with Octopus Deploy, allowing users to trigger workflows from deployment events and start release deployments directly from SuperPlane.

Demo

Loom walkthrough: https://www.loom.com/share/acf60dceb634468691c00f8f6a648bb4

Features

Authentication

  • API key authentication via the X-Octopus-ApiKey header.
  • Supports space-level configuration (custom Space ID or defaults to Spaces-1).

Trigger: On Deployment Event

  • Automatically creates Subscriptions in Octopus using the API.
  • Uses a unique naming convention (SuperPlane-{webhookID}) to avoid collisions between workflow nodes.
  • Verifies X-SuperPlane-Webhook-Secret to ensure payload authenticity.

Action: Deploy Release

  • Triggers a deployment for a selected Release and Environment.
  • Implements a 30s polling mechanism to track deployment status if webhooks fail or are delayed.
  • Provides Success and Failed outputs for conditional workflow branching.

Technical Decisions

  1. Polling fallback
    Although Octopus supports task completion webhooks, a polling loop is implemented in the Deploy Release action to prevent workflows from hanging if a webhook is dropped. This aligns with other long-running integrations (e.g., Render).

  2. Isolated Subscriptions per trigger node
    Each "On Deployment Event" node creates its own Subscription. This enables granular filtering (e.g., different environments per node) without cross-event noise.

How to Test

Prerequisites

  • An Octopus Deploy instance (Cloud or Server).
  • ngrok for local webhook testing.

Configure Connection

  1. Add a new Octopus connection.

  2. Provide:

    • Server URL (e.g., https://example.octopus.app)
    • API Key (generated in Profile → My API Keys)

Test Trigger

  1. Add the "On Deployment Event" node.
  2. Create a deployment in Octopus.
  3. Verify the workflow triggers.

Test Action

  1. Add the "Deploy Release" node.
  2. Select a Project, Release, and Environment.
  3. Run the workflow and confirm the deployment starts in Octopus.

@zakaneki zakaneki force-pushed the feat/octopus-deploy-integration branch from bd9febe to ad56868 Compare February 23, 2026 00:01
@zakaneki zakaneki force-pushed the feat/octopus-deploy-integration branch from ad56868 to 09c8bdf Compare February 23, 2026 00:22
@AleksandarCole AleksandarCole added pr:stage-2/3 Needs to pass functional review edu labels Feb 23, 2026
@AleksandarCole AleksandarCole self-assigned this Feb 23, 2026
@AleksandarCole AleksandarCole self-requested a review February 23, 2026 08:51
@zakaneki zakaneki force-pushed the feat/octopus-deploy-integration branch from 09c8bdf to c3314a7 Compare February 23, 2026 11:10
@AleksandarCole AleksandarCole requested review from forestileao and removed request for AleksandarCole February 23, 2026 13:12
@AleksandarCole AleksandarCole added pr:stage-3/3 Ready for full, in-depth, review and removed pr:stage-2/3 Needs to pass functional review labels Feb 23, 2026
@AleksandarCole
Copy link
Collaborator

@zakaneki looking good - moved to code review

Comment on lines 350 to 358
for _, id := range deploymentIDs {
found, err := findExecutionByDeploymentID(ctx, id)
if err != nil {
return okResponse()
}
if found != nil {
executionCtx = found
break
}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it possible that this may drop a valid match when Octopus sends multiple deployment IDs in one event?

What your tests shows?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, it's hard to test in practice because it's an edge case. Definitely an oversight though, thanks!

return metadata
}

if projectID != "" && !strings.Contains(projectID, "{{") {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we can make this nested if into a function, right? its the same verification for all 3 resources.
projectId, releaseId, and environmentId

DeployReleasePayloadType = "octopus.deployment.finished"
DeployReleaseSuccessOutputChannel = "success"
DeployReleaseFailedOutputChannel = "failed"
DeployReleasePollInterval = 30 * time.Second
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's increase this to 5 minutes. Like github workflow run and semaphore run workflow. Since we are using polling just as fallback

Comment on lines 464 to 466
func (c *DeployRelease) Cancel(ctx core.ExecutionContext) error {
return nil
}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cancelling the execution should also cancel the deploy on the octopus side

@zakaneki zakaneki force-pushed the feat/octopus-deploy-integration branch 2 times, most recently from 88510ff to 9c59377 Compare February 24, 2026 21:22
Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.

- Adds base client with API Key auth and Space-level configuration

- Adds 'On Deployment Event' trigger with webhook signature verification

- Adds 'Deploy Release' action with dual output channels (success/failed)

- Implements task polling fallback (30s interval) for reliable deployment tracking

- Includes full integration documentation and JSON payload examples

Signed-off-by: Andrija Zakić <[email protected]>
@zakaneki zakaneki force-pushed the feat/octopus-deploy-integration branch from 9c59377 to ba2f18a Compare February 24, 2026 21:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

edu pr:stage-3/3 Ready for full, in-depth, review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Octopus Deploy] Base

3 participants