Skip to content

Instantly share code, notes, and snippets.

@taras
Last active July 7, 2022 13:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save taras/3e480d84d38c2ec3f0f758c279a943b9 to your computer and use it in GitHub Desktop.
Save taras/3e480d84d38c2ec3f0f758c279a943b9 to your computer and use it in GitHub Desktop.
catalog:
locations:
- type: url
target: http://github.com/my-org/my-repo/blob/main/components.yaml
gh repo list <org_name> \
--limit=1000 \
--json=description,url,name,owner,nameWithOwner \
--template '{{range $index, $doc := .}}
apiVersion: backstage.io/v1alpha1
kind: Component
metadata:
name: {{ $doc.name }}
description: |
{{ $doc.description }}
annotations:
github.com/project-slug: {{ $doc.nameWithOwner }}
spec:
type: library
owner: {{ $doc.owner.login }}
lifecycle: experimental
---{{end}}' > components.yaml
gh repo list <org_name> \
--limit=1000 \
--json=description,url,name,owner,nameWithOwner \
--template=<output_template>
{{range $index, $doc := .}}
apiVersion: backstage.io/v1alpha1
kind: Component
metadata:
name: {{ $doc.name }}
description: |
{{ $doc.description }}
annotations:
github.com/project-slug: {{ $doc.nameWithOwner }}
spec:
type: library
owner: {{ $doc.owner.login }}
lifecycle: experimental
---{{end}}
apiVersion: backstage.io/v1alpha1
kind: Component
metadata:
name: backstage
description: |
Backstage is an open-source developer portal that puts the developer experience first.
annotations:
github.com/project-slug: backstage/backstage
spec:
type: library
owner: CNCF
lifecycle: experimental
---
apiVersion: backstage.io/v1alpha1
kind: Component
metadata:
name: demo
description: An example deployment of a Backstage application.
annotations:
github.com/project-slug: backstage/demo
spec:
type: website
owner: backstage/maintainers
lifecycle: experimental
---
apiVersion: backstage.io/v1alpha1
kind: Component
metadata:
name: backstage
description: |
Backstage is an open-source developer portal that puts the developer experience first.
annotations:
github.com/project-slug: backstage/backstage
spec:
type: library
owner: CNCF
lifecycle: experimental
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment