Skip to content

OctopusDeploy/create-ephemeral-environment

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

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'

Using with 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}}

Contributing

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

About

:octocat: GitHub Action to Create an Ephemeral Environment in Octopus Deploy

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Packages

No packages published

Contributors 7