feat(octopus): add Octopus Deploy integration#3221
feat(octopus): add Octopus Deploy integration#3221zakaneki wants to merge 1 commit intosuperplanehq:mainfrom
Conversation
bd9febe to
ad56868
Compare
ad56868 to
09c8bdf
Compare
09c8bdf to
c3314a7
Compare
|
@zakaneki looking good - moved to code review |
| for _, id := range deploymentIDs { | ||
| found, err := findExecutionByDeploymentID(ctx, id) | ||
| if err != nil { | ||
| return okResponse() | ||
| } | ||
| if found != nil { | ||
| executionCtx = found | ||
| break | ||
| } |
There was a problem hiding this comment.
Is it possible that this may drop a valid match when Octopus sends multiple deployment IDs in one event?
What your tests shows?
There was a problem hiding this comment.
Yes, it's hard to test in practice because it's an edge case. Definitely an oversight though, thanks!
pkg/integrations/octopus/common.go
Outdated
| return metadata | ||
| } | ||
|
|
||
| if projectID != "" && !strings.Contains(projectID, "{{") { |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
Let's increase this to 5 minutes. Like github workflow run and semaphore run workflow. Since we are using polling just as fallback
| func (c *DeployRelease) Cancel(ctx core.ExecutionContext) error { | ||
| return nil | ||
| } |
There was a problem hiding this comment.
Cancelling the execution should also cancel the deploy on the octopus side
88510ff to
9c59377
Compare
There was a problem hiding this comment.
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]>
9c59377 to
ba2f18a
Compare
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
X-Octopus-ApiKeyheader.Spaces-1).Trigger: On Deployment Event
SuperPlane-{webhookID}) to avoid collisions between workflow nodes.X-SuperPlane-Webhook-Secretto ensure payload authenticity.Action: Deploy Release
SuccessandFailedoutputs for conditional workflow branching.Technical Decisions
Polling fallback
Although Octopus supports task completion webhooks, a polling loop is implemented in the
Deploy Releaseaction to prevent workflows from hanging if a webhook is dropped. This aligns with other long-running integrations (e.g., Render).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
ngrokfor local webhook testing.Configure Connection
Add a new Octopus connection.
Provide:
https://example.octopus.app)Test Trigger
Test Action