Skip to content

Commit

Permalink
feat: add entity type templating
Browse files Browse the repository at this point in the history
  • Loading branch information
tofuuudon committed Nov 20, 2024
1 parent 3e1a580 commit 29ad2cc
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
6 changes: 3 additions & 3 deletions common/base/.platform/backstage/catalog-info.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
apiVersion: backstage.io/v1alpha1
kind: Component
kind: { { cookiecutter.entity_type } }
metadata:
name: {{ cookiecutter.name }}
description: {{ cookiecutter.description }}
name: { { cookiecutter.name } }
description: { { cookiecutter.description } }
annotations:
backstage.io/source-location: url:https://github.com/3sidedcube/{{ cookiecutter.name }}
backstage.io/techdocs-ref: dir:../..
Expand Down
3 changes: 3 additions & 0 deletions generic/template.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ spec:
values:
name: ${{ parameters.name }}
description: ${{ parameters.description }}
entity_type: ${{ parameters.entity_type }}

- id: create-repo
name: Create repo
Expand All @@ -52,6 +53,8 @@ spec:
hasIssues: false
protectDefaultBranch: false
repoUrl: github.com?owner=3sidedcube&repo=${{ parameters.name }}
repoVariables:
BACKSTAGE_ENTITY: default/${{ parameters.entity_type }}/${{ parameters.name }}
repoVisibility: private

- id: register-entity
Expand Down

0 comments on commit 29ad2cc

Please sign in to comment.