diff --git a/plugins/jenkins-backend/README.md b/plugins/jenkins-backend/README.md index 7a1bd3b6fa..308b911257 100644 --- a/plugins/jenkins-backend/README.md +++ b/plugins/jenkins-backend/README.md @@ -1,12 +1,12 @@ # Jenkins Plugin (Alpha) -Welcome to the jenkins backend plugin! Website: [https://jenkins.io/](https://jenkins.io/) +Welcome to the Jenkins backend plugin! Website: [https://jenkins.io/](https://jenkins.io/) -This is the backend half of the 2 jenkins plugins and is responsible for: +This is the backend half of the 2 Jenkins plugins and is responsible for: -- finding an appropriate instance of jenkins for an entity +- finding an appropriate instance of Jenkins for an entity - finding the appropriate job(s) on that instance for an entity -- connecting to jenkins and gathering data to present to the frontend +- connecting to Jenkins and gathering data to present to the frontend ## Integrating into a backstage instance @@ -39,13 +39,13 @@ export default async function createPlugin({ } ``` -This plugin must be provided with a JenkinsInfoProvider, this is a strategy object for finding the jenkins instance and job for an entity. +This plugin must be provided with a JenkinsInfoProvider, this is a strategy object for finding the Jenkins instance and job for an entity. There is a standard one provided, but the Integrator is free to build their own. ### DefaultJenkinsInfoProvider -Allows configuration of either a single or multiple global jenkins instances and annotating entities with the job name on that instance (and optionally the name of the instance). +Allows configuration of either a single or multiple global Jenkins instances and annotating entities with the job name on that instance (and optionally the name of the instance). #### Example - Single global instance @@ -121,7 +121,7 @@ jenkins: ### Custom JenkinsInfoProvider -An example of a bespoke JenkinsInfoProvider which uses an organisation specific annotation to look up the jenkins info (including jobName): +An example of a bespoke JenkinsInfoProvider which uses an organisation specific annotation to look up the Jenkins info (including jobName): ```typescript class AcmeJenkinsInfoProvider implements JenkinsInfoProvider { diff --git a/plugins/jenkins/README.md b/plugins/jenkins/README.md index 62bc60d443..1af511b16f 100644 --- a/plugins/jenkins/README.md +++ b/plugins/jenkins/README.md @@ -16,24 +16,47 @@ cd packages/app yarn add @backstage/plugin-jenkins ``` -2. Add and configure tha backend plugin according to it's instructions +2. Add and configure the backend plugin according to it's instructions -3. Add the `EntityJenkinsContent` extension to the cicd page and `EntityLatestJenkinsRunCard` to the entity page in the app: +3. Add the `EntityJenkinsContent` extension to the `CI/CD` page and `EntityLatestJenkinsRunCard` to the `overview` page in the app (or wherever you'd prefer): Note that if you configured a custom JenkinsInfoProvider in step 2, you may need a custom isJenkinsAvailable. ```tsx // In packages/app/src/components/catalog/EntityPage.tsx -import { EntityJenkinsContent } from '@backstage/plugin-jenkins'; +import { + EntityJenkinsContent, + EntityLatestJenkinsRunCard, + isJenkinsAvailable, +} 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 = ( - {/* other tabs... */} - - + + {/* ... */} + + + + + + + {/* ... */} + + {/* other tabs... */} + + + + + + {/* ... */} + + + {/* ... */} + +); ``` 4. Run app with `yarn start`