Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@harnessio/backstage-plugin-ci-cd

Package Overview
Dependencies
Maintainers
3
Versions
21
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@harnessio/backstage-plugin-ci-cd

Website: [https://harness.io/](https://harness.io/)

  • 0.1.9
  • npm
  • Socket score

Version published
Weekly downloads
768
increased by2.4%
Maintainers
3
Weekly downloads
 
Created
Source

Harness NextGen CI/CD plugin

Website: https://harness.io/

Welcome to the Harness NextGen CI/CD plugin for Backstage!

Screenshots

Getting started

Setup steps

  1. If you have a standalone app(you didn't clone this repo), then do
# From your Backstage root directory
yarn add --cwd packages/app @harnessio/backstage-plugin-ci-cd
yarn install
  1. Configure proxy for harness in app-config.yaml under proxy config. Add your Harness Personal Access Token or Service Account Token for x-api-key (see the Harness docs )
# In app-config.yaml

proxy:
  # ...
  '/harness':
    target: 'https://app.harness.io/'
    headers:
      'x-api-key': '<YOUR PAT/SAT>'
# ...

Note: Plugin uses token configured here to make Harness API calls. Make sure this token has the necessary permissions.

  1. Inside your EntityPage.tsx, update the cicdContent to render <EntityHarnessCiCdContent /> whenever service is using Harness CI/CD. Example below
// In packages/app/src/components/catalog/EntityPage.tsx

import {
  isHarnessCiCdAvailable,
  EntityHarnessCiCdContent,
} from '@harnessio/backstage-plugin-ci-cd';

const cicdContent = (
  // ...
  <EntitySwitch.Case if={isHarnessCiCdAvailable}>
    <EntityHarnessCiCdContent />
  </EntitySwitch.Case>
  // ...
);

Note: If you have separate providers for CI and CD apart from Harness, you need to add a new tab for Harness CI/CD plugin like below instead of replacing your existing CI/CD tab mentioned in above block.

// In packages/app/src/components/catalog/EntityPage.tsx

import {
  isHarnessCiCdAvailable,
  EntityHarnessCiCdContent,
} from '@harnessio/backstage-plugin-ci-cd';

const serviceEntityPage = (
  // ...
  <EntityLayout.Route
    path="/harness-ci-cd"
    title="Harness CI/CD"
    if={isHarnessCiCdAvailable}
  >
    <EntityHarnessCiCdContent />
  </EntityLayout.Route>
  // ...
);
  1. (Optional) Configure baseUrl for harness in app-config.yaml

This step is optional. The default value of harness.baseUrl is https://app.harness.io/

# In app-config.yaml

harness:
  baseUrl: https://app.harness.io/
  1. Add required harness specific annotations to your respective catalog-info.yaml files, (example: https://github.com/harness/backstage-plugins/blob/main/examples/catalog-harness-cicd.yaml)
apiVersion: backstage.io/v1alpha1
kind: Component
metadata:
  # ...
  annotations:
    # mandatory annotations
    harness.io/project-url: <harness_project_url>

    # optional annotations
    harness.io/ci-pipelineIds: <pipelineId1,pipelineId2,pipelineId3 etc>
    harness.io/cd-serviceId: <serviceId>
spec:
  type: service
  # ...

Note: Refer to this page on how to get these values from your Harness account.

Features

  • List top 50 pipeline executions for a configured project/pipelineIds/serviceId
  • Pipeline execution status
  • Retry pipeline execution
  • Pagination for builds
  • Works for both personal access tokens and service account token

FAQs

Package last updated on 07 Dec 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc