From 8daab3651fec03aede08616c26db09ca330d0899 Mon Sep 17 00:00:00 2001 From: Tim Jacomb Date: Mon, 7 Sep 2020 15:01:41 +0100 Subject: [PATCH] Rename Jenkins annotation --- docs/features/software-catalog/well-known-annotations.md | 4 ++-- .../components/EntityPageOverview/EntityPageOverview.tsx | 8 ++------ plugins/jenkins/README.md | 2 +- .../JenkinsPluginWidget/JenkinsBuildsWidget.tsx | 2 +- .../JenkinsPluginWidget/JenkinsLastBuildWidget.tsx | 2 +- 5 files changed, 7 insertions(+), 11 deletions(-) diff --git a/docs/features/software-catalog/well-known-annotations.md b/docs/features/software-catalog/well-known-annotations.md index 18de63d704..d6e81e639f 100644 --- a/docs/features/software-catalog/well-known-annotations.md +++ b/docs/features/software-catalog/well-known-annotations.md @@ -51,13 +51,13 @@ The value of this annotation is a location reference string (see above). If this annotation is specified, it is expected to point to a repository that the TechDocs system can read and generate docs from. -### backstage.io/jenkins-github-folder +### jenkins.io/github-folder ```yaml # Example: metadata: annotations: - backstage.io/jenkins-github-folder: folder-name/job-name + jenkins.io/github-folder: folder-name/job-name ``` The value of this annotation is the path to a job on Jenkins, that builds this diff --git a/plugins/catalog/src/components/EntityPageOverview/EntityPageOverview.tsx b/plugins/catalog/src/components/EntityPageOverview/EntityPageOverview.tsx index c43e83edaa..7f19728780 100644 --- a/plugins/catalog/src/components/EntityPageOverview/EntityPageOverview.tsx +++ b/plugins/catalog/src/components/EntityPageOverview/EntityPageOverview.tsx @@ -36,16 +36,12 @@ export const EntityPageOverview: FC<{ entity: Entity }> = ({ entity }) => { - {entity.metadata?.annotations?.[ - 'backstage.io/jenkins-github-folder' - ] && ( + {entity.metadata?.annotations?.['jenkins.io/github-folder'] && ( )} - {entity.metadata?.annotations?.[ - 'backstage.io/jenkins-github-folder' - ] && ( + {entity.metadata?.annotations?.['jenkins.io/github-folder'] && ( diff --git a/plugins/jenkins/README.md b/plugins/jenkins/README.md index a911704dc4..3e721c5e7a 100644 --- a/plugins/jenkins/README.md +++ b/plugins/jenkins/README.md @@ -63,7 +63,7 @@ metadata: name: 'your-component' description: 'a description' annotations: - backstage.io/jenkins-github-folder: 'folder-name/job-name' + jenkins.io/github-folder: 'folder-name/job-name' spec: type: service lifecycle: experimental diff --git a/plugins/jenkins/src/components/JenkinsPluginWidget/JenkinsBuildsWidget.tsx b/plugins/jenkins/src/components/JenkinsPluginWidget/JenkinsBuildsWidget.tsx index 469869af69..12eaf5653b 100644 --- a/plugins/jenkins/src/components/JenkinsPluginWidget/JenkinsBuildsWidget.tsx +++ b/plugins/jenkins/src/components/JenkinsPluginWidget/JenkinsBuildsWidget.tsx @@ -20,7 +20,7 @@ import { Entity } from '@backstage/catalog-model'; export const JenkinsBuildsWidget = ({ entity }: { entity: Entity }) => { const [owner, repo] = ( - entity?.metadata.annotations?.['backstage.io/jenkins-github-folder'] ?? '/' + entity?.metadata.annotations?.['jenkins.io/github-folder'] ?? '/' ).split('/'); return ; diff --git a/plugins/jenkins/src/components/JenkinsPluginWidget/JenkinsLastBuildWidget.tsx b/plugins/jenkins/src/components/JenkinsPluginWidget/JenkinsLastBuildWidget.tsx index 9bd16bf9e6..6731808d8e 100644 --- a/plugins/jenkins/src/components/JenkinsPluginWidget/JenkinsLastBuildWidget.tsx +++ b/plugins/jenkins/src/components/JenkinsPluginWidget/JenkinsLastBuildWidget.tsx @@ -68,7 +68,7 @@ export const JenkinsLastBuildWidget = ({ branch: string; }) => { const [owner, repo] = ( - entity?.metadata.annotations?.['backstage.io/jenkins-github-folder'] ?? '/' + entity?.metadata.annotations?.['jenkins.io/github-folder'] ?? '/' ).split('/'); const [{ loading, value }] = useBuilds(owner, repo, branch);