npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@fabz26/plugin-octopus-deploy

v0.2.21

Published

Welcome to the octopus-deploy plugin!

Downloads

386

Readme

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

Installing

To get started, first install the plugin with the following command:

# From your Backstage root directory
yarn --cwd packages/app add @backstage-community/plugin-octopus-deploy

Setup

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.

Add the following to your app-config.yaml to enable the proxy:

// app-config.yaml
proxy:
  endpoints:
    '/octopus-deploy':
      target: 'https://<your-octopus-server-instance>/api'
      headers:
        X-Octopus-ApiKey: ${OCTOPUS_API_KEY}

Optionally, also add the following section to your app-config.yaml if you wish to enable linking to the Project Release page in the Octopus Deploy UI from the footer of the Backstage Release Table. Typically this will be the server URL above without the /api postfix.

octopusdeploy:
  webBaseUrl: "<your-octopus-web-url>"

Adding the Entities

Add the following to EntityPage.tsx to display Octopus Releases

// In packages/app/src/components/catalog/EntityPage.tsx
import {
  isOctopusDeployAvailable,
  EntityOctopusDeployContent
} from '@backstage-community/plugin-octopus-deploy';

const cicdContent = (
    <EntitySwitch>
      {/* other components... */}
      <EntitySwitch.Case if={isOctopusDeployAvailable}>
        <EntityOctopusDeployContent defaultLimit={25} />
      </EntitySwitch.Case>
    </EntitySwitch>
)

Add octopus.com/project-id annotation in the catalog descriptor file.

To obtain a projects ID you will have to query the Octopus API. 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

If your project is not part of the default space you can add the space ID to the annotation as a prefix. For example:

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

You can get the ID of the space from the URL in the Octopus Deploy UI.

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

Adding Scaffolder field extensions

To add the Octopus Deploy custom fields extensions, add the following to your App.tsx:

// In packages/app/src/App.tsx
import { OctopusDeployDropdownFieldExtension } from '@backstage-community/plugin-octopus-deploy';
const routes = (
  <FlatRoutes>
    ...
    <Route path="/create" element={<ScaffolderPage />}>
      <ScaffolderFieldExtensions>
        <OctopusDeployDropdownFieldExtension />
      </ScaffolderFieldExtensions>
    </Route>
    ...
  </FlatRoutes>

To use the Octopus Deploy custom field extensions, add the following to your template.yaml:

# In the template.yaml
apiVersion: scaffolder.backstage.io/v1beta3
kind: Template
metadata:
  # ...
  parameters:
    - title: Octopus Project Group
      properties:
        projectName:
          title: Octopus Project Group
          type: string
          ui:field: OctopusDeployProjectGroupDropdown