Skip to content

Add doc for environment state - #3319

Open
yangguoif wants to merge 4 commits into
mainfrom
yangguo/BMBB-661-doc-for-environment-state
Open

Add doc for environment state#3319
yangguoif wants to merge 4 commits into
mainfrom
yangguo/BMBB-661-doc-for-environment-state

Conversation

@yangguoif

@yangguoif yangguoif commented Aug 9, 2026

Copy link
Copy Markdown

Background

BMBB-661 : Support for Environment State is added into Octopus, we should update related doc in Environment and Ephemeral Environment.

What's changed

This PR

  • adds doc about Environment State under Environment.
  • adds doc about Environment URL specifically for Ephemeral Environment, attached a final result as a screenshot.

How to review

Proof reading is highly appreciated. Please checkout the preview built by CI (after CI shows green tick), recommend starting from docs/projects/ephemeral-environments#environment-urls, clicking the link to check the doc related to Environment State.

@yangguoif yangguoif changed the title Yangguo/bmbb 661 doc for environment state Add doc for environment state Aug 9, 2026
@team-marketing-branch-protections

Copy link
Copy Markdown

Pull request environment is available at https://stoctodocspr3319.z22.web.core.windows.net.

You can view the ephemeral environment status in Octopus Deploy.

This environment will be automatically deprovisioned when the pull request is closed, or after 7 days of inactivity.

@yangguoif
yangguoif force-pushed the yangguo/BMBB-661-doc-for-environment-state branch from 75be84c to 746257b Compare August 9, 2026 22:12

## Availability

Environment state is available to all cloud and self-hosted customers from version `2026.3.10863`.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

TODO: Double check the rollout plan and the version number here.

Comment on lines +15 to +19
## How environment state works

- A step in a deployment or runbook run sets a state entry with a key and a value.
- Octopus captures the entry when the step completes successfully, and stores it based on the project, environment, and tenant that the deployment or runbook run is executing against.
- Later deployment or runbook run for the same project, environment, and tenant, can read the value from a variable named `Octopus.Environment.State[key]`.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Is this section necessary?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🤔 yeah I think we prob don't really need it, customers prob don't really care about how it works from the Octopus side, just how they use it

@geofflamrock geofflamrock left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This looks pretty good, I've left a few small suggestions and questions, happy to pair on working through anything here.

Comment on lines +15 to +19
## How environment state works

- A step in a deployment or runbook run sets a state entry with a key and a value.
- Octopus captures the entry when the step completes successfully, and stores it based on the project, environment, and tenant that the deployment or runbook run is executing against.
- Later deployment or runbook run for the same project, environment, and tenant, can read the value from a variable named `Octopus.Environment.State[key]`.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🤔 yeah I think we prob don't really need it, customers prob don't really care about how it works from the Octopus side, just how they use it


Environment state lets a deployment or [runbook](/docs/runbooks) run save key/value pairs scoped to the combination of project, environment, and optionally a tenant. Later deployments and runbook runs for the same project and environment can then read those values back.

Environment state addresses a common problem with [ephemeral environments](/docs/infrastructure/ephemeral-environments). A provisioning runbook often creates infrastructures that later steps depend on, such as a Kubernetes namespace or an application URL. Without environment state, each step must re-derive these values, which is error-prone. Environment state records each value once, so every later deployment, runbook run, and deprovisioning runbook reads it directly from Octopus. It works with any environment, not just ephemeral ones.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I wonder if we could reframe this section to be about scenarios where environment state is useful, the way this currently reads is that there is a problem with ephemeral environments in Octopus, it gives it a bit of a negative spin.

Maybe something more like "Environment state can be used for a variety of scenarios such as dynamically generated data during provisioning and deprovisioning of ephemeral environments, ..." (this isn't phrased very well though), we'd need to come up with some other areas of use cases as well. Might be easiest to workshop through this one together.

Comment thread src/pages/docs/infrastructure/environments/environment-state.md Outdated

## Environment URLs

An environment URL is a type of [environment state](/docs/infrastructure/environments/environment-state) that Octopus gives first-class support. When a deployment or runbook run of the ephemeral environment sets an environment URL, Octopus shows it as a clickable link in the table on the Ephemeral Environments page, so anyone reviewing the environment can open the running app without digging through task logs. To set an environment URL from a deployment or runbook step, see [Setting an environment URL](/docs/infrastructure/environments/environment-state#setting-an-environment-url).

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Some small potential tweaks to make this a bit more specific to ephemeral environments and to reduce some of the "developery" language like "digging into" which I'm not sure we use in our customer facing docs. I'm also not entirely sure on the "first-class support" language and whether we use want to use that in docs?

Suggested change
An environment URL is a type of [environment state](/docs/infrastructure/environments/environment-state) that Octopus gives first-class support. When a deployment or runbook run of the ephemeral environment sets an environment URL, Octopus shows it as a clickable link in the table on the Ephemeral Environments page, so anyone reviewing the environment can open the running app without digging through task logs. To set an environment URL from a deployment or runbook step, see [Setting an environment URL](/docs/infrastructure/environments/environment-state#setting-an-environment-url).
An environment URL is a type of [environment state](/docs/infrastructure/environments/environment-state) that Octopus gives first-class support. When an environment URL is set during a provisioning runbook or deployment, Octopus shows it as a clickable link in the table on the Ephemeral Environments page, making it easy to open the running application without needing to look through task logs. To set an environment URL from a deployment or runbook step, see [Setting an environment URL](/docs/infrastructure/environments/environment-state#setting-an-environment-url).


Octopus then shows the `App` URL as a clickable link on the Ephemeral Environments page:

![An ephemeral environment's URL shown as a clickable link on the Ephemeral Environments page](/docs/projects/ephemeral-environments/ephemeral-environment-url.png)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

From memory we have some conventions we use for screenshots when it comes to project names etc. we probably don't want to adjust the screenshot to use those.

Co-authored-by: Geoff Lamrock <geoff.lamrock@gmail.com>
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.

3 participants