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 25a02bc561e..e600188fa86 100644 --- a/modules/extend_dynamic-plugins-reference/ref-community-supported-plugins.adoc +++ b/modules/extend_dynamic-plugins-reference/ref-community-supported-plugins.adoc @@ -19,140 +19,308 @@ Replace `` with the version tag corresponding to your {product-short} versi |=== |*Name* |*Version* -|*Path* +|*Path and required variables* |*3Scale* |3.13.0|`oci://ghcr.io/redhat-developer/rhdh-plugin-export-overlays/backstage-community-plugin-3scale-backend:` +`THREESCALE_ACCESS_TOKEN` + +`THREESCALE_BASE_URL` + +` + |*ArgoCD Backend* |1.4.0|`oci://ghcr.io/redhat-developer/rhdh-plugin-export-overlays/backstage-community-plugin-argocd-backend:` +`ARGOCD_AUTH_TOKEN` + +`ARGOCD_INSTANCE1_URL` + +`ARGOCD_PASSWORD` + +`ARGOCD_USERNAME` + +` + |*Azure DevOps Backend* |0.27.0|`oci://ghcr.io/redhat-developer/rhdh-plugin-export-overlays/backstage-community-plugin-azure-devops-backend:` +`AZURE_ORG` + +`AZURE_TOKEN` + +` + |*Catalog Backend Module Azure DevOps Annotator Processor* |0.18.0|`oci://ghcr.io/redhat-developer/rhdh-plugin-export-overlays/backstage-community-plugin-catalog-backend-module-azure-devops-annotator-processor:` +` + |*Catalog Backend Module Bitbucket Cloud* |0.5.9|`oci://ghcr.io/redhat-developer/rhdh-plugin-export-overlays/backstage-plugin-catalog-backend-module-bitbucket-cloud:` +`BITBUCKET_WORKSPACE` + +` + |*Catalog Backend Module Bitbucket Server* |0.5.9|`oci://ghcr.io/redhat-developer/rhdh-plugin-export-overlays/backstage-plugin-catalog-backend-module-bitbucket-server:` +`BITBUCKET_HOST` + +` + |*Datadog* |2.7.2|`oci://ghcr.io/redhat-developer/rhdh-plugin-export-overlays/roadiehq-backstage-plugin-datadog:` +` + |*Dynatrace* |10.17.0|`oci://ghcr.io/redhat-developer/rhdh-plugin-export-overlays/backstage-community-plugin-dynatrace:` +` + |*GitHub Actions* |0.22.0|`oci://ghcr.io/redhat-developer/rhdh-plugin-export-overlays/backstage-community-plugin-github-actions:` +` + |*GitHub Deployments* |0.18.0|`oci://ghcr.io/redhat-developer/rhdh-plugin-export-overlays/backstage-community-plugin-github-deployments:` +` + |*GitHub Discussions* |0.10.0|`oci://ghcr.io/redhat-developer/rhdh-plugin-export-overlays/backstage-community-plugin-github-discussions:` +` + |*GitHub Discussions Search Backend Module* |0.11.0|`oci://ghcr.io/redhat-developer/rhdh-plugin-export-overlays/backstage-community-plugin-search-backend-module-github-discussions:` +`GITHUB_DISCUSSIONS_REPO_URL` + +` + |*GitHub Insights* |3.5.0|`oci://ghcr.io/redhat-developer/rhdh-plugin-export-overlays/roadiehq-backstage-plugin-github-insights:` +` + |*GitHub Issues* |0.21.0|`oci://ghcr.io/redhat-developer/rhdh-plugin-export-overlays/backstage-community-plugin-github-issues:` +` + |*GitHub Pull Requests* |3.7.0|`oci://ghcr.io/redhat-developer/rhdh-plugin-export-overlays/roadiehq-backstage-plugin-github-pull-requests:` +` + |*GitHub Pull Requests Board* |0.16.0|`oci://ghcr.io/redhat-developer/rhdh-plugin-export-overlays/backstage-community-plugin-github-pull-requests-board:` +` + |*GitLab Backend* |7.0.1|`oci://ghcr.io/redhat-developer/rhdh-plugin-export-overlays/immobiliarelabs-backstage-plugin-gitlab-backend:` +`GITLAB_HOST` + +`GITLAB_TOKEN` + +` + |*JFrog Artifactory* |1.28.0|`oci://ghcr.io/redhat-developer/rhdh-plugin-export-overlays/backstage-community-plugin-jfrog-artifactory:` +` + |*Jenkins Backend* |0.27.0|`oci://ghcr.io/redhat-developer/rhdh-plugin-export-overlays/backstage-community-plugin-jenkins-backend:` +`JENKINS_TOKEN` + +`JENKINS_URL` + +`JENKINS_USERNAME` + +` + |*Jenkins Scaffolder Backend Module* |0.20.0|`oci://ghcr.io/redhat-developer/rhdh-plugin-export-overlays/backstage-community-plugin-scaffolder-backend-module-jenkins:` +` + |*Jira* |2.14.0|`oci://ghcr.io/redhat-developer/rhdh-plugin-export-overlays/roadiehq-backstage-plugin-jira:` +` + |*Lighthouse Backend* |0.21.0|`oci://ghcr.io/redhat-developer/rhdh-plugin-export-overlays/backstage-community-plugin-lighthouse-backend:` +` + |*Nexus Repository Manager* |1.23.2|`oci://ghcr.io/redhat-developer/rhdh-plugin-export-overlays/backstage-community-plugin-nexus-repository-manager:` +` + |*PagerDuty Backend* |0.12.0|`oci://ghcr.io/redhat-developer/rhdh-plugin-export-overlays/pagerduty-backstage-plugin-backend:` +`PAGERDUTY_API_BASE` + +`PAGERDUTY_CLIENT_ID` + +`PAGERDUTY_CLIENT_SECRET` + +`PAGERDUTY_SUBDOMAIN` + +` + |*PagerDuty Entity Processor* |0.3.10|`oci://ghcr.io/redhat-developer/rhdh-plugin-export-overlays/pagerduty-backstage-plugin-entity-processor:` +` + |*PagerDuty Scaffolder Actions* |0.2.9|`oci://ghcr.io/redhat-developer/rhdh-plugin-export-overlays/pagerduty-backstage-plugin-scaffolder-actions:` +` + |*Quay Backend* |1.14.0|`oci://ghcr.io/redhat-developer/rhdh-plugin-export-overlays/backstage-community-plugin-quay-backend:` +` + |*Roadie ArgoCD Backend* |4.8.0|`oci://ghcr.io/redhat-developer/rhdh-plugin-export-overlays/roadiehq-backstage-plugin-argo-cd-backend:` +`ARGOCD_AUTH_TOKEN` + +`ARGOCD_INSTANCE1_URL` + +`ARGOCD_PASSWORD` + +`ARGOCD_USERNAME` + +` + |*Scaffolder Backend ArgoCD* |1.8.1|`oci://ghcr.io/redhat-developer/rhdh-plugin-export-overlays/roadiehq-scaffolder-backend-argocd:` +`ARGOCD_AUTH_TOKEN` + +`ARGOCD_INSTANCE1_URL` + +`ARGOCD_PASSWORD` + +`ARGOCD_USERNAME` + +` + |*Scaffolder Backend Module AWS* |2.8.2|`oci://ghcr.io/redhat-developer/rhdh-plugin-export-overlays/roadiehq-scaffolder-backend-module-aws:` +`AWS_ACCESS_KEY_ID` + +`AWS_SECRET_ACCESS_KEY` + +` + |*Scaffolder Backend Module Azure* |0.2.19|`oci://ghcr.io/redhat-developer/rhdh-plugin-export-overlays/backstage-plugin-scaffolder-backend-module-azure:` +` + |*Scaffolder Backend Module Azure DevOps* |0.23.0|`oci://ghcr.io/redhat-developer/rhdh-plugin-export-overlays/backstage-community-plugin-scaffolder-backend-module-azure-devops:` +` + |*Scaffolder Backend Module Bitbucket Cloud* |0.3.4|`oci://ghcr.io/redhat-developer/rhdh-plugin-export-overlays/backstage-plugin-scaffolder-backend-module-bitbucket-cloud:` +` + |*Scaffolder Backend Module Bitbucket Server* |0.2.19|`oci://ghcr.io/redhat-developer/rhdh-plugin-export-overlays/backstage-plugin-scaffolder-backend-module-bitbucket-server:` +` + |*Scaffolder Backend Module DotNet* |0.13.0|`oci://ghcr.io/redhat-developer/rhdh-plugin-export-overlays/backstage-community-plugin-scaffolder-backend-module-dotnet:` +` + |*Scaffolder Backend Module Gerrit* |0.2.19|`oci://ghcr.io/redhat-developer/rhdh-plugin-export-overlays/backstage-plugin-scaffolder-backend-module-gerrit:` +` + |*Scaffolder Backend Module Quay* |2.18.0|`oci://ghcr.io/redhat-developer/rhdh-plugin-export-overlays/backstage-community-plugin-scaffolder-backend-module-quay:` +` + |*Scaffolder Backend Module ServiceNow* |2.15.0|`oci://ghcr.io/redhat-developer/rhdh-plugin-export-overlays/backstage-community-plugin-scaffolder-backend-module-servicenow:` +`SERVICENOW_BASE_URL` + +`SERVICENOW_PASSWORD` + +`SERVICENOW_USERNAME` + +` + |*Scaffolder Backend Module SonarQube* |2.15.0|`oci://ghcr.io/redhat-developer/rhdh-plugin-export-overlays/backstage-community-plugin-scaffolder-backend-module-sonarqube:` +` + |*Scaffolder Backend Module Utils* |4.1.2|`oci://ghcr.io/redhat-developer/rhdh-plugin-export-overlays/roadiehq-scaffolder-backend-module-utils:` +` + |*Search Backend Module Azure DevOps* |0.5.0|`oci://ghcr.io/redhat-developer/rhdh-plugin-export-overlays/backstage-community-plugin-search-backend-module-azure-devops:` +`AZURE_DEVOPS_BASE_URL` + +`AZURE_DEVOPS_ORGANIZATION` + +`AZURE_DEVOPS_PROJECT` + +`AZURE_DEVOPS_TOKEN` + +`AZURE_DEVOPS_WIKI_IDENTIFIER` + +` + |*Security Insights* |3.3.1|`oci://ghcr.io/redhat-developer/rhdh-plugin-export-overlays/roadiehq-backstage-plugin-security-insights:` +` + |*SonarQube Backend* |1.1.1|`oci://ghcr.io/redhat-developer/rhdh-plugin-export-overlays/backstage-community-plugin-sonarqube-backend:` +`SONARQUBE_TOKEN` + +`SONARQUBE_URL` + +` + |*Tekton* |3.37.0|`oci://ghcr.io/redhat-developer/rhdh-plugin-export-overlays/backstage-community-plugin-tekton:` +` + |=== diff --git a/modules/extend_dynamic-plugins-reference/ref-community-supported-plugins.template.adoc b/modules/extend_dynamic-plugins-reference/ref-community-supported-plugins.template.adoc index af3db472ab4..0dae7ed65fc 100644 --- a/modules/extend_dynamic-plugins-reference/ref-community-supported-plugins.template.adoc +++ b/modules/extend_dynamic-plugins-reference/ref-community-supported-plugins.template.adoc @@ -19,7 +19,7 @@ Replace `` with the version tag corresponding to your {product-short} versi |=== |*Name* |*Version* -|*Path* +|*Path and required variables* %%COMMUNITY_TABLE_CONTENT%% |=== diff --git a/modules/extend_dynamic-plugins-reference/rhdh-supported-plugins.sh b/modules/extend_dynamic-plugins-reference/rhdh-supported-plugins.sh index d2e736d6811..21399e90d32 100755 --- a/modules/extend_dynamic-plugins-reference/rhdh-supported-plugins.sh +++ b/modules/extend_dynamic-plugins-reference/rhdh-supported-plugins.sh @@ -146,6 +146,23 @@ titlecase() { done; echo; } +# Extract ${VAR_NAME} placeholders from spec.appConfigExamples[0].content for docs tables. +get_required_variables() { + local metadata_file="$1" + local Required_Variables="" + local appConfig + appConfig=$(yq -r '.spec.appConfigExamples[0].content // empty' "$metadata_file" 2>/dev/null) + if [[ -n "$appConfig" && "$appConfig" != "null" ]]; then + # Extract ${VARIABLE_NAME} patterns + # shellcheck disable=SC2016 + while IFS= read -r var; do + [[ -n "$var" ]] && Required_Variables="${Required_Variables}\`${var}\`\\n\\n" + done < <(echo "$appConfig" | grep -o '\${[^}]*}' | sed 's/\${//g' | sed 's/}//g' | LC_ALL=C sort -u) + fi + 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 @@ -330,18 +347,7 @@ generate_dynamic_plugins_table() { fi # compute Required_Variables from appConfigExamples in YAML - Required_Variables="" - appConfig=$(yq -r '.spec.appConfigExamples[0].content // empty' "$y" 2>/dev/null) - if [[ -n "$appConfig" && "$appConfig" != "null" ]]; then - # Extract ${VARIABLE_NAME} patterns - # shellcheck disable=SC2016 - vars=$(echo "$appConfig" | grep -o '\${[^}]*}' | sed 's/\${//g' | sed 's/}//g' | LC_ALL=C sort -u) - for var in $vars; do - if [[ $var ]]; then - Required_Variables="${Required_Variables}\`$var\`\n\n" - fi - done - fi + 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" @@ -612,6 +618,7 @@ generate_community_table() { plugin_version=$(yq -r '.spec.version // ""' "$metadata_file") dynamic_artifact=$(yq -r '.spec.dynamicArtifact // ""' "$metadata_file") support=$(yq -r '.spec.support // "unknown"' "$metadata_file") + Required_Variables=$(get_required_variables "$metadata_file") # Skip if not a community plugin or no dynamic artifact [[ "$support" != "community" ]] && continue @@ -639,14 +646,14 @@ generate_community_table() { display_title="${plugin_title:-$plugin_name}" if [[ $QUIET -eq 0 ]]; then - echo " * Plugin: $display_title" - echo " Version: $plugin_version" - echo " Path: $new_path" + echo " * Plugin: $display_title" + echo " Version: $plugin_version" + printf ' Path: %s\n\n%b\n' "$new_path" "$Required_Variables" fi # Add to community table (sorted by title) # shellcheck disable=SC2028 - echo "${display_title}||*${display_title}*\n|${plugin_version}|\`${new_path}\`" >> "$COMMUNITY_TABLE_FILE" + echo "${display_title}||*${display_title}*\n|${plugin_version}|\`${new_path}\`\n\n${Required_Variables}\`" >> "$COMMUNITY_TABLE_FILE" community_count=$((community_count + 1)) done