f326c2ee1e
* 'master' of github.com:spotify/backstage: (30 commits) fix(techdocs-core): use the content of the readme as long description for the pypi package (#2578) chore: add contrib to CONTRIBUTING.md (#2585) Fix typo (#2584) backend-common: default config env to development v0.1.1-alpha.23 TechDocs: Inject CSS transformer and initial backstage style integration for reader (#2560) bug(gql): use import to import the graphql module Rename file [blog] Announce CNCF Sandbox (#2568) document cleaning - tutorial quickstarts (#2520) Simplify codecov flag names chore(scaffolder-backend): typo in visibility Kubernetes plugins boilerplate (#2559) CHANGELOG: add entry for SessionApi refactor Upload package specific code coverage to codecov Add codecov flags for core and core-api packages TechDocs: Enable allowVulnerableTags in sanitize-html (#2554) chore: trust the Boolean :) docs: regenerate api reference docs core: refactor SessionStateApi to SessionApi with sign-in/out ...
Jenkins Plugin (Alpha)
Website: https://jenkins.io/
Setup
- If you have a standalone app (you didn't clone this repo), then do
yarn add @backstage/plugin-jenkins
- Add plugin:
// packages/app/src/plugins.ts
export { plugin as Jenkins } from '@backstage/plugin-jenkins';
- Add proxy configuration to
app-config.yaml
proxy:
'/jenkins/api':
target: 'http://localhost:8080' # your Jenkins URL
changeOrigin: true
headers:
Authorization:
$secret:
env: JENKINS_BASIC_AUTH_HEADER
pathRewrite:
'^/proxy/jenkins/api/': '/'
- Add an environment variable which contains the Jenkins credentials, (note: use an API token not your password)
HEADER=$(echo -n user:api-token | base64)
export JENKINS_BASIC_AUTH_HEADER="Basic $HEADER"
- Run app with
yarn start - Add the Jenkins folder annotation to your
component-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/job-name'
spec:
type: service
lifecycle: experimental
owner: your-name
-
Register your component
-
Click the component in the catalog you should now see Jenkins builds, and a last build result for your master build.
Features
- View all runs inside a folder
- Last build status for specified branch
- View summary of a build
Limitations
- Only works with projects that use the Git SCM
- It requires jobs to be organised into folders
- No pagination support currently - don't run this on a Jenkins with lots of builds