Skip to content

Add set environment url helper functions - #2105

Closed
geofflamrock wants to merge 1 commit into
mainfrom
geoffl/claude/bmbb-668/wrapper-environment-url-f92a1c
Closed

Add set environment url helper functions#2105
geofflamrock wants to merge 1 commit into
mainfrom
geoffl/claude/bmbb-668/wrapper-environment-url-f92a1c

Conversation

@geofflamrock

@geofflamrock geofflamrock commented Aug 5, 2026

Copy link
Copy Markdown
Collaborator

Context

We are adding support for setting environment state within a deployment/runbook run. State will be persisted across deployments for the project/environment/(tenant) and will primarily be used across provisioning, deployment and deprovisioning of ephemeral environments.

State will be set using a new service message in the format `set-environmentstate -key "{key}" -value "{value}" -sensitive "{sensitive}" -type "{type}".

Different types of state will be supported:

Changes

Adds helper functions to PowerShell and Bash for setting environment urls, mirroring the functions for setting output variables.

  • PowerShell: Set-EnvironmentUrl -Name {name} -Url {url}.
  • Bash: set_environmenturl {name} {url}.

Reviewing and testing

Automated tests have been added, we'll need to pair and test this with the work in Octopus Server to handle service messages.

…ions

Add PowerShell and Bash wrapper functions that emit the new
set-environmentstate service message (key/value/sensitive/type),
mirroring the existing Set-OctopusVariable/set_octopusvariable
conventions. Type is fixed to "State" for this function.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@geofflamrock geofflamrock changed the title BMBB-668: Add Set-EnvironmentUrl/set_environmenturl wrapper functions Add set environment url helper functions Aug 5, 2026
Comment thread source/Calamari.Common/Features/Scripting/WindowsPowerShell/Bootstrap.ps1 Outdated
public const string SensitiveAttribute = "sensitive";
}

public static class EnvironmentState

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

This is also in #2104 so we'll prob need to stack this PR behind that one

}
}

function Set-EnvironmentUrl([string]$name, [string]$url)

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

[todo] Rename name to key

@geofflamrock
geofflamrock force-pushed the geoffl/claude/bmbb-668/wrapper-environment-url-f92a1c branch from b4d7dd4 to 20b14aa Compare August 5, 2026 07:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant