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

Deploy a release in Octopus Deploy octopusdeploy-deploy-release

Deploy a release in Octopus Deploy

arguments

  • ENVIRONMENTS - The list of environment names to deploy to (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)
  • RELEASE_NUMBER - The release number to deploy (required)
  • USE_GUIDED_FAILURE - A multi-line list of prompted variable values. Format: name:value (optional)
  • VARIABLES - Set the value for a prompted variable in the format Label:Value (optional)

returns

  • DEPLOYMENTS - The list of deployments
    deploy-release:
  type: octopusdeploy-deploy-release
  arguments:
    OCTOPUS_API_KEY: '${{OCTOPUS_API_KEY}}'
    OCTOPUS_URL: '${{OCTOPUS_URL}}'
    OCTOPUS_SPACE: Spaces-1
    PROJECT: Project Name
    RELEASE_NUMBER: 1.0.0
    ENVIRONMENTS:
      - Development
      - Production
    VARIABLES:
      - 'prompted-variable1:prompted-value1'
      - 'prompted-variable2:prompted-value2'
    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}}'
deploy-release:
  type: octopusdeploy-deploy-release
  arguments:
    OCTOPUS_ACCESS_TOKEN: '${{OCTOPUS_ACCESS_TOKEN}}'
    OCTOPUS_URL: '${{OCTOPUS_URL}}'
    OCTOPUS_SPACE: Spaces-1
    PROJECT: Project Name
    RELEASE_NUMBER: 1.0.0
    ENVIRONMENTS:
      - Development
      - Production
    VARIABLES:
      - 'prompted-variable1:prompted-value1'
      - 'prompted-variable2:prompted-value2'
    USE_GUIDED_FAILURE: 'false'

  
github.com
OctopusDeploy
Nov 4, 2024