Update plugin to support different Build locations. Update changeset and ReadMe.

Signed-off-by: PurseChicken <chris@tschantz.name>
This commit is contained in:
PurseChicken
2023-11-27 11:36:48 -08:00
parent 568121143a
commit 8745a6fa8a
11 changed files with 99 additions and 9 deletions
+20 -1
View File
@@ -64,7 +64,7 @@ const cicdContent = (
### Add annotation(s) to your component-info.yaml file
Any component, that you would like the Cloud Build Plugin to populate for, should include the following `cloudbuild-project-slug` annotation. This annotation sets the GCP project name to be used for pulling the cloud build details from.
Any component, that you would like the Cloud Build Plugin to populate for, should include the following `cloudbuild-project-slug` annotation. This annotation sets the GCP project name to be used for pulling the Cloud Build details from.
```diff
// component-info.yaml
@@ -82,6 +82,8 @@ spec:
By default, the cloud build results list is filtered by repository name equal to the name you have set in your component-info.yaml file. This is `metadata.name`. So if your metadata.name is `backstage` then it will only show builds matching the backstage repo name.
Additionally, build results are pulled from the `global` region by default.
#### Change Filtering
If you need the page to be filtered on a different repository name, then you can use the following annotation:
@@ -119,3 +121,20 @@ spec:
```
`Note:` The `cloudbuild-repo-name` annotation takes precedence over the `cloudbuild-trigger-name` annotation. So if you happen to use both annotations, cloudbuild-repo-name will be used. It is recommended to use one or the other if required.
If you need to pull Cloud Build results from a location or region other than the global scope, then use the following annotation:
```diff
// component-info.yaml
apiVersion: backstage.io/v1alpha1
kind: Component
metadata:
name: backstage
description: Backstage application.
annotations:
google.com/cloudbuild-project-slug: your-project-name
+ google.com/cloudbuild-location: us-central1
spec:
type: website
lifecycle: development
```