From 8312cf4d5c72d1115b78a528e5dd978059c94650 Mon Sep 17 00:00:00 2001 From: Bogdan Christescu Date: Thu, 16 Feb 2023 21:28:20 +0100 Subject: [PATCH 01/23] added test case for gitlab repository located in a subgroup Signed-off-by: Bogdan Christescu --- .../src/ReportIssue/IssueLink.test.tsx | 46 ++++++++++++++++--- 1 file changed, 40 insertions(+), 6 deletions(-) diff --git a/plugins/techdocs-module-addons-contrib/src/ReportIssue/IssueLink.test.tsx b/plugins/techdocs-module-addons-contrib/src/ReportIssue/IssueLink.test.tsx index 5fff56ecb7..9a34fcf011 100644 --- a/plugins/techdocs-module-addons-contrib/src/ReportIssue/IssueLink.test.tsx +++ b/plugins/techdocs-module-addons-contrib/src/ReportIssue/IssueLink.test.tsx @@ -26,7 +26,7 @@ import { import { IssueLink } from './IssueLink'; -const defaultProps = { +const defaultGithubProps = { repository: { type: 'github', name: 'backstage', @@ -40,14 +40,28 @@ const defaultProps = { }, }; +const defaultGitlabProps = { + repository: { + type: 'gitlab', + name: 'backstageSubgroup/backstage', + owner: 'backstage', + protocol: 'https', + resource: 'gitlab.com', + }, + template: { + title: 'Documentation feedback', + body: '## Documentation Feedback 📝', + }, +}; + describe('FeedbackLink', () => { const apiSpy = new MockAnalyticsApi(); - it('Should open new issue tab', () => { + it('Should open new Github issue tab', () => { render( wrapInTestApp( - + , ), ); @@ -55,19 +69,39 @@ describe('FeedbackLink', () => { const link = screen.getByText(/Open new Github issue/); expect(link).toBeInTheDocument(); expect(link).toHaveAttribute('target', '_blank'); - const encodedTitle = encodeURIComponent(defaultProps.template.title); - const encodedBody = encodeURIComponent(defaultProps.template.body); + const encodedTitle = encodeURIComponent(defaultGithubProps.template.title); + const encodedBody = encodeURIComponent(defaultGithubProps.template.body); expect(link).toHaveAttribute( 'href', `https://github.com/backstage/backstage/issues/new?title=${encodedTitle}&body=${encodedBody}`, ); }); + it('Should open new Gitlab issue tab', () => { + render( + wrapInTestApp( + + + , + ), + ); + + const link = screen.getByText(/Open new Gitlab issue/); + expect(link).toBeInTheDocument(); + expect(link).toHaveAttribute('target', '_blank'); + const encodedTitle = encodeURIComponent(defaultGithubProps.template.title); + const encodedBody = encodeURIComponent(defaultGithubProps.template.body); + expect(link).toHaveAttribute( + 'href', + `https://gitlab.com/backstage/backstageSubgroup/backstage/issues/new?issue[title]=${encodedTitle}&issue[description]=${encodedBody}`, + ); + }); + it('Should track click events', async () => { render( wrapInTestApp( - + , ), ); From 6afd63fcdbf9077790015daf6f2fae1ef739c885 Mon Sep 17 00:00:00 2001 From: Bogdan Christescu Date: Thu, 16 Feb 2023 21:30:01 +0100 Subject: [PATCH 02/23] encode the whole url instead of encoding name and owner separately Signed-off-by: Bogdan Christescu --- .../src/ReportIssue/IssueLink.tsx | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/plugins/techdocs-module-addons-contrib/src/ReportIssue/IssueLink.tsx b/plugins/techdocs-module-addons-contrib/src/ReportIssue/IssueLink.tsx index bb2de22350..eb16476fa6 100644 --- a/plugins/techdocs-module-addons-contrib/src/ReportIssue/IssueLink.tsx +++ b/plugins/techdocs-module-addons-contrib/src/ReportIssue/IssueLink.tsx @@ -59,14 +59,13 @@ const getUrl = (repository: Repository, template: ReportIssueTemplate) => { const encodedTitle = encodeURIComponent(title); const encodedBody = encodeURIComponent(body); const { protocol, resource, owner, name, type } = repository; - const encodedOwner = encodeURIComponent(owner); - const encodedName = encodeURIComponent(name); - const url = `${protocol}://${resource}/${encodedOwner}/${encodedName}`; + const url = `${protocol}://${resource}/${owner}/${name}`; + const encodedUrl = encodeURI(url); if (type === 'github') { - return `${url}/issues/new?title=${encodedTitle}&body=${encodedBody}`; + return `${encodedUrl}/issues/new?title=${encodedTitle}&body=${encodedBody}`; } - return `${url}/issues/new?issue[title]=${encodedTitle}&issue[description]=${encodedBody}`; + return `${encodedUrl}/issues/new?issue[title]=${encodedTitle}&issue[description]=${encodedBody}`; }; export const IssueLink = ({ template, repository }: IssueLinkProps) => { From 37cf85fb85cd85d328fa1f5d57dcfc285642a7bd Mon Sep 17 00:00:00 2001 From: Bogdan Christescu Date: Thu, 16 Feb 2023 21:56:14 +0100 Subject: [PATCH 03/23] changeset Signed-off-by: Bogdan Christescu --- .changeset/unlucky-sloths-explain.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .changeset/unlucky-sloths-explain.md diff --git a/.changeset/unlucky-sloths-explain.md b/.changeset/unlucky-sloths-explain.md new file mode 100644 index 0000000000..3d5f963a73 --- /dev/null +++ b/.changeset/unlucky-sloths-explain.md @@ -0,0 +1,5 @@ +--- +'@backstage/plugin-techdocs-module-addons-contrib': patch +--- + +Fixed bug in IssueLink component where the URL was not generated properly when the repository was located inside a Gitlab subgroup From 5a2ad3b021f20078bc20d9e6ff0be4e90b6d3ada Mon Sep 17 00:00:00 2001 From: Bren Date: Tue, 21 Feb 2023 15:27:35 +0000 Subject: [PATCH 04/23] Update README.md Typo in the plugin name. Router is not needed. Signed-off-by: Bren --- plugins/lighthouse-backend/README.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/plugins/lighthouse-backend/README.md b/plugins/lighthouse-backend/README.md index 8ae737725c..2c648754b3 100644 --- a/plugins/lighthouse-backend/README.md +++ b/plugins/lighthouse-backend/README.md @@ -8,13 +8,12 @@ Lighthouse Backend allows you to run scheduled lighthouse Tests for each Website ```bash # From your Backstage root directory -yarn add --cwd packages/backend @backstage/lighthouse-backend +yarn add --cwd packages/backend @backstage/plugin-lighthouse-backend ``` 2. Create a `lighthouse.ts` file inside `packages/backend/src/plugins/`: ```typescript -import { Router } from 'express'; import { createScheduler } from '@backstage/plugin-lighthouse-backend'; import { PluginEnvironment } from '../types'; import { CatalogClient } from '@backstage/catalog-client'; From b8e6b05214ad908eb58b7de1d14ab9acc5309813 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Wed, 22 Feb 2023 14:32:06 +0000 Subject: [PATCH 05/23] chore(deps): update docker/build-push-action action to v4 Signed-off-by: Renovate Bot --- .github/workflows/deploy_docker-image.yml | 2 +- .github/workflows/uffizzi-build.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/deploy_docker-image.yml b/.github/workflows/deploy_docker-image.yml index d45cc557d5..60affcb328 100644 --- a/.github/workflows/deploy_docker-image.yml +++ b/.github/workflows/deploy_docker-image.yml @@ -50,7 +50,7 @@ jobs: uses: docker/setup-buildx-action@v2 - name: Build and push - uses: docker/build-push-action@v3 + uses: docker/build-push-action@v4 with: context: './example-app' file: ./example-app/packages/backend/Dockerfile diff --git a/.github/workflows/uffizzi-build.yml b/.github/workflows/uffizzi-build.yml index 30a3489264..d8776d74c7 100644 --- a/.github/workflows/uffizzi-build.yml +++ b/.github/workflows/uffizzi-build.yml @@ -58,7 +58,7 @@ jobs: tags: type=raw,value=60d - name: Build Image - uses: docker/build-push-action@v3 + uses: docker/build-push-action@v4 with: context: . file: packages/backend/Dockerfile From 46829bc2f0e4734f328b31350b67f7e3e9da4242 Mon Sep 17 00:00:00 2001 From: Bren Date: Wed, 22 Feb 2023 15:36:38 +0000 Subject: [PATCH 06/23] Adding first Changeset Changeset as requested by @freben https://github.com/backstage/backstage/pull/16504#issuecomment-1439818937 Signed-off-by: Bren --- .changeset/rich-clocks-approve.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .changeset/rich-clocks-approve.md diff --git a/.changeset/rich-clocks-approve.md b/.changeset/rich-clocks-approve.md new file mode 100644 index 0000000000..319a8a7c9c --- /dev/null +++ b/.changeset/rich-clocks-approve.md @@ -0,0 +1,5 @@ +--- +'@backstage/plugin-lighthouse-backend': patch +--- + +Update README.md; typo with plugin name & removed unneeded "import { Router } from 'express';" From af1095f1e1160080f5b00c544d725821603f56fb Mon Sep 17 00:00:00 2001 From: Andreas Berger Date: Wed, 22 Feb 2023 16:52:58 +0100 Subject: [PATCH 07/23] Deprecate config key `branch` of GitlabDiscoveryEntityProvider in favor of new key `fallbackBranch` relates #13587, #16502 Signed-off-by: Andreas Berger --- .changeset/silver-lies-rest.md | 6 ++++++ docs/integrations/gitlab/discovery.md | 2 +- plugins/catalog-backend-module-gitlab/src/lib/types.ts | 10 +++++++++- .../src/providers/GitlabDiscoveryEntityProvider.ts | 10 +++++++--- .../src/providers/config.test.ts | 6 +++--- .../src/providers/config.ts | 7 +++++-- 6 files changed, 31 insertions(+), 10 deletions(-) create mode 100644 .changeset/silver-lies-rest.md diff --git a/.changeset/silver-lies-rest.md b/.changeset/silver-lies-rest.md new file mode 100644 index 0000000000..76fdba0b43 --- /dev/null +++ b/.changeset/silver-lies-rest.md @@ -0,0 +1,6 @@ +--- +'@backstage/plugin-catalog-backend-module-gitlab': minor +--- + +The configuration key `branch` of the `GitlabDiscoveryEntityProvider` has been deprecated in favor of the configuration key `fallbackBranch`. +To migrate to the new configuration value, rename `branch` to `fallbackBranch`. diff --git a/docs/integrations/gitlab/discovery.md b/docs/integrations/gitlab/discovery.md index 9a065e776a..4c448d3892 100644 --- a/docs/integrations/gitlab/discovery.md +++ b/docs/integrations/gitlab/discovery.md @@ -21,7 +21,7 @@ catalog: gitlab: yourProviderId: host: gitlab-host # Identifies one of the hosts set up in the integrations - branch: main # Optional. Uses `master` as default + fallbackBranch: main # Optional. Fallback to be used if there is no default branch configured at the Gitlab repository. It is only used, if `branch` is undefined. Uses `master` as default group: example-group # Optional. Group and subgroup (if needed) to look for repositories. If not present the whole instance will be scanned entityFilename: catalog-info.yaml # Optional. Defaults to `catalog-info.yaml` projectPattern: '[\s\S]*' # Optional. Filters found projects based on provided patter. Defaults to `[\s\S]*`, which means to not filter anything diff --git a/plugins/catalog-backend-module-gitlab/src/lib/types.ts b/plugins/catalog-backend-module-gitlab/src/lib/types.ts index 2b2b888851..c3fc8a4ede 100644 --- a/plugins/catalog-backend-module-gitlab/src/lib/types.ts +++ b/plugins/catalog-backend-module-gitlab/src/lib/types.ts @@ -61,7 +61,15 @@ export type GitlabProviderConfig = { host: string; group: string; id: string; - branch: string; + /** + * @deprecated use `fallbackBranch` instead + */ + branch?: string; + /** + * If there is no default branch defined at the project, this fallback is used to discover catalog files. + * Defaults to: `master` + */ + fallbackBranch: string; catalogFile: string; projectPattern: RegExp; userPattern: RegExp; diff --git a/plugins/catalog-backend-module-gitlab/src/providers/GitlabDiscoveryEntityProvider.ts b/plugins/catalog-backend-module-gitlab/src/providers/GitlabDiscoveryEntityProvider.ts index 1cc818c811..1eafe2f637 100644 --- a/plugins/catalog-backend-module-gitlab/src/providers/GitlabDiscoveryEntityProvider.ts +++ b/plugins/catalog-backend-module-gitlab/src/providers/GitlabDiscoveryEntityProvider.ts @@ -177,11 +177,15 @@ export class GitlabDiscoveryEntityProvider implements EntityProvider { continue; } - if (this.config.branch === '*' && project.default_branch === undefined) { + if ( + this.config.fallbackBranch === '*' && + project.default_branch === undefined + ) { continue; } - const project_branch = project.default_branch ?? this.config.branch; + const project_branch = + project.default_branch ?? this.config.fallbackBranch; const projectHasFile: boolean = await client.hasFile( project.path_with_namespace ?? '', @@ -204,7 +208,7 @@ export class GitlabDiscoveryEntityProvider implements EntityProvider { } private createLocationSpec(project: GitLabProject): LocationSpec { - const project_branch = project.default_branch ?? this.config.branch; + const project_branch = project.default_branch ?? this.config.fallbackBranch; return { type: 'url', target: `${project.web_url}/-/blob/${project_branch}/${this.config.catalogFile}`, diff --git a/plugins/catalog-backend-module-gitlab/src/providers/config.test.ts b/plugins/catalog-backend-module-gitlab/src/providers/config.test.ts index e72c38e9d1..a7ab354354 100644 --- a/plugins/catalog-backend-module-gitlab/src/providers/config.test.ts +++ b/plugins/catalog-backend-module-gitlab/src/providers/config.test.ts @@ -50,7 +50,7 @@ describe('config', () => { expect(r).toStrictEqual({ id: 'test', group: 'group', - branch: 'master', + fallbackBranch: 'master', host: 'host', catalogFile: 'catalog-info.yaml', projectPattern: /[\s\S]*/, @@ -84,7 +84,7 @@ describe('config', () => { expect(r).toStrictEqual({ id: 'test', group: 'group', - branch: 'not-master', + fallbackBranch: 'not-master', host: 'host', catalogFile: 'custom-file.yaml', projectPattern: /[\s\S]*/, @@ -122,7 +122,7 @@ describe('config', () => { expect(r).toStrictEqual({ id: 'test', group: 'group', - branch: 'master', + fallbackBranch: 'master', host: 'host', catalogFile: 'catalog-info.yaml', projectPattern: /[\s\S]*/, diff --git a/plugins/catalog-backend-module-gitlab/src/providers/config.ts b/plugins/catalog-backend-module-gitlab/src/providers/config.ts index cd856f97da..e64ff14cdd 100644 --- a/plugins/catalog-backend-module-gitlab/src/providers/config.ts +++ b/plugins/catalog-backend-module-gitlab/src/providers/config.ts @@ -29,7 +29,10 @@ import { GitlabProviderConfig } from '../lib'; function readGitlabConfig(id: string, config: Config): GitlabProviderConfig { const group = config.getOptionalString('group') ?? ''; const host = config.getString('host'); - const branch = config.getOptionalString('branch') ?? 'master'; + const fallbackBranch = + config.getOptionalString('fallbackBranch') ?? + config.getOptionalString('branch') ?? + 'master'; const catalogFile = config.getOptionalString('entityFilename') ?? 'catalog-info.yaml'; const projectPattern = new RegExp( @@ -50,7 +53,7 @@ function readGitlabConfig(id: string, config: Config): GitlabProviderConfig { return { id, group, - branch, + fallbackBranch, host, catalogFile, projectPattern, From b271d5ca052a654ad7ac0d0326a69e6eed5b68f3 Mon Sep 17 00:00:00 2001 From: Thomas Camargo Date: Wed, 22 Feb 2023 16:28:14 -0700 Subject: [PATCH 08/23] [linguist-backend]: make kind configurable Signed-off-by: Thomas Camargo --- .changeset/witty-geckos-design.md | 5 ++++ plugins/linguist-backend/README.md | 8 ++++++ .../src/api/LinguistBackendApi.test.ts | 28 +++++++++++++++++++ .../src/api/LinguistBackendApi.ts | 12 +++++++- .../linguist-backend/src/service/router.ts | 4 ++- 5 files changed, 55 insertions(+), 2 deletions(-) create mode 100644 .changeset/witty-geckos-design.md create mode 100644 plugins/linguist-backend/src/api/LinguistBackendApi.test.ts diff --git a/.changeset/witty-geckos-design.md b/.changeset/witty-geckos-design.md new file mode 100644 index 0000000000..41f1a28081 --- /dev/null +++ b/.changeset/witty-geckos-design.md @@ -0,0 +1,5 @@ +--- +'@backstage/plugin-linguist-backend': minor +--- + +Allow kind to be configurable diff --git a/plugins/linguist-backend/README.md b/plugins/linguist-backend/README.md index cd63f5db03..a7c89d23b3 100644 --- a/plugins/linguist-backend/README.md +++ b/plugins/linguist-backend/README.md @@ -67,6 +67,14 @@ return createRouter({ schedule: schedule, batchSize: 40 }, { ...env }); **Note:** The default batch size is 20 +## Kind + +The default setup only processes entities of kind `['API', 'Component', 'Template']`. To control the `kind` that are processed provide that to the `createRouter` function in your `packages/backend/src/plugins/linguist.ts` like this: + +```ts +return createRouter({ schedule: schedule, kind: ['Component'] }, { ...env }); +``` + ## Refresh The default setup will only generate the language breakdown for entities with the linguist annotation that have not been generated yet. If you want this process to also refresh the data you can do so by adding the `age` (as a `HumanDuration`) in your `packages/backend/src/plugins/linguist.ts` when you call `createRouter`: diff --git a/plugins/linguist-backend/src/api/LinguistBackendApi.test.ts b/plugins/linguist-backend/src/api/LinguistBackendApi.test.ts new file mode 100644 index 0000000000..741d52e734 --- /dev/null +++ b/plugins/linguist-backend/src/api/LinguistBackendApi.test.ts @@ -0,0 +1,28 @@ +/* + * Copyright 2023 The Backstage Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +import { kindOrDefault } from './LinguistBackendApi'; + +describe('kindOrDefault', () => { + it('should return default kind when undefined', () => { + expect(kindOrDefault()).toEqual(['API', 'Component', 'Template']); + }); + it('should return the default kind when empty', () => { + expect(kindOrDefault([])).toEqual(['API', 'Component', 'Template']); + }); + it('should return provided kind when not empty', () => { + expect(kindOrDefault(['API'])).toEqual(['API']); + }); +}); diff --git a/plugins/linguist-backend/src/api/LinguistBackendApi.ts b/plugins/linguist-backend/src/api/LinguistBackendApi.ts index 105335b0ed..6a4cc0ea56 100644 --- a/plugins/linguist-backend/src/api/LinguistBackendApi.ts +++ b/plugins/linguist-backend/src/api/LinguistBackendApi.ts @@ -56,6 +56,7 @@ export class LinguistBackendApi { private readonly age?: HumanDuration; private readonly batchSize?: number; private readonly useSourceLocation?: boolean; + private readonly kind: string[]; public constructor( logger: Logger, store: LinguistBackendStore, @@ -65,6 +66,7 @@ export class LinguistBackendApi { age?: HumanDuration, batchSize?: number, useSourceLocation?: boolean, + kind?: string[], ) { this.logger = logger; this.store = store; @@ -75,6 +77,7 @@ export class LinguistBackendApi { this.batchSize = batchSize; this.age = age; this.useSourceLocation = useSourceLocation; + this.kind = kindOrDefault(kind); } public async getEntityLanguages(entityRef: string): Promise { @@ -99,7 +102,7 @@ export class LinguistBackendApi { : LINGUIST_ANNOTATION; const request: GetEntitiesRequest = { filter: { - kind: ['API', 'Component', 'Template'], + kind: this.kind, [`metadata.annotations.${annotationKey}`]: CATALOG_FILTER_EXISTS, }, fields: ['kind', 'metadata'], @@ -228,3 +231,10 @@ export class LinguistBackendApi { } } } + +export function kindOrDefault(kind?: string[]) { + if (!kind || kind.length === 0) { + return ['API', 'Component', 'Template']; + } + return kind; +} diff --git a/plugins/linguist-backend/src/service/router.ts b/plugins/linguist-backend/src/service/router.ts index 18c43d996a..66138f5ed2 100644 --- a/plugins/linguist-backend/src/service/router.ts +++ b/plugins/linguist-backend/src/service/router.ts @@ -38,6 +38,7 @@ export interface PluginOptions { age?: HumanDuration; batchSize?: number; useSourceLocation?: boolean; + kind?: string[]; } /** @public */ @@ -56,7 +57,7 @@ export async function createRouter( pluginOptions: PluginOptions, routerOptions: RouterOptions, ): Promise { - const { schedule, age, batchSize, useSourceLocation } = pluginOptions; + const { schedule, age, batchSize, useSourceLocation, kind } = pluginOptions; const { logger, reader, database, discovery, scheduler, tokenManager } = routerOptions; @@ -76,6 +77,7 @@ export async function createRouter( age, batchSize, useSourceLocation, + kind, ); if (scheduler && schedule) { From b2fce0b01e1a5adfe00aa0b9cfaa803f963e35c7 Mon Sep 17 00:00:00 2001 From: Andreas Berger Date: Thu, 23 Feb 2023 12:12:53 +0100 Subject: [PATCH 09/23] Add warn log if config key `branch` is used Signed-off-by: Andreas Berger --- .../GitlabDiscoveryEntityProvider.ts | 5 ++- .../GitlabOrgDiscoveryEntityProvider.ts | 5 ++- .../src/providers/config.test.ts | 15 ++++---- .../src/providers/config.ts | 34 +++++++++++++++---- 4 files changed, 45 insertions(+), 14 deletions(-) diff --git a/plugins/catalog-backend-module-gitlab/src/providers/GitlabDiscoveryEntityProvider.ts b/plugins/catalog-backend-module-gitlab/src/providers/GitlabDiscoveryEntityProvider.ts index 1eafe2f637..f0d88c34f5 100644 --- a/plugins/catalog-backend-module-gitlab/src/providers/GitlabDiscoveryEntityProvider.ts +++ b/plugins/catalog-backend-module-gitlab/src/providers/GitlabDiscoveryEntityProvider.ts @@ -61,7 +61,10 @@ export class GitlabDiscoveryEntityProvider implements EntityProvider { throw new Error('Either schedule or scheduler must be provided.'); } - const providerConfigs = readGitlabConfigs(config); + const providerConfigs = readGitlabConfigs( + config, + options.logger.child({ target: 'GitlabDiscoveryEntityProvider' }), + ); const integrations = ScmIntegrations.fromConfig(config).gitlab; const providers: GitlabDiscoveryEntityProvider[] = []; diff --git a/plugins/catalog-backend-module-gitlab/src/providers/GitlabOrgDiscoveryEntityProvider.ts b/plugins/catalog-backend-module-gitlab/src/providers/GitlabOrgDiscoveryEntityProvider.ts index f90a61f9e9..ad9d9dae79 100644 --- a/plugins/catalog-backend-module-gitlab/src/providers/GitlabOrgDiscoveryEntityProvider.ts +++ b/plugins/catalog-backend-module-gitlab/src/providers/GitlabOrgDiscoveryEntityProvider.ts @@ -72,7 +72,10 @@ export class GitlabOrgDiscoveryEntityProvider implements EntityProvider { throw new Error('Either schedule or scheduler must be provided.'); } - const providerConfigs = readGitlabConfigs(config); + const providerConfigs = readGitlabConfigs( + config, + options.logger.child({ target: 'GitlabOrgDiscoveryEntityProvider' }), + ); const integrations = ScmIntegrations.fromConfig(config).gitlab; const providers: GitlabOrgDiscoveryEntityProvider[] = []; diff --git a/plugins/catalog-backend-module-gitlab/src/providers/config.test.ts b/plugins/catalog-backend-module-gitlab/src/providers/config.test.ts index a7ab354354..c9b35e78c2 100644 --- a/plugins/catalog-backend-module-gitlab/src/providers/config.test.ts +++ b/plugins/catalog-backend-module-gitlab/src/providers/config.test.ts @@ -17,6 +17,9 @@ import { ConfigReader } from '@backstage/config'; import { Duration } from 'luxon'; import { readGitlabConfigs } from './config'; +import { getVoidLogger } from '@backstage/backend-common'; + +const logger = getVoidLogger(); describe('config', () => { it('empty gitlab config', () => { @@ -26,7 +29,7 @@ describe('config', () => { }, }); - const result = readGitlabConfigs(config); + const result = readGitlabConfigs(config, logger); expect(result).toHaveLength(0); }); @@ -44,7 +47,7 @@ describe('config', () => { }, }); - const result = readGitlabConfigs(config); + const result = readGitlabConfigs(config, logger); expect(result).toHaveLength(1); result.forEach(r => expect(r).toStrictEqual({ @@ -78,7 +81,7 @@ describe('config', () => { }, }); - const result = readGitlabConfigs(config); + const result = readGitlabConfigs(config, logger); expect(result).toHaveLength(1); result.forEach(r => expect(r).toStrictEqual({ @@ -116,7 +119,7 @@ describe('config', () => { }, }); - const result = readGitlabConfigs(config); + const result = readGitlabConfigs(config, logger); expect(result).toHaveLength(1); result.forEach(r => expect(r).toStrictEqual({ @@ -155,7 +158,7 @@ describe('config', () => { }, }); - expect(() => readGitlabConfigs(config)).toThrow( + expect(() => readGitlabConfigs(config, logger)).toThrow( "Missing required config value at 'catalog.providers.gitlab.test.host'", ); }); @@ -174,7 +177,7 @@ describe('config', () => { }, }); - const result = readGitlabConfigs(config); + const result = readGitlabConfigs(config, logger); expect(result).toHaveLength(1); expect(result[0].group).toEqual(''); }); diff --git a/plugins/catalog-backend-module-gitlab/src/providers/config.ts b/plugins/catalog-backend-module-gitlab/src/providers/config.ts index e64ff14cdd..e5cf5a6298 100644 --- a/plugins/catalog-backend-module-gitlab/src/providers/config.ts +++ b/plugins/catalog-backend-module-gitlab/src/providers/config.ts @@ -17,6 +17,7 @@ import { readTaskScheduleDefinitionFromConfig } from '@backstage/backend-tasks'; import { Config } from '@backstage/config'; import { GitlabProviderConfig } from '../lib'; +import { Logger } from 'winston'; /** * Extracts the gitlab config from a config object @@ -25,14 +26,25 @@ import { GitlabProviderConfig } from '../lib'; * * @param id - The provider key * @param config - The config object to extract from + * @param logger - The logger */ -function readGitlabConfig(id: string, config: Config): GitlabProviderConfig { +function readGitlabConfig( + id: string, + config: Config, + logger: Logger, +): GitlabProviderConfig { const group = config.getOptionalString('group') ?? ''; const host = config.getString('host'); + const branch = config.getOptionalString('branch'); + + if (branch) { + logger.warn( + 'The configuration key `branch` has been deprecated in favor of the configuration key `fallbackBranch`.', + ); + } + const fallbackBranch = - config.getOptionalString('fallbackBranch') ?? - config.getOptionalString('branch') ?? - 'master'; + config.getOptionalString('fallbackBranch') ?? branch ?? 'master'; const catalogFile = config.getOptionalString('entityFilename') ?? 'catalog-info.yaml'; const projectPattern = new RegExp( @@ -70,8 +82,12 @@ function readGitlabConfig(id: string, config: Config): GitlabProviderConfig { * @public * * @param config - The config object to extract from + * @param logger - The logger */ -export function readGitlabConfigs(config: Config): GitlabProviderConfig[] { +export function readGitlabConfigs( + config: Config, + logger: Logger, +): GitlabProviderConfig[] { const configs: GitlabProviderConfig[] = []; const providerConfigs = config.getOptionalConfig('catalog.providers.gitlab'); @@ -81,7 +97,13 @@ export function readGitlabConfigs(config: Config): GitlabProviderConfig[] { } for (const id of providerConfigs.keys()) { - configs.push(readGitlabConfig(id, providerConfigs.getConfig(id))); + configs.push( + readGitlabConfig( + id, + providerConfigs.getConfig(id), + logger.child({ target: id }), + ), + ); } return configs; From 867f4752ca15d3b8cd7ca33a7ea9d5b5e942275b Mon Sep 17 00:00:00 2001 From: Patrik Oldsberg Date: Thu, 23 Feb 2023 13:14:04 +0100 Subject: [PATCH 10/23] cli: only try to lint source files with --check Signed-off-by: Patrik Oldsberg --- .changeset/light-sheep-trade.md | 5 +++++ packages/cli/src/lib/bundler/config.ts | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) create mode 100644 .changeset/light-sheep-trade.md diff --git a/.changeset/light-sheep-trade.md b/.changeset/light-sheep-trade.md new file mode 100644 index 0000000000..480ffc973e --- /dev/null +++ b/.changeset/light-sheep-trade.md @@ -0,0 +1,5 @@ +--- +'@backstage/cli': patch +--- + +Updated the ESLint plugin configuration that is enabled through `yarn start --check` to only pick up valid source files. diff --git a/packages/cli/src/lib/bundler/config.ts b/packages/cli/src/lib/bundler/config.ts index ce216f5c59..31fad6a995 100644 --- a/packages/cli/src/lib/bundler/config.ts +++ b/packages/cli/src/lib/bundler/config.ts @@ -100,7 +100,7 @@ export async function createConfig( }), new ESLintPlugin({ context: paths.targetPath, - files: ['**', '!**/__tests__/**', '!**/?(*.)(spec|test).*'], + files: ['**/*.(ts|tsx|mts|cts|js|jsx|mjs|cjs)'], }), ); } @@ -325,7 +325,7 @@ export async function createBackendConfig( typescript: { configFile: paths.targetTsConfig }, }), new ESLintPlugin({ - files: ['**', '!**/__tests__/**', '!**/?(*.)(spec|test).*'], + files: ['**/*.(ts|tsx|mts|cts|js|jsx|mjs|cjs)'], }), ] : []), From 20eba13f1d9618e7df8f4a87459a78d9ac74a66a Mon Sep 17 00:00:00 2001 From: Thomas Camargo Date: Thu, 23 Feb 2023 10:09:34 -0700 Subject: [PATCH 11/23] [linguist-backend]: update changeset and update api-report Signed-off-by: Thomas Camargo --- .changeset/witty-geckos-design.md | 4 ++++ plugins/linguist-backend/api-report.md | 3 +++ 2 files changed, 7 insertions(+) diff --git a/.changeset/witty-geckos-design.md b/.changeset/witty-geckos-design.md index 41f1a28081..249e5ddb1f 100644 --- a/.changeset/witty-geckos-design.md +++ b/.changeset/witty-geckos-design.md @@ -3,3 +3,7 @@ --- Allow kind to be configurable + +```ts +return createRouter({ schedule: schedule, kind: ['Component'] }, { ...env }); +``` diff --git a/plugins/linguist-backend/api-report.md b/plugins/linguist-backend/api-report.md index 18fcec978e..d3a77bc2d7 100644 --- a/plugins/linguist-backend/api-report.md +++ b/plugins/linguist-backend/api-report.md @@ -34,6 +34,7 @@ export class LinguistBackendApi { age?: HumanDuration, batchSize?: number, useSourceLocation?: boolean, + kind?: string[], ); // (undocumented) getEntityLanguages(entityRef: string): Promise; @@ -79,6 +80,8 @@ export interface PluginOptions { // (undocumented) batchSize?: number; // (undocumented) + kind?: string[]; + // (undocumented) schedule?: TaskScheduleDefinition; // (undocumented) useSourceLocation?: boolean; From 296195351a7b41c8d1f3951f7d2deebd1f9d6de2 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Thu, 23 Feb 2023 18:14:13 +0000 Subject: [PATCH 12/23] fix(deps): update dependency json-schema-library to v7.4.7 Signed-off-by: Renovate Bot --- yarn.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/yarn.lock b/yarn.lock index 54b5e304d0..041daceb42 100644 --- a/yarn.lock +++ b/yarn.lock @@ -27430,15 +27430,15 @@ __metadata: linkType: hard "json-schema-library@npm:^7.3.9": - version: 7.4.6 - resolution: "json-schema-library@npm:7.4.6" + version: 7.4.7 + resolution: "json-schema-library@npm:7.4.7" dependencies: "@sagold/json-pointer": ^5.0.0 "@sagold/json-query": ^6.0.0 deepmerge: ^4.2.2 fast-deep-equal: ^3.1.3 valid-url: ^1.0.9 - checksum: 4639464c3c25cc6ca04b1aea081c97426598f2477bdd20e4df57e39408bcf2de7a5f54f3e108c497b3e63f41904a251fbb5444451cf7a60fd83020941c55cdda + checksum: e738f0b149d52949d854a4de718e79576fabbae206bffdb1cf895ed0b87bbf255f80f162f1924fb89311f6ac1a8e3ed0a5940b709bc3a091ad217f64de70cf60 languageName: node linkType: hard From fe5b334a0e5aad36223454efe67b342bf28c6534 Mon Sep 17 00:00:00 2001 From: Laurent Demailly Date: Thu, 23 Feb 2023 12:16:57 -0800 Subject: [PATCH 13/23] roku has a strict policy against its name/logo being used anywhere without a lot of legal paper work please also remove from https://backstage.spotify.com/ list Signed-off-by: Laurent Demailly --- ADOPTERS.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ADOPTERS.md b/ADOPTERS.md index f518a00338..87baf9c8bd 100644 --- a/ADOPTERS.md +++ b/ADOPTERS.md @@ -9,7 +9,7 @@ _You can do this by using the [Adopter form](https://info.backstage.spotify.com/ | [bol.com](https://www.bol.com) | [@acierto](https://github.com/acierto), [@clanghout](https://github.com/clanghout) | Initial work being done to unify platform tooling. | | [DFDS](https://www.dfds.com) | [@carlsendk](https://github.com/carlsendk) | V2 self-service platform. | | [Roadie](https://roadie.io) | [@dtuite](https://github.com/dtuite) | Hosted, managed Backstage with easy set-up | -| [Roku](https://www.roku.com) | [@timurista](https://github.com/timurista) | Initial work on Cloud engineering service platform. | + | [SDA SE](https://sda.se) | [@dschwank](https://github.com/dschwank), [@iammnils](https://github.com/iammnils) | Central place for developing and sharing services in our insurance ecosystem. | | [H-E-B](https://www.heb.com) | [@german-j-rodriguez](https://github.com/german-j-rodriguez) | Initial work on Engineering Portal service platform. | | [American Airlines](https://www.aa.com) | [@paulpach](https://github.com/paulpach) | Central place for developers to develop and maintain applications | From e189a0df47b03afa3b4c48454e932b4a09b65fe7 Mon Sep 17 00:00:00 2001 From: Laurent Demailly Date: Thu, 23 Feb 2023 12:20:15 -0800 Subject: [PATCH 14/23] fix extra line breaking table Signed-off-by: Laurent Demailly --- ADOPTERS.md | 1 - 1 file changed, 1 deletion(-) diff --git a/ADOPTERS.md b/ADOPTERS.md index 87baf9c8bd..068928260d 100644 --- a/ADOPTERS.md +++ b/ADOPTERS.md @@ -9,7 +9,6 @@ _You can do this by using the [Adopter form](https://info.backstage.spotify.com/ | [bol.com](https://www.bol.com) | [@acierto](https://github.com/acierto), [@clanghout](https://github.com/clanghout) | Initial work being done to unify platform tooling. | | [DFDS](https://www.dfds.com) | [@carlsendk](https://github.com/carlsendk) | V2 self-service platform. | | [Roadie](https://roadie.io) | [@dtuite](https://github.com/dtuite) | Hosted, managed Backstage with easy set-up | - | [SDA SE](https://sda.se) | [@dschwank](https://github.com/dschwank), [@iammnils](https://github.com/iammnils) | Central place for developing and sharing services in our insurance ecosystem. | | [H-E-B](https://www.heb.com) | [@german-j-rodriguez](https://github.com/german-j-rodriguez) | Initial work on Engineering Portal service platform. | | [American Airlines](https://www.aa.com) | [@paulpach](https://github.com/paulpach) | Central place for developers to develop and maintain applications | From 1263b9cc42a8f4f7c1f383966c6843e3aca69a86 Mon Sep 17 00:00:00 2001 From: Stephen Cprek Date: Fri, 17 Feb 2023 16:33:07 -0500 Subject: [PATCH 15/23] Add ADR type to search page and result cast Signed-off-by: Stephen Cprek --- plugins/adr/README.md | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/plugins/adr/README.md b/plugins/adr/README.md index a669762dad..4860406229 100644 --- a/plugins/adr/README.md +++ b/plugins/adr/README.md @@ -71,16 +71,32 @@ Afterwards, add the following code snippet to use `AdrSearchResultListItem` when import { AdrSearchResultListItem } from '@backstage/plugin-adr'; ... +, + }, + ]} +/> -case 'adr': +... + +case 'adrs': return ( ); ``` +> Note the `AdrDocument` might not be needed in newer versions https://github.com/backstage/backstage/issues/13723 + ## Custom ADR formats By default, this plugin will parse ADRs according to the format specified by the [Markdown Architecture Decision Record (MADR) v2.x template](https://github.com/adr/madr/tree/2.1.2). If your ADRs are written using a different format, you can apply the following customizations to correctly identify and parse your documents: From 7650bdf40875c71e5ace5b9940bd9d2a10f1fdff Mon Sep 17 00:00:00 2001 From: Steve Cprek Date: Tue, 21 Feb 2023 16:15:21 -0600 Subject: [PATCH 16/23] Fix adrs typo and add ADR specific Entity filter Signed-off-by: Steve Cprek --- plugins/.changeset/dull-adults-drum.md | 5 +++ plugins/adr/README.md | 53 +++++++++++++++++++++----- 2 files changed, 49 insertions(+), 9 deletions(-) create mode 100644 plugins/.changeset/dull-adults-drum.md diff --git a/plugins/.changeset/dull-adults-drum.md b/plugins/.changeset/dull-adults-drum.md new file mode 100644 index 0000000000..088eb1539e --- /dev/null +++ b/plugins/.changeset/dull-adults-drum.md @@ -0,0 +1,5 @@ +--- +'@backstage/plugin-adr': patch +--- + +Updated readme instructions diff --git a/plugins/adr/README.md b/plugins/adr/README.md index 4860406229..2e2b82b3fd 100644 --- a/plugins/adr/README.md +++ b/plugins/adr/README.md @@ -69,33 +69,68 @@ Afterwards, add the following code snippet to use `AdrSearchResultListItem` when ```tsx // In packages/app/src/components/search/SearchPage.tsx import { AdrSearchResultListItem } from '@backstage/plugin-adr'; +import { AdrDocument } from '@backstage/plugin-adr-common'; ... + , }, ]} /> - + ... -case 'adrs': - return ( - + +... + // ADR specific type + {types.includes('adr') && ( + { + // Return a list of entities which have ADRs. + const { items } = await catalogApi.getEntities({ + fields: ['metadata.name'], + filter: { + 'metadata.annotations.backstage.io/adr-location': + CATALOG_FILTER_EXISTS, + }, + }); + + const names = items.map(entity => entity.metadata.name); + names.sort(); + return names; + }} /> - ); + )} + +... + +// In results + + + {({ results }) => ( + case 'adr': + return ( + + ); ``` -> Note the `AdrDocument` might not be needed in newer versions https://github.com/backstage/backstage/issues/13723 ## Custom ADR formats From 77fa1b6c228eb1a7da5102dc21b71bc31580d22a Mon Sep 17 00:00:00 2001 From: Steve Cprek Date: Thu, 23 Feb 2023 14:40:37 -0600 Subject: [PATCH 17/23] Remove searchfilter select and mention according as optional Signed-off-by: Steve Cprek --- plugins/adr/README.md | 67 +++++++++++++++---------------------------- 1 file changed, 23 insertions(+), 44 deletions(-) diff --git a/plugins/adr/README.md b/plugins/adr/README.md index 2e2b82b3fd..7feb9b03b0 100644 --- a/plugins/adr/README.md +++ b/plugins/adr/README.md @@ -28,7 +28,7 @@ yarn --cwd packages/app add @backstage/plugin-adr import { EntityAdrContent, isAdrAvailable } from '@backstage/plugin-adr'; ... - +// Note: Add to any other Pages as well (e.g. defaultEntityPage and websiteEntityPage) const serviceEntityPage = ( {/* other tabs... */} @@ -72,7 +72,7 @@ import { AdrSearchResultListItem } from '@backstage/plugin-adr'; import { AdrDocument } from '@backstage/plugin-adr-common'; ... - +// Optional - Add type to side pane - ... -// In filters - - -... - // ADR specific type - {types.includes('adr') && ( - { - // Return a list of entities which have ADRs. - const { items } = await catalogApi.getEntities({ - fields: ['metadata.name'], - filter: { - 'metadata.annotations.backstage.io/adr-location': - CATALOG_FILTER_EXISTS, - }, - }); - - const names = items.map(entity => entity.metadata.name); - names.sort(); - return names; - }} - /> - )} - -... - // In results - - - {({ results }) => ( - case 'adr': - return ( - - ); + + {({ results }) => ( + + {results.map(({ type, document, highlight, rank }) => { + switch (type) { + ... + case 'adr': + return ( + + ); + ... + } + })} + + )} + ``` - ## Custom ADR formats By default, this plugin will parse ADRs according to the format specified by the [Markdown Architecture Decision Record (MADR) v2.x template](https://github.com/adr/madr/tree/2.1.2). If your ADRs are written using a different format, you can apply the following customizations to correctly identify and parse your documents: From 94fa5f59eb1c7f43ea2f0cf171ed050de7970d05 Mon Sep 17 00:00:00 2001 From: Ben Lambert Date: Fri, 24 Feb 2023 08:30:05 +0100 Subject: [PATCH 18/23] Update witty-geckos-design.md Signed-off-by: Ben Lambert --- .changeset/witty-geckos-design.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.changeset/witty-geckos-design.md b/.changeset/witty-geckos-design.md index 249e5ddb1f..d482332c23 100644 --- a/.changeset/witty-geckos-design.md +++ b/.changeset/witty-geckos-design.md @@ -1,5 +1,5 @@ --- -'@backstage/plugin-linguist-backend': minor +'@backstage/plugin-linguist-backend': patch --- Allow kind to be configurable From 98428a43cf257277dea650e655361533ca973584 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Fri, 24 Feb 2023 07:52:15 +0000 Subject: [PATCH 19/23] fix(deps): update dependency photoswipe to v5.3.6 Signed-off-by: Renovate Bot --- yarn.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/yarn.lock b/yarn.lock index 54b5e304d0..96d108f00b 100644 --- a/yarn.lock +++ b/yarn.lock @@ -31928,9 +31928,9 @@ __metadata: linkType: hard "photoswipe@npm:^5.3.5": - version: 5.3.5 - resolution: "photoswipe@npm:5.3.5" - checksum: bd3eafebffc114210b8e5403746b48a9bfe436cca05a65f8d5efd6eacea785a51f0f124d7326c8f651d754d76124c9768a920383843c4a619da582a86e535b27 + version: 5.3.6 + resolution: "photoswipe@npm:5.3.6" + checksum: 192004e33dbba7567744c96835b43f17a118653a24e099f9e31c2ddea9d7214ac7c28ff8994d4f7c20720c7f7fd00b62ad8ade5e3d59994f00a27390419ba11c languageName: node linkType: hard From 97fa334f953e38c63175e1926c4dc093e69e45a1 Mon Sep 17 00:00:00 2001 From: Jonathan Mezach Date: Fri, 24 Feb 2023 10:49:16 +0100 Subject: [PATCH 20/23] Add Octopus Deploy logo Signed-off-by: Jonathan Mezach --- .../OctopusDeployIcon/OctopusDeployIcon.tsx | 31 +++++++++++++++++++ .../src/components/OctopusDeployIcon/index.ts | 17 ++++++++++ .../components/ReleaseTable/ReleaseTable.tsx | 3 ++ 3 files changed, 51 insertions(+) create mode 100644 plugins/octopus-deploy/src/components/OctopusDeployIcon/OctopusDeployIcon.tsx create mode 100644 plugins/octopus-deploy/src/components/OctopusDeployIcon/index.ts diff --git a/plugins/octopus-deploy/src/components/OctopusDeployIcon/OctopusDeployIcon.tsx b/plugins/octopus-deploy/src/components/OctopusDeployIcon/OctopusDeployIcon.tsx new file mode 100644 index 0000000000..626e61ccd8 --- /dev/null +++ b/plugins/octopus-deploy/src/components/OctopusDeployIcon/OctopusDeployIcon.tsx @@ -0,0 +1,31 @@ +/* + * Copyright 2021 The Backstage Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { SvgIcon, SvgIconProps } from '@material-ui/core'; + +import React from 'react'; + +export const OctopusDeployIcon = (props: SvgIconProps) => ( + + + + + + +); diff --git a/plugins/octopus-deploy/src/components/OctopusDeployIcon/index.ts b/plugins/octopus-deploy/src/components/OctopusDeployIcon/index.ts new file mode 100644 index 0000000000..d78e1bfc7f --- /dev/null +++ b/plugins/octopus-deploy/src/components/OctopusDeployIcon/index.ts @@ -0,0 +1,17 @@ +/* + * Copyright 2021 The Backstage Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +export { OctopusDeployIcon } from './OctopusDeployIcon'; diff --git a/plugins/octopus-deploy/src/components/ReleaseTable/ReleaseTable.tsx b/plugins/octopus-deploy/src/components/ReleaseTable/ReleaseTable.tsx index dfda291e1a..bc185546b1 100644 --- a/plugins/octopus-deploy/src/components/ReleaseTable/ReleaseTable.tsx +++ b/plugins/octopus-deploy/src/components/ReleaseTable/ReleaseTable.tsx @@ -28,6 +28,7 @@ import { Table, TableColumn, } from '@backstage/core-components'; +import { OctopusDeployIcon } from '../OctopusDeployIcon'; type ReleaseTableProps = { environments?: OctopusEnvironment[]; @@ -141,6 +142,8 @@ export const ReleaseTable = ({ }} title={ + + Octopus Deploy - Releases ({releases ? releases.length : 0}) } From c3b3065722200149bd3205421234df4631e56c0c Mon Sep 17 00:00:00 2001 From: Jonathan Mezach Date: Fri, 24 Feb 2023 10:56:25 +0100 Subject: [PATCH 21/23] Add Octopus Deploy plugin to Marketplace Signed-off-by: Jonathan Mezach --- microsite/data/plugins/octopus-deploy.yaml | 10 ++++++++++ microsite/static/img/octopus-deploy.svg | 1 + 2 files changed, 11 insertions(+) create mode 100644 microsite/data/plugins/octopus-deploy.yaml create mode 100644 microsite/static/img/octopus-deploy.svg diff --git a/microsite/data/plugins/octopus-deploy.yaml b/microsite/data/plugins/octopus-deploy.yaml new file mode 100644 index 0000000000..a6997e597d --- /dev/null +++ b/microsite/data/plugins/octopus-deploy.yaml @@ -0,0 +1,10 @@ +--- +title: 'Octopus Deploy' +author: jmezach +authorUrl: https://jmezach.github.io/ +category: CI/CD +description: Easily view your Octopus Deploy releases within the Software Catalog +documentation: https://github.com/backstage/backstage/blob/master/plugins/octopus-deploy/README.md +iconUrl: img/octopus-deploy.svg +npmPackageName: '@backstage/plugin-octopus-deploy' +addedDate: '2023-02-24' diff --git a/microsite/static/img/octopus-deploy.svg b/microsite/static/img/octopus-deploy.svg new file mode 100644 index 0000000000..a3f7927617 --- /dev/null +++ b/microsite/static/img/octopus-deploy.svg @@ -0,0 +1 @@ + \ No newline at end of file From cb0fc15a992a43430083222d018345bf1e8c89a5 Mon Sep 17 00:00:00 2001 From: Jonathan Mezach Date: Fri, 24 Feb 2023 10:59:54 +0100 Subject: [PATCH 22/23] Added changeset Signed-off-by: Jonathan Mezach --- .changeset/long-wolves-drive.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .changeset/long-wolves-drive.md diff --git a/.changeset/long-wolves-drive.md b/.changeset/long-wolves-drive.md new file mode 100644 index 0000000000..1c3ffadb5a --- /dev/null +++ b/.changeset/long-wolves-drive.md @@ -0,0 +1,5 @@ +--- +'@backstage/plugin-octopus-deploy': patch +--- + +Added Octopus Deploy logo From 3a8294aa963dc83480b5826448b2cae71ec5cb34 Mon Sep 17 00:00:00 2001 From: Andreas Berger Date: Fri, 24 Feb 2023 11:16:31 +0100 Subject: [PATCH 23/23] Improve changelog Signed-off-by: Andreas Berger --- .changeset/silver-lies-rest.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.changeset/silver-lies-rest.md b/.changeset/silver-lies-rest.md index 76fdba0b43..34b77f5375 100644 --- a/.changeset/silver-lies-rest.md +++ b/.changeset/silver-lies-rest.md @@ -1,6 +1,7 @@ --- -'@backstage/plugin-catalog-backend-module-gitlab': minor +'@backstage/plugin-catalog-backend-module-gitlab': patch --- The configuration key `branch` of the `GitlabDiscoveryEntityProvider` has been deprecated in favor of the configuration key `fallbackBranch`. +It will be reused in future release to enforce a concrete branch to be used in catalog file discovery. To migrate to the new configuration value, rename `branch` to `fallbackBranch`.