Add set environment url helper functions - #2105
Closed
geofflamrock wants to merge 1 commit into
Closed
Conversation
…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
commented
Aug 5, 2026
geofflamrock
commented
Aug 5, 2026
| public const string SensitiveAttribute = "sensitive"; | ||
| } | ||
|
|
||
| public static class EnvironmentState |
Collaborator
Author
There was a problem hiding this comment.
This is also in #2104 so we'll prob need to stack this PR behind that one
geofflamrock
commented
Aug 5, 2026
| } | ||
| } | ||
|
|
||
| function Set-EnvironmentUrl([string]$name, [string]$url) |
Collaborator
Author
There was a problem hiding this comment.
[todo] Rename name to key
geofflamrock
force-pushed
the
geoffl/claude/bmbb-668/wrapper-environment-url-f92a1c
branch
from
August 5, 2026 07:16
b4d7dd4 to
20b14aa
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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:
State: General state to be persisted. Add set environment state helper functions #2104Url: Url to be associated and shown with the environment. <-- This PRChanges
Adds helper functions to PowerShell and Bash for setting environment urls, mirroring the functions for setting output variables.
Set-EnvironmentUrl -Name {name} -Url {url}.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.