Deprovision an ephemeral environment in Octopus Deploy
ActionsGitHub Action to deprovision an ephemeral environment across all projects in Octopus Deploy
v1.0.0
LatestVerified creator
Tags
(1)Verified
A GitHub Action to deprovision ephemeral environments for your Octopus Deploy server.
Ephemeral environments in Octopus Deploy allow you to automatically create test environments on-demand to gain confidence in your changes while helping to keep your infrastructure costs down. For more information, see Ephemeral Environments.
| Name | Description |
|---|---|
OCTOPUS_URL |
The base URL hosting Octopus Deploy (i.e. https://octopus.example.com). It is strongly recommended that this value retrieved from a GitHub secret. |
OCTOPUS_API_KEY |
The API key used to access Octopus Deploy. It is strongly recommended that this value retrieved from a GitHub secret. |
OCTOPUS_SPACE |
The Name of a space within which this command will be executed. |
OCTOPUS_ACCESS_TOKEN |
The OIDC access token used to access Octopus Deploy. It is strongly recommended that this value retrieved from a GitHub secret. |
| Input Name | Description | Required | Notes |
|---|---|---|---|
server |
The url of the Octopus Instance | True | Will use the value set in OCTOPUS_URL if not set |
api_key |
The API key to login with | True | Will use the value set in OCTOPUS_API_KEY if not set. May be logged in plain text |
name |
The name of the ephemeral environment to deprovision. | True | |
project |
Project name, if deprovisioning for a single project. | False | Required when deprovisioning for a single project. |
all_projects |
Deprovision the environment for all projects. | False | If true, the ephemeral environment will be deprovisioned across all projects in the Octopus Deploy instance. If false, the ephemeral environment will only be deprovisioned from the specified project. Defaults to false |
space |
The name of the space containing the ephemeral environment. | True | Will use the value set in OCTOPUS_SPACE if not set |
| Output Name | Description |
|---|---|
deprovisioning_runbook_runs |
JSON string for an array of objects representing the deprovisioning runbook runs started by this action. Each object contains a runbookRunId and serverTaskId |
steps:
deprovision-ephemeral-environment:
runs-on: ubuntu-latest
steps:
- name: Deprovision Ephemeral Environment
uses: OctopusDeploy/deprovision-ephemeral-environment@v1
with:
server: ${{ secrets.TEST_INSTANCE_URL }}
api_key: ${{ secrets.TEST_INSTANCE_API_KEY }}
name: 'ephemeral-environment-12345'
project: 'My Project'
space: 'Default'steps:
- uses: actions/checkout@v3
- name: Login to Octopus Deploy
uses: OctopusDeploy/login@v1
with:
server: ${{ inputs.server || vars.TEST_INSTANCE_URL }}
service_account_id: ${{ inputs.service_account_id || vars.TEST_INSTANCE_SERVICE_ACCOUNT_ID }}
- name: Deprovision Ephemeral Environment
uses: OctopusDeploy/deprovision-ephemeral-environment@v1
with:
name: ${{ inputs.name }}
space: ${{ inputs.space || vars.TEST_SPACE_NAME}}To see the action in use, take a look at a demo workflow here.
Contributions are welcome! ❤️ Please read our Contributing Guide for information about how to get involved in this project.
Deprovision an ephemeral environment in Octopus Deploy is not certified by GitHub. It is provided by a third-party and is governed by separate terms of service, privacy policy, and support documentation.