From 29ad2cc609fcdd913614a58429a56f7ee9492ab2 Mon Sep 17 00:00:00 2001 From: M Lau <63963445+tofuuudon@users.noreply.github.com> Date: Wed, 20 Nov 2024 10:47:04 +0000 Subject: [PATCH] feat: add entity type templating --- common/base/.platform/backstage/catalog-info.yaml | 6 +++--- generic/template.yaml | 3 +++ 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/common/base/.platform/backstage/catalog-info.yaml b/common/base/.platform/backstage/catalog-info.yaml index 340f06a..dd8e4d3 100644 --- a/common/base/.platform/backstage/catalog-info.yaml +++ b/common/base/.platform/backstage/catalog-info.yaml @@ -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:../.. diff --git a/generic/template.yaml b/generic/template.yaml index d4e780f..d45cbb1 100644 --- a/generic/template.yaml +++ b/generic/template.yaml @@ -39,6 +39,7 @@ spec: values: name: ${{ parameters.name }} description: ${{ parameters.description }} + entity_type: ${{ parameters.entity_type }} - id: create-repo name: Create repo @@ -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