Files
backstage/plugins/octopus-deploy
Jonathan Mezach f1622e1eaf React to breaking change
Signed-off-by: Jonathan Mezach <jonathan.mezach@rr-wfm.com>
2023-05-01 12:38:10 +02:00
..
2023-02-15 10:54:39 +01:00
2023-05-01 12:38:10 +02:00
2023-04-25 15:53:19 +00:00
2023-05-01 12:38:10 +02:00
2023-05-01 12:38:10 +02:00

Octopus Deploy Plugin

Welcome to the octopus-deploy plugin!

Features

  • Display the deployment status of the most recent releases for a project in Octopus Deploy straight from the Backstage catalog

Getting started

This plugin (currently) uses the Backstage proxy to securely communicate with the Octopus Deploy API.

To use it, you will need to generate an API Key within Octopus Deploy.

  1. Add the following to your app-config.yaml to enable the proxy:
// app-config.yaml
proxy:
  '/octopus-deploy':
    target: '<your-octopus-server-url>'
    headers:
      X-Octopus-ApiKey: ${OCTOPUS_API_KEY}
  1. Add the following to EntityPage.tsx to display Octopus Releases
// In packages/app/src/components/catalog/EntityPage.tsx
import {
  isOctopusDeployAvailable
  EntityOctopusDeployContent
} from '@backstage/plugin-octopus-deploy';

const cicdContent = (
    <EntitySwitch>
      {/* other components... */}
      <EntitySwitch.Case if={isOctopusDeployAvailable}>
        <EntityOctopusDeployContent defaultLimit={25} />
      </EntitySwitch.Case>
    </EntitySwitch>
)
  1. Add octopus.com/project-id and optionally an octopus.com/space-id annotation in the catalog descriptor file.

To obtain a projects ID you will have to query the Octopus API. You can get the space ID from the projects URL in the octopus deploy UI. In the future we'll add support for using a projects slug as well.

// catalog-info.yaml
apiVersion: backstage.io/v1alpha1
kind: Component
metadata:
  # ...
  annotations:
    octopus.com/project-id: Projects-102
spec:
  type: service

All set, you will be able to see the plugin in action!