Skip to content

Create an ephemeral environment in Octopus Deploy

Actions
GitHub Action to create an ephemeral environment in Octopus Deploy
v1.0.0
Latest
Verified creator
Star (1)

Tags

 (1)

Verified

GitHub has manually verified the creator of the action as an official partner organization. For more info see About badges in GitHub Marketplace.

Create Ephemeral Environment

A GitHub Action to create 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.

Environment Variables

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.

Inputs

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 create. True
project The name of the project to connect the environment to. True
space The name of a space containing the project. True Will use the value set in OCTOPUS_SPACE if not set

Examples

Create ephemeral environment using API key login

steps:
  create-ephemeral-environment:
    runs-on: ubuntu-latest
    steps:
      - name: Create Ephemeral Environment
        uses: OctopusDeploy/create-ephemeral-environment@v1
        with:
          server: ${{ secrets.TEST_INSTANCE_URL }}
          api_key: ${{ secrets.TEST_INSTANCE_API_KEY }}
          name: 'ephemeral-environment-${{ github.event.pull_request.number }}'
          project: 'My Project'
          space: 'Default'

Create ephemeral environment using Octopus Deploy Login Action

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: Create Ephemeral Environment
    uses: ./
    with:
      name: ${{ inputs.name }}
      project: ${{ inputs.project || vars.TEST_PROJECT_NAME}}
      space: ${{ inputs.space || vars.TEST_SPACE_NAME}}

To see the action in use, take a look at a demo workflow here.

Contributing

Contributions are welcome! ❤️ Please read our Contributing Guide for information about how to get involved in this project.

Create 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.

About

GitHub Action to create an ephemeral environment in Octopus Deploy
v1.0.0
Latest

Verified

GitHub has manually verified the creator of the action as an official partner organization. For more info see About badges in GitHub Marketplace.

Tags

 (1)

Create 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.