-
Notifications
You must be signed in to change notification settings - Fork 139
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chore: add catalog-info yamls #1885
chore: add catalog-info yamls #1885
Conversation
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
nice, do you also want to add the script that generated the basis for the catalog yaml files? |
222a46b
to
fff288a
Compare
@durandom I used this script to create the initial files but touched every file after that manually. So it's not good enough for a general approach: #!/bin/bash
set -e
for pluginFolder in plugins/*; do
plugin=$(basename $pluginFolder)
# echo "$plugin ..."
cd $pluginFolder
if [ ! -f package.json ]; then
echo "package.json not found!!!!!"
continue
fi
# npm show name
name=$(npm view . name | sed 's/^.*://')
desc=$(npm view . description | sed 's/^.*://')
# echo NAME:
# echo $name
# echo DESC:
# echo $desc
type=""
# pluginFolder ends with backend
if [[ $pluginFolder == *"backend"* || $pluginFolder == *"node"* ]]; then
echo "BACKEND $plugin"
type="backstage-backend-plugin"
elif [[ $pluginFolder == *"common"* ]]; then
echo "COMMON $plugin"
type="backstage-common-library"
elif [[ $pluginFolder != *"backend"* ]]; then
echo "FRONTEND $plugin"
type="backstage-frontend-plugin"
fi
# write a yaml file into catalog-info.yaml
cat <<EOF > catalog-info.yaml
# https://backstage.io/docs/features/software-catalog/descriptor-format#kind-component
apiVersion: backstage.io/v1alpha1
kind: Component
metadata:
name: janus-idp-$plugin
title: $name
description: $description
annotations:
backstage.io/source-location: url:https://github.com/janus-idp/backstage-plugins/tree/main/plugins/$plugin
backstage.io/view-url: https://github.com/janus-idp/backstage-plugins/blob/main/plugins/$plugin/catalog-info.yaml
backstage.io/edit-url: https://github.com/janus-idp/backstage-plugins/edit/main/plugins/$plugin/catalog-info.yaml
github.com/project-slug: janus-idp/backstage-plugins
#github.com/team-slug: janus-idp/maintainers
sonarqube.org/project-key: janus-idp_backstage-plugins
links:
- url: https://github.com/janus-idp/backstage-plugins/tree/main/plugins/$plugin
title: GitHub Source
icon: source
type: source
spec:
type: $type
lifecycle: production
owner: rhdh-team
system: rhdh
EOF
cd ../..
done |
/cc @durandom @debsmita1 @divyanshiGupta @karthikjeeyar @schultzp2020 @kadel Can you please take a look if we can start with this set of catalog-info.yamls? Should we ask anyone else? |
I think it's a great start. /lgtm |
Signed-off-by: Christoph Jerolimov <[email protected]>
fff288a
to
c8ea5a1
Compare
Quality Gate passedIssues Measures |
Just rebased after yarn.lock fix was merged with #2046 |
/lgtm |
/approve |
A set of
catalog-info.yaml
files that adds overall 77 components for all plugins, frontend-plugins, backend-plugins, and shared libraries.Component types
One catalog-info yaml for each plugin and one additional plugin for each "meta plugin", "plugin pack" or "plugin group"..
The types of the components are aligned with the upstream types:
type: backstage-backend
components are "meta plugin" that doesn't contain codejanus-idp-rbac
janus-idp-rbac-frontend
Testing this PR
Checkout this branch and link the root catalog-info.yaml and catalog-info-teams.yaml:
Or link the branch on GitHub:
Screenshots
Catalog types:
Backstage plugins:
Frontend plugins:
etc.
RBAC as example: