Minor composability etc docs changes

Signed-off-by: Fredrik Adelöw <freben@gmail.com>
This commit is contained in:
Fredrik Adelöw
2021-05-02 22:13:05 +02:00
parent 2e506a571c
commit b99ac3f6e1
39 changed files with 216 additions and 220 deletions
+23 -17
View File
@@ -11,25 +11,25 @@ Website: [https://jenkins.io/](https://jenkins.io/)
1. If you have a standalone app (you didn't clone this repo), then do
```bash
# From your Backstage root directory
cd packages/app
yarn add @backstage/plugin-jenkins
```
2. Add the `EntityJenkinsContent` extension to the entity page in the app:
```tsx
// packages/app/src/components/catalog/EntityPage.tsx
import { EntityJenkinsContent } from '@backstage/plugin-circleci';
// 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 = (
<EntityPageLayout>
...
<EntityLayout>
{/* other tabs... */}
<EntityLayout.Route path="/jenkins" title="Jenkins">
<EntityJenkinsContent />
</EntityLayout.Route>
...
</EntityPageLayout>
);
```
3. Add proxy configuration to `app-config.yaml`
@@ -43,14 +43,18 @@ proxy:
Authorization: Basic ${JENKINS_BASIC_AUTH_HEADER}
```
4. 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.
4. 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.
```shell
export JENKINS_BASIC_AUTH_HEADER=$(echo -n user:api-token | base64)
```
5. Run app with `yarn start`
6. Add the Jenkins folder annotation to your `catalog-info.yaml`, (note: currently this plugin only supports folders and Git SCM)
5. Run the app with `yarn start`
6. Add the Jenkins folder annotation to your `catalog-info.yaml`, (NOTE:
currently this plugin only supports folders and Git SCM)
```yaml
apiVersion: backstage.io/v1alpha1
@@ -68,11 +72,11 @@ spec:
7. Register your component
8. Click the component in the catalog you should now see Jenkins builds, and a last build result for your master build.
8. 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 variable then you can directly type API token in app-config.yaml
Note: If you are not using environment variables, you can directly type the API
token into `app-config.yaml`.
```yaml
proxy:
@@ -83,7 +87,8 @@ proxy:
Authorization: Basic YWRtaW46MTFlYzI1NmU0Mzg1MDFjM2Y1Yzc2Yjc1MWE3ZTQ3YWY4Mw==
```
YWRtaW46MTFlYzI1NmU0Mzg1MDFjM2Y1Yzc2Yjc1MWE3ZTQ3YWY4Mw== is the base64 of user and it's API token e.g. admin:11ec256e438501c3f5c76b751a7e47af83
The string starting with `YWR...` is the base64 encoding of the user and their
API token, e.g. `admin:11ec256e438501c3f5c76b751a7e47af83`.
## Features
@@ -94,4 +99,5 @@ YWRtaW46MTFlYzI1NmU0Mzg1MDFjM2Y1Yzc2Yjc1MWE3ZTQ3YWY4Mw== is the base64 of user a
## 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 with lots of builds
- No pagination support currently, limited to 50 projects - don't run this on a
Jenkins instance with lots of builds