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 tenanted release in Octopus Deploy octopusdeploy-deploy-release-tenanted

Deploy a tenanted release in Octopus Deploy

arguments

  • ENVIRONMENT - An environment name 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)
  • TENANTS - The list of tenant names to deploy to (optional)
  • TENANT_TAGS - The list of tenant tag canonical names to locate tenants to deploy to. Format: Tag/Label (optional)
  • USE_GUIDED_FAILURE - Whether to use guided failure mode if errors occur during the deployment. (optional)
  • VARIABLES - Set the value for a prompted variable. Format: Label:Value (optional)

returns

  • DEPLOYMENTS - The list of deployments
    deploy-release-tenanted:
  type: octopusdeploy-deploy-release-tenanted
  arguments:
    OCTOPUS_API_KEY: '${{OCTOPUS_API_KEY}}'
    OCTOPUS_URL: '${{OCTOPUS_URL}}'
    OCTOPUS_SPACE: Spaces-1
    PROJECT: Project Name
    RELEASE_NUMBER: 1.0.0
    ENVIRONMENT: Production
    TENANTS:
      - Tenant1
      - Tenant2
    VARIABLES:
      - 'prompted-variable1:prompted-value1'
      - 'prompted-variable2:prompted-value2'
    USE_GUIDED_FAILURE: 'false'

  
    deploy-release-tenanted:
  type: octopusdeploy-deploy-release-tenanted
  arguments:
    OCTOPUS_API_KEY: '${{OCTOPUS_API_KEY}}'
    OCTOPUS_URL: '${{OCTOPUS_URL}}'
    OCTOPUS_SPACE: Spaces-1
    PROJECT: Another Project Name
    RELEASE_NUMBER: 2.0.0
    ENVIRONMENT: Development
    TENANT_TAGS:
      - tagSetA/someTagB
      - tagSetC/someTagD

  
    login:
  type: octopusdeploy-login
  arguments:
    ID_TOKEN: '${{ID_TOKEN}}'
    OCTOPUS_URL: '${{OCTOPUS_URL}}'
    OCTOPUS_SERVICE_ACCOUNT_ID: '${{OCTOPUS_SERVICE_ACCOUNT_ID}}'
deploy-release-tenanted:
  type: octopusdeploy-deploy-release-tenanted
  arguments:
    OCTOPUS_ACCESS_TOKEN: '${{OCTOPUS_ACCESS_TOKEN}}'
    OCTOPUS_URL: '${{OCTOPUS_URL}}'
    OCTOPUS_SPACE: Spaces-1
    PROJECT: Project Name
    RELEASE_NUMBER: 1.0.0
    ENVIRONMENT: Production
    TENANTS:
      - Tenant1
      - Tenant2
    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-tenanted:
  type: octopusdeploy-deploy-release-tenanted
  arguments:
    OCTOPUS_ACCESS_TOKEN: '${{OCTOPUS_ACCESS_TOKEN}}'
    OCTOPUS_URL: '${{OCTOPUS_URL}}'
    OCTOPUS_SPACE: Spaces-1
    PROJECT: Another Project Name
    RELEASE_NUMBER: 2.0.0
    ENVIRONMENT: Development
    TENANT_TAGS:
      - tagSetA/someTagB
      - tagSetC/someTagD

  
github.com
OctopusDeploy
Nov 4, 2024