From 62018b1a5dc0ccaa66bc51f27dec7fd7e5faf535 Mon Sep 17 00:00:00 2001 From: blam Date: Thu, 18 Apr 2024 20:45:17 +0200 Subject: [PATCH] Deprecate packages Signed-off-by: blam --- .changeset/migrate-1713465915010.md | 6 +++ .../cicd-statistics-module-gitlab/README.md | 40 +------------------ .../package.json | 6 ++- plugins/cicd-statistics/README.md | 14 +------ plugins/cicd-statistics/package.json | 6 ++- 5 files changed, 18 insertions(+), 54 deletions(-) create mode 100644 .changeset/migrate-1713465915010.md diff --git a/.changeset/migrate-1713465915010.md b/.changeset/migrate-1713465915010.md new file mode 100644 index 0000000000..ad30bc1ff8 --- /dev/null +++ b/.changeset/migrate-1713465915010.md @@ -0,0 +1,6 @@ +--- +'@backstage/plugin-cicd-statistics': patch +'@backstage/plugin-cicd-statistics-module-gitlab': patch +--- + +These packages have been migrated to the [backstage/community-plugins](https://github.com/backstage/community-plugins) repository. diff --git a/plugins/cicd-statistics-module-gitlab/README.md b/plugins/cicd-statistics-module-gitlab/README.md index 67da1c2291..bed9c9329a 100644 --- a/plugins/cicd-statistics-module-gitlab/README.md +++ b/plugins/cicd-statistics-module-gitlab/README.md @@ -1,39 +1,3 @@ -# cicd-statistics-module-gitlab +# Deprecated -This is an extension module to the `cicd-statistics` plugin, providing a `CicdStatisticsApiGitlab` that you can use to extract the CI/CD statistics from your Gitlab repository. - -## Getting started - -1. Install the `cicd-statistics` and `cicd-statistics-module-gitlab` plugins in the `app` package. - -2. Configure your ApiFactory: - - You can optionally pass in a second argument to `CicdStatisticsApiGitlab` of type [CicdDefaults](https://github.com/backstage/backstage/blob/2881c53cb383bf127c150f837f37fe535d8cf97b/plugins/cicd-statistics/src/apis/types.ts#L179) to alter the default CICD UI configuration - -```tsx -// packages/app/src/apis.ts -import { gitlabAuthApiRef } from '@backstage/core-plugin-api'; - -import { cicdStatisticsApiRef } from '@backstage/plugin-cicd-statistics'; -import { CicdStatisticsApiGitlab } from '@backstage/plugin-cicd-statistics-module-gitlab'; - -export const apis: AnyApiFactory[] = [ - createApiFactory({ - api: cicdStatisticsApiRef, - deps: { gitlabAuthApi: gitlabAuthApiRef }, - factory({ gitlabAuthApi }) { - return new CicdStatisticsApiGitlab(gitlabAuthApi); - }, - }), -]; -``` - -3. Add the component to your EntityPage: - -```tsx -// packages/app/src/components/catalog/EntityPage.tsx -import { EntityCicdStatisticsContent } from '@backstage/plugin-cicd-statistics'; - - - -; -``` +This package has been moved to the [backstage-community/plugins](https://github.com/backstage/community-plugins) repository. Migrate to using `@backstage-community/plugin-cicd-statistics-module-gitlab` instead. diff --git a/plugins/cicd-statistics-module-gitlab/package.json b/plugins/cicd-statistics-module-gitlab/package.json index ba8d60d201..658c525bf4 100644 --- a/plugins/cicd-statistics-module-gitlab/package.json +++ b/plugins/cicd-statistics-module-gitlab/package.json @@ -3,7 +3,8 @@ "version": "0.1.30", "description": "CI/CD Statistics plugin module; Gitlab CICD", "backstage": { - "role": "frontend-plugin-module" + "role": "frontend-plugin-module", + "moved": "@backstage-community/plugin-cicd-statistics-module-gitlab" }, "publishConfig": { "access": "public", @@ -53,5 +54,6 @@ "react": "^16.13.1 || ^17.0.0 || ^18.0.0", "react-dom": "^16.13.1 || ^17.0.0 || ^18.0.0", "react-router-dom": "6.0.0-beta.0 || ^6.3.0" - } + }, + "deprecated": "This package has been moved to the backstage/community-plugins repository. You should migrate to using @backstage-community/plugin-cicd-statistics-module-gitlab instead." } diff --git a/plugins/cicd-statistics/README.md b/plugins/cicd-statistics/README.md index 8d91d74794..767b34ed94 100644 --- a/plugins/cicd-statistics/README.md +++ b/plugins/cicd-statistics/README.md @@ -1,13 +1,3 @@ -# CI/CD Statistics Plugin +# Deprecated -This plugin shows charts of CI/CD pipeline durations over time. It expects to be used on the Software Catalog entity page, as it uses `useEntity` to figure out what component to get the build information for. - -## Usage - -> This plugin cannot be used as-is; it requires a custom implementation to fetch build information - -To use this plugin, you need to implement an API `CicdStatisticsApi` and bind it to the `cicdStatisticsApiRef`. This API is defined in `src/apis/types.ts` and is an interface with two functions, `getConfiguration(options)` and `fetchBuilds(options)`. This plugin will call `getConfiguration` to allow the implementation to specify defaults and settings for the UI. - -First time the UI shows, and each time the user changes filters and clicks `Update` to refresh the data, `fetchBuilds` is invoked with the filter options. The API implementation is the expected to fetch build information from somewhere, format it into a generic and rather simple type `Build` (also defined in `types.ts`). The API can optionally signal completion for a progress bar in the UI. - -When this plugin has fetched the builds, it will transpose the list of builds (and build stages) into a tree of build stages. As build pipelines sometimes change, certain stages might end or begin within the date range of the view (when _Normalize time range_ is enabled, which is the default). +This package has been moved to the [backstage-community/plugins](https://github.com/backstage/community-plugins) repository. Migrate to using `@backstage-community/plugin-cicd-statistics` instead. diff --git a/plugins/cicd-statistics/package.json b/plugins/cicd-statistics/package.json index f03665b0a3..497aaf3a5a 100644 --- a/plugins/cicd-statistics/package.json +++ b/plugins/cicd-statistics/package.json @@ -3,7 +3,8 @@ "version": "0.1.36", "description": "A frontend plugin visualizing CI/CD pipeline statistics (build time)", "backstage": { - "role": "frontend-plugin" + "role": "frontend-plugin", + "moved": "@backstage-community/plugin-cicd-statistics" }, "publishConfig": { "access": "public", @@ -60,5 +61,6 @@ "react": "^16.13.1 || ^17.0.0 || ^18.0.0", "react-dom": "^16.13.1 || ^17.0.0 || ^18.0.0", "react-router-dom": "6.0.0-beta.0 || ^6.3.0" - } + }, + "deprecated": "This package has been moved to the backstage/community-plugins repository. You should migrate to using @backstage-community/plugin-cicd-statistics instead." }