Codefresh Steps: Reusable Code for Common Operations
This page provides code you can use to perform common operations in the Codefresh CI/CD platform.
0

Run a runbook in Octopus Deploy octopusdeploy-run-runbook

Run a runbook in Octopus Deploy

arguments

  • ENVIRONMENTS - The environment names to run in (required)
  • NAME - Name of the runbook to run (required)
  • OCTOPUS_ACCESS_TOKEN - Access token for octopus deploy (required when OCTOPUS_API_KEY is not provided)
  • OCTOPUS_API_KEY - API key for octopus deploy (required when OCTOPUS_ACCESS_TOKEN is not provided)
  • OCTOPUS_SPACE - Workspace for octopus deploy (required)
  • OCTOPUS_URL - URL of the octopus deploy server (required)
  • PROJECT - The name of the project associated with this release (required)
  • TENANTS - Run for these tenants (optional)
  • TENANT_TAGS - Run for tenants matching these tags (optional)
  • USE_GUIDED_FAILURE - Enable Guided failure mode (true/false/default) (optional)
  • VARIABLES - Set the value for a prompted variable in the format Label:Value (optional)

returns

  • RUNBOOK_RUNS - The list of runbook runs
    run-runbook:
  type: octopusdeploy-run-runbook
  arguments:
    OCTOPUS_API_KEY: '${{OCTOPUS_API_KEY}}'
    OCTOPUS_URL: '${{OCTOPUS_URL}}'
    OCTOPUS_SPACE: Spaces 1
    PROJECT: Project Name
    NAME: Runbook Name
    ENVIRONMENTS:
      - Development
      - Production

  
    run-runbook:
  type: octopusdeploy-run-runbook
  arguments:
    OCTOPUS_API_KEY: '${{OCTOPUS_API_KEY}}'
    OCTOPUS_URL: '${{OCTOPUS_URL}}'
    OCTOPUS_SPACE: Spaces 1
    PROJECT: Project Name
    NAME: Runbook Name
    ENVIRONMENTS:
      - Development
      - Production
    VARIABLES:
      - 'Label:Value'
    TENANTS:
      - Tenant 1
    TENANT_TAGS:
      - Tenant tag 1
    USE_GUIDED_FAILURE: 'false'

  
    login:
  type: octopusdeploy-login
  arguments:
    ID_TOKEN: '${{ID_TOKEN}}'
    OCTOPUS_URL: '${{OCTOPUS_URL}}'
    OCTOPUS_SERVICE_ACCOUNT_ID: '${{OCTOPUS_SERVICE_ACCOUNT_ID}}'
run-runbook:
  type: octopusdeploy-run-runbook
  arguments:
    OCTOPUS_ACCESS_TOKEN: '${{OCTOPUS_ACCESS_TOKEN}}'
    OCTOPUS_URL: '${{OCTOPUS_URL}}'
    OCTOPUS_SPACE: Spaces 1
    PROJECT: Project Name
    NAME: Runbook Name
    ENVIRONMENTS:
      - Development
      - Production

  
    login:
  type: octopusdeploy-login
  arguments:
    ID_TOKEN: '${{ID_TOKEN}}'
    OCTOPUS_URL: '${{OCTOPUS_URL}}'
    OCTOPUS_SERVICE_ACCOUNT_ID: '${{OCTOPUS_SERVICE_ACCOUNT_ID}}'
run-runbook:
  type: octopusdeploy-run-runbook
  arguments:
    OCTOPUS_ACCESS_TOKEN: '${{OCTOPUS_ACCESS_TOKEN}}'
    OCTOPUS_URL: '${{OCTOPUS_URL}}'
    OCTOPUS_SPACE: Spaces 1
    PROJECT: Project Name
    NAME: Runbook Name
    ENVIRONMENTS:
      - Development
      - Production
    VARIABLES:
      - 'Label:Value'
    TENANTS:
      - Tenant 1
    TENANT_TAGS:
      - Tenant tag 1
    USE_GUIDED_FAILURE: 'false'

  
github.com
OctopusDeploy
Nov 4, 2024