diff --git a/.github/workflows/generate-supported-plugins-pr.yml b/.github/workflows/generate-supported-plugins-pr.yml index 3b4e4ea32b2..6092486eb23 100644 --- a/.github/workflows/generate-supported-plugins-pr.yml +++ b/.github/workflows/generate-supported-plugins-pr.yml @@ -49,12 +49,15 @@ jobs: ref: ${{ matrix.target_branch }} fetch-depth: 0 - - name: Install PIP `yq` + - name: Install PIP `yq` and skopeo if: steps.gate.outputs.run == 'true' run: | python3 -m pip install --upgrade pip pip install yq echo "Installed `yq` version: $(yq --version)" + sudo apt-get update + sudo apt-get install -y skopeo + echo "Installed skopeo version: $(skopeo --version)" - name: Set up Git user if: steps.gate.outputs.run == 'true' diff --git a/modules/extend_dynamic-plugins-reference/README.md b/modules/extend_dynamic-plugins-reference/README.md new file mode 100644 index 00000000000..a125b463453 --- /dev/null +++ b/modules/extend_dynamic-plugins-reference/README.md @@ -0,0 +1,27 @@ += Dynamic plugins reference module + +The contents of this folder are updated by running the GH action in this repo against a specific branch + +https://github.com/redhat-developer/red-hat-developers-documentation-rhdh/actions/workflows/generate-supported-plugins-pr.yml + +The action which will extract the generated content from the latest catalog index at https://quay.io/rhdh/plugin-catalog-index using the related branch (release-1.10 => `:1.10`, main => `:next`), then a pull request will be created that can be reviewed before merging. + +Currently, the community plugins table at ref-community-supported-plugins.adoc is not generated from the same catalog index container. Instead it uses the contents of rhdh-plugin-export-overlays to get the list of plugins. + +== Contributing to the dynamic plugins tables + +Do not edit the fetched files directly in this repository, as they will be overwritten. + +Instead, contribute changes to https://github.com/redhat-developer/rhdh-plugin-export-overlays[redhat-developer/rhdh-plugin-export-overlays], which will be either read directly (for community plugins) or downstreamed and built into a new image at https://quay.io/rhdh/plugin-catalog-index + +== Automation + +The GitHub Actions workflow `.github/workflows/generate-supported-plugins-pr.yml` runs `rhdh-supported-plugins.sh` weekly to open a pull request for updated content. It can also be run manually at any time. + +== Requirements + +Running the sync script locally requires: + +* `skopeo` +* `jq` +* `yq` (the https://kislyuk.github.io/yq/[kislyuk/jq-wrapper] version, not mikefarah/yq) \ No newline at end of file diff --git a/modules/extend_dynamic-plugins-reference/con-preinstalled-dynamic-plugins.adoc b/modules/extend_dynamic-plugins-reference/con-preinstalled-dynamic-plugins.adoc index 561def9da4e..e4e303c085f 100644 --- a/modules/extend_dynamic-plugins-reference/con-preinstalled-dynamic-plugins.adoc +++ b/modules/extend_dynamic-plugins-reference/con-preinstalled-dynamic-plugins.adoc @@ -8,7 +8,7 @@ [role="_abstract"] {product} is preinstalled with a selection of dynamic plugins. -The following 15 preinstalled dynamic plugins are enabled by default: +The following 16 preinstalled dynamic plugins are enabled by default: * `@backstage-community/plugin-analytics-provider-segment` * `@backstage-community/plugin-scaffolder-backend-module-regex` @@ -22,8 +22,9 @@ The following 15 preinstalled dynamic plugins are enabled by default: * `@red-hat-developer-hub/backstage-plugin-dynamic-home-page` * `@red-hat-developer-hub/backstage-plugin-extensions-backend` * `@red-hat-developer-hub/backstage-plugin-extensions` -* `@red-hat-developer-hub/backstage-plugin-global-floating-action-button` * `@red-hat-developer-hub/backstage-plugin-global-header` +* `@red-hat-developer-hub/backstage-plugin-lightspeed-backend` +* `@red-hat-developer-hub/backstage-plugin-lightspeed` * `@red-hat-developer-hub/backstage-plugin-quickstart` The dynamic plugins that require custom configuration are disabled by default. diff --git a/modules/extend_dynamic-plugins-reference/con-preinstalled-dynamic-plugins.template.adoc b/modules/extend_dynamic-plugins-reference/con-preinstalled-dynamic-plugins.template.adoc deleted file mode 100644 index cd8a360f50c..00000000000 --- a/modules/extend_dynamic-plugins-reference/con-preinstalled-dynamic-plugins.template.adoc +++ /dev/null @@ -1,38 +0,0 @@ -:_mod-docs-content-type: CONCEPT - -// This page is generated! Do not edit the .adoc file, but instead run rhdh-supported-plugins.sh to regen this page from the latest plugin metadata. - -[id="preinstalled-dynamic-plugins_{context}"] -= Preinstalled dynamic plugins - -[role="_abstract"] -{product} is preinstalled with a selection of dynamic plugins. - -The following %%COUNT_ENABLED_PLUGINS%% preinstalled dynamic plugins are enabled by default: - -%%ENABLED_PLUGINS%% - -The dynamic plugins that require custom configuration are disabled by default. - -Upon application startup, for each plugin that is disabled by default, the `install-dynamic-plugins init container` within the {product-short} pod log displays a message similar to the following: - -[source,yaml] ----- -======= Skipping disabled dynamic plugin ./dynamic-plugins/dist/backstage-plugin-catalog-backend-module-github-dynamic ----- - -To enable this plugin, add a package with the same name to the Helm chart and change the value in the `disabled` field to `false`. For example: - -[source,yaml] ----- -global: - dynamic: - includes: - - dynamic-plugins.default.yaml - plugins: - - package: ./dynamic-plugins/dist/backstage-plugin-catalog-backend-module-github-dynamic - disabled: false ----- - -[NOTE] -The default configuration for a plugin is extracted from the `dynamic-plugins.default.yaml` file, however, you can use a `pluginConfig` entry to override the default configuration. diff --git a/modules/extend_dynamic-plugins-reference/ref-community-supported-plugins.adoc b/modules/extend_dynamic-plugins-reference/ref-community-supported-plugins.adoc index de6b939f522..31a2230bb04 100644 --- a/modules/extend_dynamic-plugins-reference/ref-community-supported-plugins.adoc +++ b/modules/extend_dynamic-plugins-reference/ref-community-supported-plugins.adoc @@ -6,7 +6,7 @@ = {company-name} community supported plugins [role="_abstract"] -{company-name} provides community support for the following 44 dynamic plugins in `ghcr.io`. +{company-name} provides community support for the following 45 dynamic plugins in `ghcr.io`. @@ -43,6 +43,11 @@ Replace `` with the version tag corresponding to your {product-short} versi ` +|*Auth Frontend* +|0.1.6|`oci://ghcr.io/redhat-developer/rhdh-plugin-export-overlays/backstage-plugin-auth:` + +` + |*Azure DevOps Backend* |0.27.0|`oci://ghcr.io/redhat-developer/rhdh-plugin-export-overlays/backstage-community-plugin-azure-devops-backend:` diff --git a/modules/extend_dynamic-plugins-reference/ref-deprecated-plugins.template.adoc b/modules/extend_dynamic-plugins-reference/ref-deprecated-plugins.template.adoc deleted file mode 100644 index 3dfb99cb64f..00000000000 --- a/modules/extend_dynamic-plugins-reference/ref-deprecated-plugins.template.adoc +++ /dev/null @@ -1,17 +0,0 @@ -:_mod-docs-content-type: REFERENCE - -// This page is generated! Do not edit the .adoc file, but instead run rhdh-supported-plugins.sh to regen this page from the latest plugin metadata. - -[id="deprecated-plugins_{context}"] -= Deprecated plugins - -[role="_abstract"] -{product} ({product-very-short}) includes several deprecated plugins, which are no longer being actively developed. Migrate to an alternative solution as soon as possible, because these plugins will be removed in a future release. - -{product-very-short} includes the following %%COUNT_3%% deprecated plugins. - -[%header,cols=4*] -|=== -|*Name* |*Plugin* |*Version* |*Path and required variables* -%%TABLE_CONTENT_3%% -|=== diff --git a/modules/extend_dynamic-plugins-reference/ref-ga-plugins.adoc b/modules/extend_dynamic-plugins-reference/ref-ga-plugins.adoc index 93cb3ba0672..dcda8b75257 100644 --- a/modules/extend_dynamic-plugins-reference/ref-ga-plugins.adoc +++ b/modules/extend_dynamic-plugins-reference/ref-ga-plugins.adoc @@ -6,7 +6,7 @@ = {company-name} {generally-available} (GA) plugins [role="_abstract"] -{company-name} provides full support for the following 33 dynamic plugins. +{company-name} provides full support for the following 31 dynamic plugins. [%header,cols=4*] |=== @@ -23,7 +23,7 @@ |`./dynamic-plugins/dist/red-hat-developer-hub-backstage-plugin-analytics-module-adoption-insights-dynamic` -|Analytics Provider Segment |`https://npmjs.com/package/@backstage-community/plugin-analytics-provider-segment/v/1.27.0[@backstage-community/plugin-analytics-provider-segment]` |1.27.0 +|Analytics Provider Segment |`https://npmjs.com/package/@backstage-community/plugin-analytics-provider-segment/v/1.27.0[@backstage-community/plugin-analytics-provider-segment]` |1.27.0 |`./dynamic-plugins/dist/backstage-community-plugin-analytics-provider-segment` `BACKSTAGE_VERSION` @@ -35,11 +35,11 @@ `SEGMENT_WRITE_KEY` -|Dynamic Home Page |`https://npmjs.com/package/@red-hat-developer-hub/backstage-plugin-dynamic-home-page/v/1.13.1[@red-hat-developer-hub/backstage-plugin-dynamic-home-page]` |1.13.1 +|Dynamic Home Page |`https://npmjs.com/package/@red-hat-developer-hub/backstage-plugin-dynamic-home-page/v/1.13.1[@red-hat-developer-hub/backstage-plugin-dynamic-home-page]` |1.13.1 |`./dynamic-plugins/dist/red-hat-developer-hub-backstage-plugin-dynamic-home-page` -|GitHub Org |`https://npmjs.com/package/@backstage/plugin-catalog-backend-module-github-org/v/0.3.20[@backstage/plugin-catalog-backend-module-github-org]` |0.3.20 +|GitHub Org |`https://npmjs.com/package/@backstage/plugin-catalog-backend-module-github-org/v/0.3.20[@backstage/plugin-catalog-backend-module-github-org]` |0.3.20 |`./dynamic-plugins/dist/backstage-plugin-catalog-backend-module-github-org-dynamic` `GITHUB_ORG` @@ -47,17 +47,17 @@ `GITHUB_URL` -|GitHub |`https://npmjs.com/package/@backstage/plugin-catalog-backend-module-github/v/0.13.0[@backstage/plugin-catalog-backend-module-github]` |0.13.0 +|GitHub |`https://npmjs.com/package/@backstage/plugin-catalog-backend-module-github/v/0.13.0[@backstage/plugin-catalog-backend-module-github]` |0.13.0 |`./dynamic-plugins/dist/backstage-plugin-catalog-backend-module-github-dynamic` `GITHUB_ORG` -|GitHub |`https://npmjs.com/package/@backstage/plugin-scaffolder-backend-module-github/v/0.9.7[@backstage/plugin-scaffolder-backend-module-github]` |0.9.7 +|GitHub |`https://npmjs.com/package/@backstage/plugin-scaffolder-backend-module-github/v/0.9.7[@backstage/plugin-scaffolder-backend-module-github]` |0.9.7 |`./dynamic-plugins/dist/backstage-plugin-scaffolder-backend-module-github-dynamic` -|GitLab Org |`https://npmjs.com/package/@backstage/plugin-catalog-backend-module-gitlab-org/v/0.2.19[@backstage/plugin-catalog-backend-module-gitlab-org]` |0.2.19 +|GitLab Org |`https://npmjs.com/package/@backstage/plugin-catalog-backend-module-gitlab-org/v/0.2.19[@backstage/plugin-catalog-backend-module-gitlab-org]` |0.2.19 |`./dynamic-plugins/dist/backstage-plugin-catalog-backend-module-gitlab-org-dynamic` `GITLAB_HOST` @@ -65,7 +65,7 @@ `GITLAB_ORG_GROUP` -|GitLab |`https://npmjs.com/package/@backstage/plugin-catalog-backend-module-gitlab/v/0.8.1[@backstage/plugin-catalog-backend-module-gitlab]` |0.8.1 +|GitLab |`https://npmjs.com/package/@backstage/plugin-catalog-backend-module-gitlab/v/0.8.1[@backstage/plugin-catalog-backend-module-gitlab]` |0.8.1 |`./dynamic-plugins/dist/backstage-plugin-catalog-backend-module-gitlab-dynamic` `GITLAB_DISCOVERY_GROUP` @@ -73,19 +73,11 @@ `GITLAB_HOST` -|Global Floating Action Button |`https://npmjs.com/package/@red-hat-developer-hub/backstage-plugin-global-floating-action-button/v/1.9.3[@red-hat-developer-hub/backstage-plugin-global-floating-action-button]` |1.9.3 -|`./dynamic-plugins/dist/red-hat-developer-hub-backstage-plugin-global-floating-action-button` - - |Global Header |`https://npmjs.com/package/@red-hat-developer-hub/backstage-plugin-global-header/v/1.21.5[@red-hat-developer-hub/backstage-plugin-global-header]` |1.21.5 |`./dynamic-plugins/dist/red-hat-developer-hub-backstage-plugin-global-header` -|Http Request |`https://npmjs.com/package/@roadiehq/scaffolder-backend-module-http-request/v/5.6.0[@roadiehq/scaffolder-backend-module-http-request]` |5.6.0 -|`oci://registry.access.redhat.com/rhdh/roadiehq-scaffolder-backend-module-http-request@sha256:2e498033306df2711ec2a548db0a9db921f911eb9b99af2b9e44162b4851bbe8` - - -|Keycloak |`https://npmjs.com/package/@backstage-community/plugin-catalog-backend-module-keycloak/v/3.19.2[@backstage-community/plugin-catalog-backend-module-keycloak]` |3.19.2 +|Keycloak |`https://npmjs.com/package/@backstage-community/plugin-catalog-backend-module-keycloak/v/3.19.2[@backstage-community/plugin-catalog-backend-module-keycloak]` |3.19.2 |`./dynamic-plugins/dist/backstage-community-plugin-catalog-backend-module-keycloak-dynamic` `KEYCLOAK_BASE_URL` @@ -99,7 +91,7 @@ `KEYCLOAK_REALM` -|Kubernetes |`https://npmjs.com/package/@backstage/plugin-kubernetes-backend/v/0.21.2[@backstage/plugin-kubernetes-backend]` |0.21.2 +|Kubernetes |`https://npmjs.com/package/@backstage/plugin-kubernetes-backend/v/0.21.2[@backstage/plugin-kubernetes-backend]` |0.21.2 |`./dynamic-plugins/dist/backstage-plugin-kubernetes-backend-dynamic` `K8S_CLUSTER_NAME` @@ -109,11 +101,11 @@ `K8S_CLUSTER_URL` -|Kubernetes |`https://npmjs.com/package/@backstage-community/plugin-scaffolder-backend-module-kubernetes/v/2.17.1[@backstage-community/plugin-scaffolder-backend-module-kubernetes]` |2.17.1 +|Kubernetes |`https://npmjs.com/package/@backstage-community/plugin-scaffolder-backend-module-kubernetes/v/2.17.1[@backstage-community/plugin-scaffolder-backend-module-kubernetes]` |2.17.1 |`./dynamic-plugins/dist/backstage-community-plugin-scaffolder-backend-module-kubernetes-dynamic` -|Ldap |`https://npmjs.com/package/@backstage/plugin-catalog-backend-module-ldap/v/0.12.3[@backstage/plugin-catalog-backend-module-ldap]` |0.12.3 +|Ldap |`https://npmjs.com/package/@backstage/plugin-catalog-backend-module-ldap/v/0.12.3[@backstage/plugin-catalog-backend-module-ldap]` |0.12.3 |`./dynamic-plugins/dist/backstage-plugin-catalog-backend-module-ldap-dynamic` `LDAP_BIND_DN` @@ -127,75 +119,71 @@ `LDAP_USERS_DN` -|MS Graph |`https://npmjs.com/package/@backstage/plugin-catalog-backend-module-msgraph/v/0.9.1[@backstage/plugin-catalog-backend-module-msgraph]` |0.9.1 -|`./dynamic-plugins/dist/backstage-plugin-catalog-backend-module-msgraph-dynamic` - -`MICROSOFT_CLIENT_ID` - -`MICROSOFT_CLIENT_SECRET` +|Lightspeed |`https://npmjs.com/package/@red-hat-developer-hub/backstage-plugin-lightspeed/v/2.9.0[@red-hat-developer-hub/backstage-plugin-lightspeed]` |2.9.0 +|`oci://registry.access.redhat.com/rhdh/red-hat-developer-hub-backstage-plugin-lightspeed@sha256:c68a58f268485e79e60a21e4f45e1c27b446bc17fcbb1af8a0e35b04d4f5cea7` -`MICROSOFT_TENANT_ID` +|Lightspeed |`https://npmjs.com/package/@red-hat-developer-hub/backstage-plugin-lightspeed-backend/v/2.9.0[@red-hat-developer-hub/backstage-plugin-lightspeed-backend]` |2.9.0 +|`oci://registry.access.redhat.com/rhdh/red-hat-developer-hub-backstage-plugin-lightspeed-backend@sha256:3147f09ad990fbcd22a9f613d6982b4534b235a2c2d27684fc1834e196cd83ff` -|Orchestrator Backend Module Loki |`https://npmjs.com/package/@red-hat-developer-hub/backstage-plugin-orchestrator-backend-module-loki/v/1.2.6[@red-hat-developer-hub/backstage-plugin-orchestrator-backend-module-loki]` |1.2.6 -|`oci://registry.access.redhat.com/rhdh/red-hat-developer-hub-backstage-plugin-orchestrator-backend-module-loki@sha256:d5970c0e63d43162fa77f342a76b3bffbe54fe6cbabc56335ea11ecaa74591c4` -`AUTH_TOKEN` +|MS Graph |`https://npmjs.com/package/@backstage/plugin-catalog-backend-module-msgraph/v/0.9.1[@backstage/plugin-catalog-backend-module-msgraph]` |0.9.1 +|`./dynamic-plugins/dist/backstage-plugin-catalog-backend-module-msgraph-dynamic` -`LOKI_BASE_URL` +`MICROSOFT_CLIENT_ID` +`MICROSOFT_CLIENT_SECRET` -|Orchestrator Form Widgets |`https://npmjs.com/package/@red-hat-developer-hub/backstage-plugin-orchestrator-form-widgets/v/1.10.7[@red-hat-developer-hub/backstage-plugin-orchestrator-form-widgets]` |1.10.7 -|`oci://registry.access.redhat.com/rhdh/red-hat-developer-hub-backstage-plugin-orchestrator-form-widgets@sha256:b8d9886e39fa1262bfe1046f6ec5825b8e576c4997c744e0f90f722453f35aec` +`MICROSOFT_TENANT_ID` -|Orchestrator |`https://npmjs.com/package/@red-hat-developer-hub/backstage-plugin-orchestrator/v/5.7.12[@red-hat-developer-hub/backstage-plugin-orchestrator]` |5.7.12 -|`oci://registry.access.redhat.com/rhdh/red-hat-developer-hub-backstage-plugin-orchestrator@sha256:062a536d266bcd76d454fc9fdc0157b99e62074f6d3304578a68f515ced83e64` +|Orchestrator Form Widgets |`https://npmjs.com/package/@red-hat-developer-hub/backstage-plugin-orchestrator-form-widgets/v/1.10.8[@red-hat-developer-hub/backstage-plugin-orchestrator-form-widgets]` |1.10.8 +|`oci://registry.access.redhat.com/rhdh/red-hat-developer-hub-backstage-plugin-orchestrator-form-widgets@sha256:5671a9d01cb98b7172019ddb3b524b5c8089a081273db00c9da24057f9bb8db3` -|Orchestrator |`https://npmjs.com/package/@red-hat-developer-hub/backstage-plugin-orchestrator-backend/v/8.9.4[@red-hat-developer-hub/backstage-plugin-orchestrator-backend]` |8.9.4 -|`oci://registry.access.redhat.com/rhdh/red-hat-developer-hub-backstage-plugin-orchestrator-backend@sha256:365d67fddeeaa2cf0b0266b012eb3e74fb5d5071b848059662353e62e7f9ceab` +|Orchestrator |`https://npmjs.com/package/@red-hat-developer-hub/backstage-plugin-orchestrator/v/5.7.13[@red-hat-developer-hub/backstage-plugin-orchestrator]` |5.7.13 +|`oci://registry.access.redhat.com/rhdh/red-hat-developer-hub-backstage-plugin-orchestrator@sha256:a26989fc49b4f2ce58e4764e928eacff000d4dd9007d06c553ce2ff6fe60c41f` -|Orchestrator |`https://npmjs.com/package/@red-hat-developer-hub/backstage-plugin-scaffolder-backend-module-orchestrator/v/1.5.4[@red-hat-developer-hub/backstage-plugin-scaffolder-backend-module-orchestrator]` |1.5.4 -|`oci://registry.access.redhat.com/rhdh/red-hat-developer-hub-backstage-plugin-scaffolder-backend-module-orchestrator@sha256:5b52adc153afcf79fb134262aa01b1e117085bf59c1a1997ff2e3a6f31c7647a` +|Orchestrator |`https://npmjs.com/package/@red-hat-developer-hub/backstage-plugin-orchestrator-backend/v/8.9.5[@red-hat-developer-hub/backstage-plugin-orchestrator-backend]` |8.9.5 +|`oci://registry.access.redhat.com/rhdh/red-hat-developer-hub-backstage-plugin-orchestrator-backend@sha256:5e2e95950c3112a10c23c0fddae86b257d0cc16f9cde3dd2fc945b6a7be5f7c5` |Quick start |`https://npmjs.com/package/@red-hat-developer-hub/backstage-plugin-quickstart/v/1.9.6[@red-hat-developer-hub/backstage-plugin-quickstart]` |1.9.6 |`./dynamic-plugins/dist/red-hat-developer-hub-backstage-plugin-quickstart` -|RBAC |`https://npmjs.com/package/@backstage-community/plugin-rbac/v/1.52.4[@backstage-community/plugin-rbac]` |1.52.4 +|RBAC |`https://npmjs.com/package/@backstage-community/plugin-rbac/v/1.52.4[@backstage-community/plugin-rbac]` |1.52.4 |`./dynamic-plugins/dist/backstage-community-plugin-rbac` -|Regex |`https://npmjs.com/package/@backstage-community/plugin-scaffolder-backend-module-regex/v/2.15.1[@backstage-community/plugin-scaffolder-backend-module-regex]` |2.15.1 +|Regex |`https://npmjs.com/package/@backstage-community/plugin-scaffolder-backend-module-regex/v/2.15.1[@backstage-community/plugin-scaffolder-backend-module-regex]` |2.15.1 |`./dynamic-plugins/dist/backstage-community-plugin-scaffolder-backend-module-regex-dynamic` -|Signals |`https://npmjs.com/package/@backstage/plugin-signals-backend/v/0.3.13[@backstage/plugin-signals-backend]` |0.3.13 +|Signals |`https://npmjs.com/package/@backstage/plugin-signals-backend/v/0.3.13[@backstage/plugin-signals-backend]` |0.3.13 |`./dynamic-plugins/dist/backstage-plugin-signals-backend-dynamic` -|Tech Radar |`https://npmjs.com/package/@backstage-community/plugin-tech-radar/v/1.17.0[@backstage-community/plugin-tech-radar]` |1.17.0 +|Tech Radar |`https://npmjs.com/package/@backstage-community/plugin-tech-radar/v/1.17.0[@backstage-community/plugin-tech-radar]` |1.17.0 |`./dynamic-plugins/dist/backstage-community-plugin-tech-radar` -|Tech Radar |`https://npmjs.com/package/@backstage-community/plugin-tech-radar-backend/v/1.16.0[@backstage-community/plugin-tech-radar-backend]` |1.16.0 +|Tech Radar |`https://npmjs.com/package/@backstage-community/plugin-tech-radar-backend/v/1.16.0[@backstage-community/plugin-tech-radar-backend]` |1.16.0 |`./dynamic-plugins/dist/backstage-community-plugin-tech-radar-backend-dynamic` `TECH_RADAR_DATA_URL` -|TechDocs Module Addons Contrib |`https://npmjs.com/package/@backstage/plugin-techdocs-module-addons-contrib/v/1.1.34[@backstage/plugin-techdocs-module-addons-contrib]` |1.1.34 +|TechDocs Module Addons Contrib |`https://npmjs.com/package/@backstage/plugin-techdocs-module-addons-contrib/v/1.1.34[@backstage/plugin-techdocs-module-addons-contrib]` |1.1.34 |`./dynamic-plugins/dist/backstage-plugin-techdocs-module-addons-contrib` -|TechDocs |`https://npmjs.com/package/@backstage/plugin-techdocs/v/1.17.2[@backstage/plugin-techdocs]` |1.17.2 +|TechDocs |`https://npmjs.com/package/@backstage/plugin-techdocs/v/1.17.2[@backstage/plugin-techdocs]` |1.17.2 |`./dynamic-plugins/dist/backstage-plugin-techdocs` -|TechDocs |`https://npmjs.com/package/@backstage/plugin-techdocs-backend/v/2.1.6[@backstage/plugin-techdocs-backend]` |2.1.6 +|TechDocs |`https://npmjs.com/package/@backstage/plugin-techdocs-backend/v/2.1.6[@backstage/plugin-techdocs-backend]` |2.1.6 |`./dynamic-plugins/dist/backstage-plugin-techdocs-backend-dynamic` diff --git a/modules/extend_dynamic-plugins-reference/ref-ga-plugins.template.adoc b/modules/extend_dynamic-plugins-reference/ref-ga-plugins.template.adoc deleted file mode 100644 index 678f44cbde0..00000000000 --- a/modules/extend_dynamic-plugins-reference/ref-ga-plugins.template.adoc +++ /dev/null @@ -1,15 +0,0 @@ -:_mod-docs-content-type: REFERENCE - -// This page is generated! Do not edit the .adoc file, but instead run rhdh-supported-plugins.sh to regen this page from the latest plugin metadata. - -[id="ga-plugins_{context}"] -= {company-name} {generally-available} (GA) plugins - -[role="_abstract"] -{company-name} provides full support for the following %%COUNT_1%% dynamic plugins. - -[%header,cols=4*] -|=== -|*Name* |*Plugin* |*Version* |*Path and required variables* -%%TABLE_CONTENT_1%% -|=== diff --git a/modules/extend_dynamic-plugins-reference/ref-technology-preview-plugins.template.adoc b/modules/extend_dynamic-plugins-reference/ref-technology-preview-plugins.template.adoc deleted file mode 100644 index 9932416ee60..00000000000 --- a/modules/extend_dynamic-plugins-reference/ref-technology-preview-plugins.template.adoc +++ /dev/null @@ -1,17 +0,0 @@ -:_mod-docs-content-type: REFERENCE - -// This page is generated! Do not edit the .adoc file, but instead run rhdh-supported-plugins.sh to regen this page from the latest plugin metadata. - -[id="technology-preview-plugins_{context}"] -= {company-name} {technology-preview} plugins - -[role="_abstract"] -{company-name} provides {technology-preview} support for the following %%COUNT_2%% plugins. - -include::../../artifacts/snip-technology-preview.adoc[] - -[%header,cols=4*] -|=== -|*Name* |*Plugin* |*Version* |*Path and required variables* -%%TABLE_CONTENT_2%% -|=== diff --git a/modules/extend_dynamic-plugins-reference/rhdh-supported-plugins.csv b/modules/extend_dynamic-plugins-reference/rhdh-supported-plugins.csv index 0374e616799..d3318a9d36f 100644 --- a/modules/extend_dynamic-plugins-reference/rhdh-supported-plugins.csv +++ b/modules/extend_dynamic-plugins-reference/rhdh-supported-plugins.csv @@ -9,19 +9,17 @@ "GitHub","@backstage/plugin-scaffolder-backend-module-github","Backend","0.9.7","Production","active","./dynamic-plugins/dist/backstage-plugin-scaffolder-backend-module-github-dynamic",";","Disabled" "GitLab Org","@backstage/plugin-catalog-backend-module-gitlab-org","Backend","0.2.19","Production","active","./dynamic-plugins/dist/backstage-plugin-catalog-backend-module-gitlab-org-dynamic","`GITLAB_HOST`;`GITLAB_ORG_GROUP`;","Disabled" "GitLab","@backstage/plugin-catalog-backend-module-gitlab","Backend","0.8.1","Production","active","./dynamic-plugins/dist/backstage-plugin-catalog-backend-module-gitlab-dynamic","`GITLAB_DISCOVERY_GROUP`;`GITLAB_HOST`;","Disabled" -"Global Floating Action Button","@red-hat-developer-hub/backstage-plugin-global-floating-action-button","Frontend","1.9.3","Production","active","./dynamic-plugins/dist/red-hat-developer-hub-backstage-plugin-global-floating-action-button",";","Enabled" "Global Header","@red-hat-developer-hub/backstage-plugin-global-header","Frontend","1.21.5","Production","active","./dynamic-plugins/dist/red-hat-developer-hub-backstage-plugin-global-header",";","Enabled" -"Http Request","@roadiehq/scaffolder-backend-module-http-request","Backend","5.6.0","Production","active","oci://registry.access.redhat.com/rhdh/roadiehq-scaffolder-backend-module-http-request@sha256:2e498033306df2711ec2a548db0a9db921f911eb9b99af2b9e44162b4851bbe8",";","Disabled" "Keycloak","@backstage-community/plugin-catalog-backend-module-keycloak","Backend","3.19.2","Production","active","./dynamic-plugins/dist/backstage-community-plugin-catalog-backend-module-keycloak-dynamic","`KEYCLOAK_BASE_URL`;`KEYCLOAK_CLIENT_ID`;`KEYCLOAK_CLIENT_SECRET`;`KEYCLOAK_LOGIN_REALM`;`KEYCLOAK_REALM`;","Disabled" "Kubernetes","@backstage/plugin-kubernetes-backend","Backend","0.21.2","Production","active","./dynamic-plugins/dist/backstage-plugin-kubernetes-backend-dynamic","`K8S_CLUSTER_NAME`;`K8S_CLUSTER_TOKEN`;`K8S_CLUSTER_URL`;","Disabled" "Kubernetes","@backstage-community/plugin-scaffolder-backend-module-kubernetes","Backend","2.17.1","Production","active","./dynamic-plugins/dist/backstage-community-plugin-scaffolder-backend-module-kubernetes-dynamic",";","Disabled" "Ldap","@backstage/plugin-catalog-backend-module-ldap","Backend","0.12.3","Production","active","./dynamic-plugins/dist/backstage-plugin-catalog-backend-module-ldap-dynamic","`LDAP_BIND_DN`;`LDAP_BIND_SECRET`;`LDAP_GROUPS_DN`;`LDAP_TARGET_URL`;`LDAP_USERS_DN`;","Disabled" +"Lightspeed","@red-hat-developer-hub/backstage-plugin-lightspeed","Frontend","2.9.0","Production","active","oci://registry.access.redhat.com/rhdh/red-hat-developer-hub-backstage-plugin-lightspeed@sha256:c68a58f268485e79e60a21e4f45e1c27b446bc17fcbb1af8a0e35b04d4f5cea7",";","Enabled" +"Lightspeed","@red-hat-developer-hub/backstage-plugin-lightspeed-backend","Backend","2.9.0","Production","active","oci://registry.access.redhat.com/rhdh/red-hat-developer-hub-backstage-plugin-lightspeed-backend@sha256:3147f09ad990fbcd22a9f613d6982b4534b235a2c2d27684fc1834e196cd83ff",";","Enabled" "MS Graph","@backstage/plugin-catalog-backend-module-msgraph","Backend","0.9.1","Production","active","./dynamic-plugins/dist/backstage-plugin-catalog-backend-module-msgraph-dynamic","`MICROSOFT_CLIENT_ID`;`MICROSOFT_CLIENT_SECRET`;`MICROSOFT_TENANT_ID`;","Disabled" -"Orchestrator Backend Module Loki","@red-hat-developer-hub/backstage-plugin-orchestrator-backend-module-loki","Backend","1.2.6","Production","active","oci://registry.access.redhat.com/rhdh/red-hat-developer-hub-backstage-plugin-orchestrator-backend-module-loki@sha256:d5970c0e63d43162fa77f342a76b3bffbe54fe6cbabc56335ea11ecaa74591c4","`AUTH_TOKEN`;`LOKI_BASE_URL`;","Disabled" -"Orchestrator Form Widgets","@red-hat-developer-hub/backstage-plugin-orchestrator-form-widgets","Frontend","1.10.7","Production","active","oci://registry.access.redhat.com/rhdh/red-hat-developer-hub-backstage-plugin-orchestrator-form-widgets@sha256:b8d9886e39fa1262bfe1046f6ec5825b8e576c4997c744e0f90f722453f35aec",";","Disabled" -"Orchestrator","@red-hat-developer-hub/backstage-plugin-orchestrator","Frontend","5.7.12","Production","active","oci://registry.access.redhat.com/rhdh/red-hat-developer-hub-backstage-plugin-orchestrator@sha256:062a536d266bcd76d454fc9fdc0157b99e62074f6d3304578a68f515ced83e64",";","Disabled" -"Orchestrator","@red-hat-developer-hub/backstage-plugin-orchestrator-backend","Backend","8.9.4","Production","active","oci://registry.access.redhat.com/rhdh/red-hat-developer-hub-backstage-plugin-orchestrator-backend@sha256:365d67fddeeaa2cf0b0266b012eb3e74fb5d5071b848059662353e62e7f9ceab",";","Disabled" -"Orchestrator","@red-hat-developer-hub/backstage-plugin-scaffolder-backend-module-orchestrator","Backend","1.5.4","Production","active","oci://registry.access.redhat.com/rhdh/red-hat-developer-hub-backstage-plugin-scaffolder-backend-module-orchestrator@sha256:5b52adc153afcf79fb134262aa01b1e117085bf59c1a1997ff2e3a6f31c7647a",";","Disabled" +"Orchestrator Form Widgets","@red-hat-developer-hub/backstage-plugin-orchestrator-form-widgets","Frontend","1.10.8","Production","active","oci://registry.access.redhat.com/rhdh/red-hat-developer-hub-backstage-plugin-orchestrator-form-widgets@sha256:5671a9d01cb98b7172019ddb3b524b5c8089a081273db00c9da24057f9bb8db3",";","Disabled" +"Orchestrator","@red-hat-developer-hub/backstage-plugin-orchestrator","Frontend","5.7.13","Production","active","oci://registry.access.redhat.com/rhdh/red-hat-developer-hub-backstage-plugin-orchestrator@sha256:a26989fc49b4f2ce58e4764e928eacff000d4dd9007d06c553ce2ff6fe60c41f",";","Disabled" +"Orchestrator","@red-hat-developer-hub/backstage-plugin-orchestrator-backend","Backend","8.9.5","Production","active","oci://registry.access.redhat.com/rhdh/red-hat-developer-hub-backstage-plugin-orchestrator-backend@sha256:5e2e95950c3112a10c23c0fddae86b257d0cc16f9cde3dd2fc945b6a7be5f7c5",";","Disabled" "Quickstart","@red-hat-developer-hub/backstage-plugin-quickstart","Frontend","1.9.6","Production","active","./dynamic-plugins/dist/red-hat-developer-hub-backstage-plugin-quickstart",";","Enabled" "RBAC","@backstage-community/plugin-rbac","Frontend","1.52.4","Production","active","./dynamic-plugins/dist/backstage-community-plugin-rbac",";","Disabled" "Regex","@backstage-community/plugin-scaffolder-backend-module-regex","Backend","2.15.1","Production","active","./dynamic-plugins/dist/backstage-community-plugin-scaffolder-backend-module-regex-dynamic",";","Enabled" diff --git a/modules/extend_dynamic-plugins-reference/rhdh-supported-plugins.sh b/modules/extend_dynamic-plugins-reference/rhdh-supported-plugins.sh index 96f8d0533cb..5d8cd5b38ef 100755 --- a/modules/extend_dynamic-plugins-reference/rhdh-supported-plugins.sh +++ b/modules/extend_dynamic-plugins-reference/rhdh-supported-plugins.sh @@ -26,6 +26,14 @@ SKIP_COMMUNITY_TABLE=0 rhdhRepo="https://github.com/redhat-developer/rhdh" overlaysRepo="https://github.com/redhat-developer/rhdh-plugin-export-overlays" +INDEX_TAG="${BRANCH#release-}" +if [[ $INDEX_TAG == "main" ]]; then + INDEX_TAG="next" +fi +CATALOG_INDEX_REGISTRY="${CATALOG_INDEX_REGISTRY:-quay.io/rhdh}" + +catalogindextmpdir="/tmp/plugin-catalog-index_${BRANCH}" + debug() { if [[ $QUIET -eq 0 ]]; then echo -e "${orange}[DEBUG] $1${norm}" @@ -43,13 +51,14 @@ debug() { usage() { cat </dev/null || exit - git clone "$rhdhRepo" --depth 1 -b "$BRANCH" "rhdh_$BRANCH" --quiet - popd >/dev/null || exit - fi -fi - # need this for BOTH the community table generation AND the dynamic plugin tables generation if [[ ! -d "$overlaystmpdir" ]]; then echo -e "${green}Cloning $overlaysRepo (branch: $BRANCH)...${norm}" @@ -118,34 +112,64 @@ if [[ ! -d "$overlaystmpdir" ]]; then popd >/dev/null || exit fi -# thanks to https://stackoverflow.com/questions/42925485/making-a-script-that-transforms-sentences-to-title-case -# shellcheck disable=SC2048 disable=SC2086 -titlecase() { - for f in ${*} ; do \ - case $f in - aap) echo -n "Ansible Automation Platform (AAP) ";; - # UPPERCASE these exceptions - acr|cd|ocm|rbac) echo -n "$(echo "$f" | tr '[:lower:]' '[:upper:]') ";; - # MixedCase exceptions - argocd) echo -n "Argo CD ";; - github) echo -n "GitHub ";; - gitlab) echo -n "GitLab ";; - jfrog) echo -n "JFrog ";; - msgraph) echo -n "MS Graph ";; - pagerduty) echo -n "PagerDuty ";; - servicenow) echo -n "ServiceNow ";; - sonarqube) echo -n "SonarQube ";; - techdocs) echo -n "TechDocs ";; - # Uppercase the first letter - *) - first_char=$(echo "$f" | cut -c1 | tr '[:lower:]' '[:upper:]') - rest_chars=$(echo "$f" | cut -c2-) - echo -n "${first_char}${rest_chars} " - ;; - esac; - done; echo; +fetch_catalog_index() { + local image="${CATALOG_INDEX_REGISTRY}/plugin-catalog-index:${INDEX_TAG}" + if ! command -v skopeo >/dev/null 2>&1; then + echo -e "${red}[ERROR] skopeo is required but not found.${norm}" >&2 + exit 1 + fi + if ! command -v jq >/dev/null 2>&1; then + echo -e "${red}[ERROR] jq is required but not found.${norm}" >&2 + exit 1 + fi + echo -e "${green}Fetching $image...${norm}" + rm -rf "$catalogindextmpdir" + mkdir -p "$catalogindextmpdir" + local archive="${catalogindextmpdir}/image.tar" + local unpack="${catalogindextmpdir}/unpack" + skopeo copy "docker://${image}" "docker-archive:${archive}" + mkdir -p "$unpack" + tar xf "$archive" -C "$unpack" + for layer in $(jq -r '.[0].Layers[]' "$unpack/manifest.json"); do + tar xf "$unpack/$layer" -C "$catalogindextmpdir" + done + rm -rf "$unpack" "$archive" } +generate_dynamic_plugins_table() { + fetch_catalog_index + local src="${catalogindextmpdir}/extend_dynamic-plugins-reference" + local -a files=( + con-preinstalled-dynamic-plugins.adoc + ref-deprecated-plugins.adoc + ref-ga-plugins.adoc + ref-technology-preview-plugins.adoc + rhdh-supported-plugins.csv + ) + ls ${catalogindextmpdir} + if [[ ! -d "$src" ]]; then + echo -e "${red}[ERROR] Missing directory in catalog index image: $src${norm}" >&2 + exit 1 + fi + for f in "${files[@]}"; do + if [[ ! -f "$src/$f" ]]; then + echo -e "${red}[ERROR] Missing file in catalog index image: $src/$f${norm}" >&2 + exit 1 + fi + cp "$src/$f" "${SCRIPT_DIR}/$f" + echo -e "${green}Copied $f from catalog index${norm}" + done +} + +# Call function if not skipped +if [[ $SKIP_TABLES -eq 0 ]]; then + generate_dynamic_plugins_table +fi + +# ============================================================================ +# Generate ref-community-supported-plugins.adoc from rhdh-plugin-export-overlays +# ============================================================================ + # Extract ${VAR_NAME} placeholders from spec.appConfigExamples[0].content for docs tables. get_required_variables() { local metadata_file="$1" @@ -162,401 +186,6 @@ get_required_variables() { printf '%s' "$Required_Variables" } - -generate_dynamic_plugins_table() { - # generate a list of plugin:version mapping from the following files - # * dynamic-plugins/imports/package.json#.peerDependencies or .dependencies - # * packages/app/package.json#.dependencies - # * packages/backend/package.json#.dependencies - pluginVersFile=/tmp/plugin-versions_"${BRANCH}".txt - if [[ -f "${rhdhtmpdir}"/dynamic-plugins/imports/package.json ]]; then - jq -r '.peerDependencies' "${rhdhtmpdir}"/dynamic-plugins/imports/package.json | grep -E -v "\"\*\"|\{|\}" | grep "@" | tr -d "," > "$pluginVersFile" - fi - jq -r '.dependencies' "${rhdhtmpdir}"/packages/{app,backend}/package.json | grep -E -v "\"\*\"|\{|\}" | grep "@" | tr -d "," >> "$pluginVersFile" - # Use LC_ALL=C for consistent sorting across different locales - LC_ALL=C sort -u "$pluginVersFile" > "$pluginVersFile".out; mv -f "$pluginVersFile".out "$pluginVersFile" - - rm -fr /tmp/warnings_"${BRANCH}".txt - - # create temporary files instead of associative arrays - TEMP_DIR="/tmp/rhdh-processing_${BRANCH}" - mkdir -p "$TEMP_DIR" - rm -f "$TEMP_DIR"/*.tmp - - # process YAML files from overlays/workspaces/*/metadata/*.yaml - yamls=$(find "${overlaystmpdir}"/workspaces/*/metadata/ -maxdepth 1 -name "*.yaml") - c=0 - tot=0 - for y in $yamls; do - [[ $(basename "$y") == "all.yaml" ]] && continue - (( tot++ )) || true - done - - # string listing the enabled-by-default plugins to add to con-preinstalled-dynamic-plugins.template.adoc - ENABLED_PLUGINS="/tmp/ENABLED_PLUGINS_${BRANCH}.txt"; rm -f "$ENABLED_PLUGINS"; touch "$ENABLED_PLUGINS" - - for y in $yamls; do - [[ $(basename "$y") == "all.yaml" ]] && continue - (( c++ )) || true - echo -e "${green}[$c/$tot] Processing $y${norm}" - Required_Variables="" - - # extract content from YAML - Name=$(yq -r '.metadata.name' "$y") - - # Use .spec.packageName, or if not set use .metadata.name - Plugin=$(yq -r '.spec.packageName // .metadata.name' "$y") - - debug ".spec.packageName | .metadata.name: $Plugin" - - # skip plugins for which there is metadata but which we don't include in default.packages.yaml - if [[ $(yq -r '.packages.enabled[]|select(.package == "'"$Plugin"'")|.package' "${rhdhtmpdir}"/default.packages.yaml) == "" ]] && \ - [[ $(yq -r '.packages.disabled[]|select(.package == "'"$Plugin"'")|.package' "${rhdhtmpdir}"/default.packages.yaml) == "" ]]; then - debug "${red}Skip[0] Plugin = $Plugin not found in default.packages.yaml\n"; continue; - fi - - # If Plugin is still not a proper npm package name, try to construct it - if [[ $Plugin != "@"* ]] && [[ $Plugin == "$Name" ]]; then - Plugin="$(echo "${Plugin}" | sed -r -e 's/([^-]+)-(.+)/\@\1\/\2/' \ - -e 's|janus/idp-|janus-idp/|' \ - -e 's|red/hat-developer-hub-|red-hat-developer-hub/|' \ - -e 's|backstage/community-|backstage-community/|')" - fi - - # Extract lifecycle and path from YAML spec - Lifecycle=$(yq -r '.spec.lifecycle // "unknown"' "$y") - - # Use the actual dynamicArtifact path from YAML - Path=$(yq -r '.spec.dynamicArtifact // ""' "$y") - - # Fallback to constructed path if not found - if [[ ! $Path || $Path == "null" ]]; then - Path="$(echo "${Plugin/@/}" | tr "/" "-")" - Path="./dynamic-plugins/dist/${Path}-dynamic" - # remove dupe suffixes - Path="${Path/-dynamic-dynamic/-dynamic}" - fi - - debug "Got: Path = $Path" - # DEPRECATED :: Filter 0: Only dynamic plugin artifacts under dist root (frontend or backend) or @redhat NRRC registry - # Accept both patterns: - # - Frontend: ./dynamic-plugins/dist/ - # - Backend: ./dynamic-plugins/dist/-dynamic - # - NRRC registry: @redhat/@version (applies to Orchestrator plugins from 1.8 and earlier) - # this change was made since FE plugins were not being included in the .csv file - [[ $Path == ./dynamic-plugins/dist/* ]] || [[ $Path == "@redhat"* ]] || \ - - # Filter 1: Include quay and r.a.r.c references to RHDH dynamic plugins - [[ $Path == "oci://quay.io/rhdh/"* ]] || [[ $Path == "oci://registry.access.redhat.com/rhdh/"* ]] || \ - { debug "Skip[1] Path = $Path\n"; continue; } - - # Filter 2: Exclude oci://ghcr.io/ community paths; - [[ $Path == "oci://ghcr.io/"* ]] && \ - { debug "Skip[2] Path = $Path\n"; continue; } - - # DEPRECATED :: Filter 3: Handle @redhat packages - exclude unless they have dynamicArtifact from NRRC registry - # Plugin = @red-hat-developer-hub/backstage-plugin-orchestrator - # .spec.dynamicArtifact = oci://quay.io/rhdh/red-hat-developer-hub-backstage-plugin-orchestrator-backend-module-loki@sha256:779f888d47a9b87ad81a13897e171fe4a6a67498a937d7560026dd081361a3b2 - [[ $Plugin == "@redhat"* ]] && [[ $(yq -r '.spec.dynamicArtifact // ""' "$y") == "@redhat"* ]] && \ - { debug "Skip[3] Plugin = $Plugin\n"; continue; } - - # For extensions YAML files, skip the default config check for inclusion - if [[ "$y" == *"/metadata/"* ]]; then - # Process extensions packages regardless of default config - debug "Processing extensions package: $Name" - elif [[ ! $Path ]]; then - continue - fi - - if [[ $Path ]] || [[ "$y" == *"/metadata/"* ]]; then - # Extract role and version from YAML - updated paths - Role=$(yq -r '.spec.backstage.role // "unknown"' "$y") - VersionJQ=$(yq -r '.spec.version // "0.0.0"' "$y") - # check this version against other references to the plugin in - # * dynamic-plugins/imports/package.json#.peerDependencies or .dependencies - # * packages/app/package.json#.dependencies - # * packages/backend/package.json#.dependencies - # echo "[DEBUG] Check version of $Name is really $VersionJQ (from Path = $Path)..." - # shellcheck disable=SC2086 - match=$(grep "\"$Name\": \"" $pluginVersFile || true) - Version=$VersionJQ - if [[ $match ]]; then - Version=$(echo "${match}" | sed -r -e "s/.+\": \"([0-9.]+)\"/\1/") - if [[ "$Version" != "$VersionJQ" ]]; then - echo -e "${blue}[WARN] ! Using $pluginVersFile version = $Version, not $VersionJQ from $Path ${norm}" | tee -a /tmp/warnings_"${BRANCH}".txt - fi - fi - - # check if there's a newer version at npmjs.com and warn if so - # for tags and associated repo digests (git head) - # curl -sSLko- https://registry.npmjs.org/@janus-idp%2fcli | jq -r '.versions[]|(.version+", "+.gitHead)' | LC_ALL=C sort -uV - # for timestamp when tag is created - # curl -sSLko- https://registry.npmjs.org/@janus-idp%2fcli | jq -r '.time' | grep -v -E "created|modified|{|}" | LC_ALL=C sort -uV - # echo "Searching for ${Plugin/\//%2f} at npmjs.org..." - allVersionsPublished="$(curl -sSLko- "https://registry.npmjs.org/${Plugin/\//%2f}" | jq -r '.versions[].version')" - # echo "Found $allVersionsPublished" - # clean out any pre-release versions - latestXYRelease="$(echo "$allVersionsPublished" | grep -v -E -- "next|alpha|-" | grep -E "^${Version%.*}" | LC_ALL=C sort -u | tail -1)" - # echo "[DEBUG] Latest x.y version at https://registry.npmjs.org/${Plugin/\//%2f} : $latestXYRelease" - if [[ "$latestXYRelease" != "$Version" ]]; then - echo -e "${blue}[WARN] Can upgrade $Version to https://www.npmjs.com/package/$Plugin/v/$latestXYRelease ${norm}" | tee -a /tmp/warnings_"${BRANCH}".txt - # echo | tee -a /tmp/warnings_"${BRANCH}".txt - fi - - # Extract support level from YAML metadata - Support_Level="Community Support" - # Check for Red Hat authorship and support level - author=$(yq -r '.spec.author // "unknown"' "$y") - support=$(yq -r '.spec.support // "unknown"' "$y") - - # only RH authoried content should show up as GA - # exception for the Roadie http-request scaffolder, too - if [[ $author == "Red Hat"* ]] || [[ $Plugin == "@roadiehq/scaffolder-backend-module-http-request" ]]; then - if [[ $support == "production"* ]] || [[ $support == "generally-available"* ]]; then - Support_Level="Production" - elif [[ $support == "tech-preview"* ]]; then - Support_Level="Red Hat Tech Preview" - elif [[ $support == "community"* ]] || [[ $support == "dev-preview"* ]]; then - Support_Level="Community Support" - else - echo -e "${blue}[WARN] Could not compute support level for Path = $Path, Plugin = $Plugin" | tee -a "${ENABLED_PLUGINS}.errors" - fi - fi - - # compute Default (enabled or disabled status) from default.packages.yaml - # shellcheck disable=SC2016 - Default="Enabled" - if [[ $(yq -r '.packages.disabled[]|select(.package == "'"$Plugin"'")|.package' "${rhdhtmpdir}"/default.packages.yaml) == "$Plugin" ]]; then - Default="Disabled" - fi - # debug "Using Plugin = $Plugin got Default = $Default" - # null or false == enabled by default - if [[ $Default == "Enabled" ]]; then - if [[ $Support_Level == "Production" ]]; then - # see https://issues.redhat.com/browse/RHIDP-3187 - only Production-level support (GA) plugins should be enabled by default - echo "* \`${Plugin}\`" >> "$ENABLED_PLUGINS" - elif [[ ${Support_Level} == "Red Hat Tech Preview" ]]; then - # as discussed in RHDH SOS on Jul 14, we are now opening the door for TP plugins to be on by default. - # PM (Ben) and Support (Tim) are cool with this as long as the docs clearly state - # what is TP, and how to disable the TP content - echo -e "${blue}[WARN] $Plugin is enabled by default but is only $Support_Level ${norm}" | tee -a "${ENABLED_PLUGINS}.errors" - echo "* \`${Plugin}\`" >> "$ENABLED_PLUGINS" - else - echo -e "${red}[ERROR] $Plugin should not be enabled by default as its support level is $Support_Level${norm}" | tee -a "${ENABLED_PLUGINS}.errors" - fi - fi - - # compute Required_Variables from appConfigExamples in YAML - Required_Variables=$(get_required_variables "$y") - Required_Variables_CSV=$(echo -e "$Required_Variables" | tr -s "\n" ";") - # not currently used due to policy and support concern with upstream content linked from downstream doc - # URL="https://www.npmjs.com/package/$Plugin" - - # Build a human-readable name from the package - # Start with package name without scope (e.g., "backstage-plugin-quickstart") - pkg_no_scope="${Plugin#@}" - pkg_no_scope="${pkg_no_scope#*/}" - - # Special cases for specific plugins - case "$Plugin" in - *pagerduty*) PrettyName="PagerDuty" ;; - *redhat-argocd*) PrettyName="Argo CD (Red Hat)" ;; - *scaffolder-backend-argocd*) PrettyName="Argo CD" ;; - *notifications-backend-module-email*) PrettyName="Notifications" ;; - *) - # Strip common vendor/prefix tokens and backend suffix - ProcessedName=$(echo "$pkg_no_scope" | sed -r \ - -e 's@^backstage-community-@@' \ - -e 's@^red-hat-developer-hub-@@' \ - -e 's@^redhat-@@' \ - -e 's@^roadiehq-@@' \ - -e 's@^immobiliarelabs-@@' \ - -e 's@^parfuemerie-douglas-@@' \ - -e 's@^backstage-plugin-@@' \ - -e 's@^plugin-@@' \ - -e 's@^catalog-backend-module-@@' \ - -e 's@^plugin-catalog-backend-module-@@' \ - -e 's@^scaffolder-backend-module-@@' \ - -e 's@-backend$@@' \ - ) - PrettyName="$(titlecase "${ProcessedName//-/ }")" - ;; - esac - # Trim trailing whitespace from PrettyName - PrettyName="$(echo -e "$PrettyName" | sed -E 's/[[:space:]]+$//')" - - # useful console output - if [[ $QUIET -eq 0 ]]; then - for col in Name PrettyName Role Plugin Version Support_Level Lifecycle Path Required_Variables Default; do - debug " * $col = ${!col}" - done - fi - - # save in an array sorted by name, then role, with frontend before backend plugins (for consistency with 1.1 markup) - RoleSort=1; if [[ $Role != *"front"* ]]; then RoleSort=2; Role="Backend"; else Role="Frontend"; fi - if [[ $Plugin == *"scaffolder"* ]]; then RoleSort=3; fi - - # Use temporary files to allow sorting later - key="$PrettyName-$RoleSort-$Role-$Plugin" - if [[ $Path ]]; then - # shellcheck disable=SC1087 - adoc_content="|$PrettyName |\`https://npmjs.com/package/$Plugin/v/$Version[$Plugin]\` |$Version \n|\`$Path\`\n\n$Required_Variables" - else - # TODO this error should never happen! - echo -e "${red}[ERROR] ! Path not found for $Plugin $Version ${norm}" | tee -a /tmp/warnings_"${BRANCH}".txt - # shellcheck disable=SC1087 - adoc_content="|$PrettyName |\`https://npmjs.com/package/$Plugin/v/$Version[$Plugin]\` |$Version \n|\n\n$Required_Variables" - fi - csv_content="\"$PrettyName\",\"$Plugin\",\"$Role\",\"$Version\",\"$Support_Level\",\"$Lifecycle\",\"$Path\",\"${Required_Variables_CSV}\",\"$Default\"" - - # split into three tables based on support level - if [[ ${Lifecycle} == "deprecated" ]]; then - echo "$key|$adoc_content" >> "$TEMP_DIR/adoc.deprecated.tmp" - elif [[ ${Support_Level} == "Production" ]]; then - echo "$key|$adoc_content" >> "$TEMP_DIR/adoc.production.tmp" - elif [[ ${Support_Level} == "Red Hat Tech Preview" ]]; then - echo "$key|$adoc_content" >> "$TEMP_DIR/adoc.tech-preview.tmp" - # else - # echo "$key|$adoc_content" >> "$TEMP_DIR/adoc.community.tmp" - fi - - # Group CSV by support level - SupportSort=3 - if [[ ${Lifecycle} == "deprecated" ]]; then - SupportSort=4 - elif [[ ${Support_Level} == "Production" ]]; then - SupportSort=1 - elif [[ ${Support_Level} == "Red Hat Tech Preview" ]]; then - SupportSort=2 - fi - csv_key="$SupportSort-$PrettyName-$RoleSort-$Role-$Plugin" - echo "$csv_key|$csv_content" >> "$TEMP_DIR/csv.tmp" - fi - echo - done - - c=0 - debug "Creating .csv ..." - - # create .csv file with header - echo -e "\"Name\",\"Plugin\",\"Role\",\"Version\",\"Support Level\",\"Lifecycle\",\"Path\",\"Required Variables\",\"Default\"" > "${0/.sh/.csv}" - - num_plugins=() - # Process temporary files - # 1) Production - temp_file="$TEMP_DIR/adoc.production.tmp" - out_file="${0/.sh/.ref-ga-plugins}" - rm -f "$out_file" - count=0 - if [[ -f "$temp_file" ]]; then - LC_ALL=C sort "$temp_file" | while IFS='|' read -r key content; do - (( count = count + 1 )) - debug " * [$count] $key [ ${out_file##*/} ]" - echo -e "$content" >> "$out_file" - done - count=$(wc -l < "$temp_file") - fi - # shellcheck disable=SC2206 - num_plugins+=($count) - - # 2) Tech Preview - temp_file="$TEMP_DIR/adoc.tech-preview.tmp" - out_file="${0/.sh/.ref-technology-preview-plugins}" - rm -f "$out_file" - count=0 - if [[ -f "$temp_file" ]]; then - LC_ALL=C sort "$temp_file" | while IFS='|' read -r key content; do - (( count = count + 1 )) - debug " * [$count] $key [ ${out_file##*/} ]" - echo -e "$content" >> "$out_file" - done - count=$(wc -l < "$temp_file") - fi - # shellcheck disable=SC2206 - num_plugins+=($count) - - - # 3) Deprecated - temp_file="$TEMP_DIR/adoc.deprecated.tmp" - out_file="${0/.sh/.ref-deprecated-plugins}" - rm -f "$out_file" - count=0 - if [[ -f "$temp_file" ]]; then - LC_ALL=C sort "$temp_file" | while IFS='|' read -r key content; do - (( count = count + 1 )) - debug " * [$count] $key [ ${out_file##*/} ]" - echo -e "$content" >> "$out_file" - done - count=$(wc -l < "$temp_file") - fi - # shellcheck disable=SC2206 - num_plugins+=($count) - - # Process CSV: LC_ALL=C sort by SupportLC_ALL=C sort (1,2,3,4) then PrettyName, and omit techdocs - if [[ -f "$TEMP_DIR/csv.tmp" ]]; then - debug - LC_ALL=C sort -t '|' -k1,1 -k2,2 "$TEMP_DIR/csv.tmp" | while IFS='|' read -r key content; do - # RHIDP-4196 omit techdocs plugins from the .csv - if [[ $key != *"techdocs"* ]]; then - echo -e "$content" >> "${0/.sh/.csv}" - else - debug "Omit plugin $key from .csv file" - fi - done - fi - - debug - - # merge the content from the 3 .adocX files into the .template.adoc file, replacing the TABLE_CONTENT markers - count=1 - index=0 - empties=0 - for d in ref-ga-plugins ref-technology-preview-plugins ref-deprecated-plugins; do - (( index = count - 1 )) - this_num_plugins=${num_plugins[$index]} - echo -n -e "${green}[$count] Processing $d ${norm}..." - adocfile="${0/.sh/.${d}}" - if [[ $this_num_plugins -gt 0 ]]; then - sed -e "/%%TABLE_CONTENT_${count}%%/{r $adocfile" -e 'd;}' \ - -e "s/\%\%COUNT_${count}\%\%/$this_num_plugins/" \ - "${0/rhdh-supported-plugins.sh/${d}.template.adoc}" > "${0/rhdh-supported-plugins.sh/${d}.adoc}" - elif [[ $d == ref-deprecated-plugins ]]; then - - echo -e "${blue} no plugins to include: ${d}.adoc table removed.${norm}" - (( empties = empties + 1 )) - # Only ref-deprecated-plugins can be empty; print through [role="_abstract"], then fixed sentence ({product} etc. resolve at book build). - { - sed -n '1,/^\[role="_abstract"\]$/p' "${0/rhdh-supported-plugins.sh/${d}.template.adoc}" - printf '%s\n' 'There are no deprecated plugins in this release of {product} ({product-very-short})' - } > "${0/rhdh-supported-plugins.sh/${d}.adoc}" - fi - rm -f "$adocfile" - echo "" - (( count = count + 1 )) - done - - # LC_ALL=C sort the list of enabled plugins - LC_ALL=C sort -uV "$ENABLED_PLUGINS" > "$ENABLED_PLUGINS".sorted; mv -f "$ENABLED_PLUGINS".sorted "$ENABLED_PLUGINS" - - # shellcheck disable=SC2002 - COUNT_ENABLED_PLUGINS=$(cat "$ENABLED_PLUGINS" | wc -l ) # if we use wc by itself we get the count AND the filename; only want the count - # count enabled plugins - echo "Got COUNT_ENABLED_PLUGINS = $COUNT_ENABLED_PLUGINS preinstalled plugins" - - # inject ENABLED_PLUGINS into con-preinstalled-dynamic-plugins.template.adoc, and the counter - sed -r -e "/%%ENABLED_PLUGINS%%/{r $ENABLED_PLUGINS" -e 'd;}' \ - -e "s/%%COUNT_ENABLED_PLUGINS%%/$COUNT_ENABLED_PLUGINS/" \ - "${0/rhdh-supported-plugins.sh/con-preinstalled-dynamic-plugins.template.adoc}" > "${0/rhdh-supported-plugins.sh/con-preinstalled-dynamic-plugins.adoc}" -} - -# Call function if not skipped -if [[ $SKIP_TABLES -eq 0 ]]; then - generate_dynamic_plugins_table -fi - -# ============================================================================ -# Generate ref-community-supported-plugins.adoc from rhdh-plugin-export-overlays -# ============================================================================ generate_community_table() { if [[ ! -d "$overlaystmpdir" ]]; then echo -e "${red}[ERROR] Overlays repo not found: $overlaystmpdir${norm}" @@ -732,9 +361,8 @@ popd >/dev/null || exit # cleanup rm -f "$ENABLED_PLUGINS" "${ENABLED_PLUGINS}.errors" rm -rf "$TEMP_DIR" -# rm -fr "${rhdhtmpdir}" warnings=$(grep -c "WARN" "/tmp/warnings_${BRANCH}.txt" 2>/dev/null || echo "0") if [[ $warnings -gt 0 ]]; then echo; echo -e "${blue}[WARN] $warnings warnings collected in /tmp/warnings_${BRANCH}.txt ! Consider upgrading upstream project to newer plugin versions !${norm}" -fi +fi \ No newline at end of file