Files
backstage/plugins/jenkins
dependabot[bot] d3b6c6c12a chore(deps): bump msw from 0.21.2 to 0.29.0
Bumps [msw](https://github.com/mswjs/msw) from 0.21.2 to 0.29.0.
- [Release notes](https://github.com/mswjs/msw/releases)
- [Changelog](https://github.com/mswjs/msw/blob/master/CHANGELOG.md)
- [Commits](https://github.com/mswjs/msw/compare/v0.21.2...v0.29.0)

---
updated-dependencies:
- dependency-name: msw
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-06-23 04:45:44 +00:00
..
2021-06-18 20:26:42 +02:00
2021-06-22 10:07:18 +02:00
2021-06-17 08:08:44 +00:00
2021-05-02 22:13:05 +02:00

Jenkins Plugin (Alpha)

Website: https://jenkins.io/

Last master build Folder results Build details

Setup

  1. If you have a standalone app (you didn't clone this repo), then do
# From your Backstage root directory
cd packages/app
yarn add @backstage/plugin-jenkins
  1. Add the EntityJenkinsContent extension to the entity page in the app:
// In packages/app/src/components/catalog/EntityPage.tsx
import { EntityJenkinsContent } from '@backstage/plugin-jenkins';

// You can add the tab to any number of pages, the service page is shown as an
// example here
const serviceEntityPage = (
  <EntityLayout>
    {/* other tabs... */}
    <EntityLayout.Route path="/jenkins" title="Jenkins">
      <EntityJenkinsContent />
    </EntityLayout.Route>
  1. Add proxy configuration to app-config.yaml
proxy:
  '/jenkins/api':
    target: 'http://localhost:8080' # your Jenkins URL
    changeOrigin: true
    headers:
      Authorization: Basic ${JENKINS_BASIC_AUTH_HEADER}
  1. Add an environment variable which contains the Jenkins credentials (NOTE: use an API token, not your password). Here user is the name of the user created in Jenkins.
export JENKINS_BASIC_AUTH_HEADER=$(echo -n user:api-token | base64)
  1. Run the app with yarn start

  2. Add the Jenkins folder annotation to your catalog-info.yaml, (NOTE: currently this plugin only supports folders and Git SCM)

apiVersion: backstage.io/v1alpha1
kind: Component
metadata:
  name: 'your-component'
  description: 'a description'
  annotations:
    jenkins.io/github-folder: 'folder-name/project-name'
spec:
  type: service
  lifecycle: experimental
  owner: your-name
  1. Register your component

  2. Click the component in the catalog. You should now see Jenkins builds, and a last build result for your master build.

Note: If you are not using environment variables, you can directly type the API token into app-config.yaml.

proxy:
  '/jenkins/api':
    target: 'http://localhost:8080' # your Jenkins URL
    changeOrigin: true
    headers:
      Authorization: Basic YWRtaW46MTFlYzI1NmU0Mzg1MDFjM2Y1Yzc2Yjc1MWE3ZTQ3YWY4Mw==

The string starting with YWR... is the base64 encoding of the user and their API token, e.g. admin:11ec256e438501c3f5c76b751a7e47af83.

Features

  • View all runs inside a folder
  • Last build status for specified branch
  • View summary of a build

Limitations

  • Only works with organization folder projects backed by GitHub
  • No pagination support currently, limited to 50 projects - don't run this on a Jenkins instance with lots of builds