Skip to content

Commit d8f525c

Browse files
authored
RHIDP-13538: add ENV VARS to community plugins table (redhat-developer#2186)
* RHIDP-13538: add ENV VARS to community plugins table Signed-off-by: Kim Tsao <ktsao@redhat.com> * address review comment Signed-off-by: Kim Tsao <ktsao@redhat.com> --------- Signed-off-by: Kim Tsao <ktsao@redhat.com>
1 parent d5bc439 commit d8f525c

3 files changed

Lines changed: 193 additions & 18 deletions

File tree

modules/extend_dynamic-plugins-reference/ref-community-supported-plugins.adoc

Lines changed: 169 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,140 +19,308 @@ Replace `<tag>` with the version tag corresponding to your {product-short} versi
1919
|===
2020
|*Name*
2121
|*Version*
22-
|*Path*
22+
|*Path and required variables*
2323

2424
|*3Scale*
2525
|3.13.0|`oci://ghcr.io/redhat-developer/rhdh-plugin-export-overlays/backstage-community-plugin-3scale-backend:<tag>`
2626

27+
`THREESCALE_ACCESS_TOKEN`
28+
29+
`THREESCALE_BASE_URL`
30+
31+
`
32+
2733
|*ArgoCD Backend*
2834
|1.4.0|`oci://ghcr.io/redhat-developer/rhdh-plugin-export-overlays/backstage-community-plugin-argocd-backend:<tag>`
2935

36+
`ARGOCD_AUTH_TOKEN`
37+
38+
`ARGOCD_INSTANCE1_URL`
39+
40+
`ARGOCD_PASSWORD`
41+
42+
`ARGOCD_USERNAME`
43+
44+
`
45+
3046
|*Azure DevOps Backend*
3147
|0.27.0|`oci://ghcr.io/redhat-developer/rhdh-plugin-export-overlays/backstage-community-plugin-azure-devops-backend:<tag>`
3248

49+
`AZURE_ORG`
50+
51+
`AZURE_TOKEN`
52+
53+
`
54+
3355
|*Catalog Backend Module Azure DevOps Annotator Processor*
3456
|0.18.0|`oci://ghcr.io/redhat-developer/rhdh-plugin-export-overlays/backstage-community-plugin-catalog-backend-module-azure-devops-annotator-processor:<tag>`
3557

58+
`
59+
3660
|*Catalog Backend Module Bitbucket Cloud*
3761
|0.5.9|`oci://ghcr.io/redhat-developer/rhdh-plugin-export-overlays/backstage-plugin-catalog-backend-module-bitbucket-cloud:<tag>`
3862

63+
`BITBUCKET_WORKSPACE`
64+
65+
`
66+
3967
|*Catalog Backend Module Bitbucket Server*
4068
|0.5.9|`oci://ghcr.io/redhat-developer/rhdh-plugin-export-overlays/backstage-plugin-catalog-backend-module-bitbucket-server:<tag>`
4169

70+
`BITBUCKET_HOST`
71+
72+
`
73+
4274
|*Datadog*
4375
|2.7.2|`oci://ghcr.io/redhat-developer/rhdh-plugin-export-overlays/roadiehq-backstage-plugin-datadog:<tag>`
4476

77+
`
78+
4579
|*Dynatrace*
4680
|10.17.0|`oci://ghcr.io/redhat-developer/rhdh-plugin-export-overlays/backstage-community-plugin-dynatrace:<tag>`
4781

82+
`
83+
4884
|*GitHub Actions*
4985
|0.22.0|`oci://ghcr.io/redhat-developer/rhdh-plugin-export-overlays/backstage-community-plugin-github-actions:<tag>`
5086

87+
`
88+
5189
|*GitHub Deployments*
5290
|0.18.0|`oci://ghcr.io/redhat-developer/rhdh-plugin-export-overlays/backstage-community-plugin-github-deployments:<tag>`
5391

92+
`
93+
5494
|*GitHub Discussions*
5595
|0.10.0|`oci://ghcr.io/redhat-developer/rhdh-plugin-export-overlays/backstage-community-plugin-github-discussions:<tag>`
5696

97+
`
98+
5799
|*GitHub Discussions Search Backend Module*
58100
|0.11.0|`oci://ghcr.io/redhat-developer/rhdh-plugin-export-overlays/backstage-community-plugin-search-backend-module-github-discussions:<tag>`
59101

102+
`GITHUB_DISCUSSIONS_REPO_URL`
103+
104+
`
105+
60106
|*GitHub Insights*
61107
|3.5.0|`oci://ghcr.io/redhat-developer/rhdh-plugin-export-overlays/roadiehq-backstage-plugin-github-insights:<tag>`
62108

109+
`
110+
63111
|*GitHub Issues*
64112
|0.21.0|`oci://ghcr.io/redhat-developer/rhdh-plugin-export-overlays/backstage-community-plugin-github-issues:<tag>`
65113

114+
`
115+
66116
|*GitHub Pull Requests*
67117
|3.7.0|`oci://ghcr.io/redhat-developer/rhdh-plugin-export-overlays/roadiehq-backstage-plugin-github-pull-requests:<tag>`
68118

119+
`
120+
69121
|*GitHub Pull Requests Board*
70122
|0.16.0|`oci://ghcr.io/redhat-developer/rhdh-plugin-export-overlays/backstage-community-plugin-github-pull-requests-board:<tag>`
71123

124+
`
125+
72126
|*GitLab Backend*
73127
|7.0.1|`oci://ghcr.io/redhat-developer/rhdh-plugin-export-overlays/immobiliarelabs-backstage-plugin-gitlab-backend:<tag>`
74128

129+
`GITLAB_HOST`
130+
131+
`GITLAB_TOKEN`
132+
133+
`
134+
75135
|*JFrog Artifactory*
76136
|1.28.0|`oci://ghcr.io/redhat-developer/rhdh-plugin-export-overlays/backstage-community-plugin-jfrog-artifactory:<tag>`
77137

138+
`
139+
78140
|*Jenkins Backend*
79141
|0.27.0|`oci://ghcr.io/redhat-developer/rhdh-plugin-export-overlays/backstage-community-plugin-jenkins-backend:<tag>`
80142

143+
`JENKINS_TOKEN`
144+
145+
`JENKINS_URL`
146+
147+
`JENKINS_USERNAME`
148+
149+
`
150+
81151
|*Jenkins Scaffolder Backend Module*
82152
|0.20.0|`oci://ghcr.io/redhat-developer/rhdh-plugin-export-overlays/backstage-community-plugin-scaffolder-backend-module-jenkins:<tag>`
83153

154+
`
155+
84156
|*Jira*
85157
|2.14.0|`oci://ghcr.io/redhat-developer/rhdh-plugin-export-overlays/roadiehq-backstage-plugin-jira:<tag>`
86158

159+
`
160+
87161
|*Lighthouse Backend*
88162
|0.21.0|`oci://ghcr.io/redhat-developer/rhdh-plugin-export-overlays/backstage-community-plugin-lighthouse-backend:<tag>`
89163

164+
`
165+
90166
|*Nexus Repository Manager*
91167
|1.23.2|`oci://ghcr.io/redhat-developer/rhdh-plugin-export-overlays/backstage-community-plugin-nexus-repository-manager:<tag>`
92168

169+
`
170+
93171
|*PagerDuty Backend*
94172
|0.12.0|`oci://ghcr.io/redhat-developer/rhdh-plugin-export-overlays/pagerduty-backstage-plugin-backend:<tag>`
95173

174+
`PAGERDUTY_API_BASE`
175+
176+
`PAGERDUTY_CLIENT_ID`
177+
178+
`PAGERDUTY_CLIENT_SECRET`
179+
180+
`PAGERDUTY_SUBDOMAIN`
181+
182+
`
183+
96184
|*PagerDuty Entity Processor*
97185
|0.3.10|`oci://ghcr.io/redhat-developer/rhdh-plugin-export-overlays/pagerduty-backstage-plugin-entity-processor:<tag>`
98186

187+
`
188+
99189
|*PagerDuty Scaffolder Actions*
100190
|0.2.9|`oci://ghcr.io/redhat-developer/rhdh-plugin-export-overlays/pagerduty-backstage-plugin-scaffolder-actions:<tag>`
101191

192+
`
193+
102194
|*Quay Backend*
103195
|1.14.0|`oci://ghcr.io/redhat-developer/rhdh-plugin-export-overlays/backstage-community-plugin-quay-backend:<tag>`
104196

197+
`
198+
105199
|*Roadie ArgoCD Backend*
106200
|4.8.0|`oci://ghcr.io/redhat-developer/rhdh-plugin-export-overlays/roadiehq-backstage-plugin-argo-cd-backend:<tag>`
107201

202+
`ARGOCD_AUTH_TOKEN`
203+
204+
`ARGOCD_INSTANCE1_URL`
205+
206+
`ARGOCD_PASSWORD`
207+
208+
`ARGOCD_USERNAME`
209+
210+
`
211+
108212
|*Scaffolder Backend ArgoCD*
109213
|1.8.1|`oci://ghcr.io/redhat-developer/rhdh-plugin-export-overlays/roadiehq-scaffolder-backend-argocd:<tag>`
110214

215+
`ARGOCD_AUTH_TOKEN`
216+
217+
`ARGOCD_INSTANCE1_URL`
218+
219+
`ARGOCD_PASSWORD`
220+
221+
`ARGOCD_USERNAME`
222+
223+
`
224+
111225
|*Scaffolder Backend Module AWS*
112226
|2.8.2|`oci://ghcr.io/redhat-developer/rhdh-plugin-export-overlays/roadiehq-scaffolder-backend-module-aws:<tag>`
113227

228+
`AWS_ACCESS_KEY_ID`
229+
230+
`AWS_SECRET_ACCESS_KEY`
231+
232+
`
233+
114234
|*Scaffolder Backend Module Azure*
115235
|0.2.19|`oci://ghcr.io/redhat-developer/rhdh-plugin-export-overlays/backstage-plugin-scaffolder-backend-module-azure:<tag>`
116236

237+
`
238+
117239
|*Scaffolder Backend Module Azure DevOps*
118240
|0.23.0|`oci://ghcr.io/redhat-developer/rhdh-plugin-export-overlays/backstage-community-plugin-scaffolder-backend-module-azure-devops:<tag>`
119241

242+
`
243+
120244
|*Scaffolder Backend Module Bitbucket Cloud*
121245
|0.3.4|`oci://ghcr.io/redhat-developer/rhdh-plugin-export-overlays/backstage-plugin-scaffolder-backend-module-bitbucket-cloud:<tag>`
122246

247+
`
248+
123249
|*Scaffolder Backend Module Bitbucket Server*
124250
|0.2.19|`oci://ghcr.io/redhat-developer/rhdh-plugin-export-overlays/backstage-plugin-scaffolder-backend-module-bitbucket-server:<tag>`
125251

252+
`
253+
126254
|*Scaffolder Backend Module DotNet*
127255
|0.13.0|`oci://ghcr.io/redhat-developer/rhdh-plugin-export-overlays/backstage-community-plugin-scaffolder-backend-module-dotnet:<tag>`
128256

257+
`
258+
129259
|*Scaffolder Backend Module Gerrit*
130260
|0.2.19|`oci://ghcr.io/redhat-developer/rhdh-plugin-export-overlays/backstage-plugin-scaffolder-backend-module-gerrit:<tag>`
131261

262+
`
263+
132264
|*Scaffolder Backend Module Quay*
133265
|2.18.0|`oci://ghcr.io/redhat-developer/rhdh-plugin-export-overlays/backstage-community-plugin-scaffolder-backend-module-quay:<tag>`
134266

267+
`
268+
135269
|*Scaffolder Backend Module ServiceNow*
136270
|2.15.0|`oci://ghcr.io/redhat-developer/rhdh-plugin-export-overlays/backstage-community-plugin-scaffolder-backend-module-servicenow:<tag>`
137271

272+
`SERVICENOW_BASE_URL`
273+
274+
`SERVICENOW_PASSWORD`
275+
276+
`SERVICENOW_USERNAME`
277+
278+
`
279+
138280
|*Scaffolder Backend Module SonarQube*
139281
|2.15.0|`oci://ghcr.io/redhat-developer/rhdh-plugin-export-overlays/backstage-community-plugin-scaffolder-backend-module-sonarqube:<tag>`
140282

283+
`
284+
141285
|*Scaffolder Backend Module Utils*
142286
|4.1.2|`oci://ghcr.io/redhat-developer/rhdh-plugin-export-overlays/roadiehq-scaffolder-backend-module-utils:<tag>`
143287

288+
`
289+
144290
|*Search Backend Module Azure DevOps*
145291
|0.5.0|`oci://ghcr.io/redhat-developer/rhdh-plugin-export-overlays/backstage-community-plugin-search-backend-module-azure-devops:<tag>`
146292

293+
`AZURE_DEVOPS_BASE_URL`
294+
295+
`AZURE_DEVOPS_ORGANIZATION`
296+
297+
`AZURE_DEVOPS_PROJECT`
298+
299+
`AZURE_DEVOPS_TOKEN`
300+
301+
`AZURE_DEVOPS_WIKI_IDENTIFIER`
302+
303+
`
304+
147305
|*Security Insights*
148306
|3.3.1|`oci://ghcr.io/redhat-developer/rhdh-plugin-export-overlays/roadiehq-backstage-plugin-security-insights:<tag>`
149307

308+
`
309+
150310
|*SonarQube Backend*
151311
|1.1.1|`oci://ghcr.io/redhat-developer/rhdh-plugin-export-overlays/backstage-community-plugin-sonarqube-backend:<tag>`
152312

313+
`SONARQUBE_TOKEN`
314+
315+
`SONARQUBE_URL`
316+
317+
`
318+
153319
|*Tekton*
154320
|3.37.0|`oci://ghcr.io/redhat-developer/rhdh-plugin-export-overlays/backstage-community-plugin-tekton:<tag>`
155321

322+
`
323+
156324
|===
157325

158326

modules/extend_dynamic-plugins-reference/ref-community-supported-plugins.template.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ Replace `<tag>` with the version tag corresponding to your {product-short} versi
1919
|===
2020
|*Name*
2121
|*Version*
22-
|*Path*
22+
|*Path and required variables*
2323

2424
%%COMMUNITY_TABLE_CONTENT%%
2525
|===

modules/extend_dynamic-plugins-reference/rhdh-supported-plugins.sh

Lines changed: 23 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,23 @@ titlecase() {
146146
done; echo;
147147
}
148148

149+
# Extract ${VAR_NAME} placeholders from spec.appConfigExamples[0].content for docs tables.
150+
get_required_variables() {
151+
local metadata_file="$1"
152+
local Required_Variables=""
153+
local appConfig
154+
appConfig=$(yq -r '.spec.appConfigExamples[0].content // empty' "$metadata_file" 2>/dev/null)
155+
if [[ -n "$appConfig" && "$appConfig" != "null" ]]; then
156+
# Extract ${VARIABLE_NAME} patterns
157+
# shellcheck disable=SC2016
158+
while IFS= read -r var; do
159+
[[ -n "$var" ]] && Required_Variables="${Required_Variables}\`${var}\`\\n\\n"
160+
done < <(echo "$appConfig" | grep -o '\${[^}]*}' | sed 's/\${//g' | sed 's/}//g' | LC_ALL=C sort -u)
161+
fi
162+
printf '%s' "$Required_Variables"
163+
}
164+
165+
149166
generate_dynamic_plugins_table() {
150167
# generate a list of plugin:version mapping from the following files
151168
# * dynamic-plugins/imports/package.json#.peerDependencies or .dependencies
@@ -330,18 +347,7 @@ generate_dynamic_plugins_table() {
330347
fi
331348

332349
# compute Required_Variables from appConfigExamples in YAML
333-
Required_Variables=""
334-
appConfig=$(yq -r '.spec.appConfigExamples[0].content // empty' "$y" 2>/dev/null)
335-
if [[ -n "$appConfig" && "$appConfig" != "null" ]]; then
336-
# Extract ${VARIABLE_NAME} patterns
337-
# shellcheck disable=SC2016
338-
vars=$(echo "$appConfig" | grep -o '\${[^}]*}' | sed 's/\${//g' | sed 's/}//g' | LC_ALL=C sort -u)
339-
for var in $vars; do
340-
if [[ $var ]]; then
341-
Required_Variables="${Required_Variables}\`$var\`\n\n"
342-
fi
343-
done
344-
fi
350+
Required_Variables=$(get_required_variables "$y")
345351
Required_Variables_CSV=$(echo -e "$Required_Variables" | tr -s "\n" ";")
346352
# not currently used due to policy and support concern with upstream content linked from downstream doc
347353
# URL="https://www.npmjs.com/package/$Plugin"
@@ -612,6 +618,7 @@ generate_community_table() {
612618
plugin_version=$(yq -r '.spec.version // ""' "$metadata_file")
613619
dynamic_artifact=$(yq -r '.spec.dynamicArtifact // ""' "$metadata_file")
614620
support=$(yq -r '.spec.support // "unknown"' "$metadata_file")
621+
Required_Variables=$(get_required_variables "$metadata_file")
615622

616623
# Skip if not a community plugin or no dynamic artifact
617624
[[ "$support" != "community" ]] && continue
@@ -639,14 +646,14 @@ generate_community_table() {
639646
display_title="${plugin_title:-$plugin_name}"
640647

641648
if [[ $QUIET -eq 0 ]]; then
642-
echo " * Plugin: $display_title"
643-
echo " Version: $plugin_version"
644-
echo " Path: $new_path"
649+
echo " * Plugin: $display_title"
650+
echo " Version: $plugin_version"
651+
printf ' Path: %s\n\n%b\n' "$new_path" "$Required_Variables"
645652
fi
646653

647654
# Add to community table (sorted by title)
648655
# shellcheck disable=SC2028
649-
echo "${display_title}||*${display_title}*\n|${plugin_version}|\`${new_path}\`" >> "$COMMUNITY_TABLE_FILE"
656+
echo "${display_title}||*${display_title}*\n|${plugin_version}|\`${new_path}\`\n\n${Required_Variables}\`" >> "$COMMUNITY_TABLE_FILE"
650657

651658
community_count=$((community_count + 1))
652659
done

0 commit comments

Comments
 (0)