From 7e1682265e90df942089a85d9230c00f6a8f7c08 Mon Sep 17 00:00:00 2001 From: lars Date: Sat, 7 Mar 2026 07:46:30 +0000 Subject: [PATCH] =?UTF-8?q?templates/ressource-template/template.yaml=20hi?= =?UTF-8?q?nzugef=C3=BCgt?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- templates/ressource-template/template.yaml | 67 ++++++++++++++++++++++ 1 file changed, 67 insertions(+) create mode 100644 templates/ressource-template/template.yaml diff --git a/templates/ressource-template/template.yaml b/templates/ressource-template/template.yaml new file mode 100644 index 0000000..6bbe7a5 --- /dev/null +++ b/templates/ressource-template/template.yaml @@ -0,0 +1,67 @@ +apiVersion: scaffolder.backstage.io/v1beta3 +kind: Template +metadata: + name: new-resource-template + title: Neue Resource anlegen + description: Erstellt eine neue Resource-YAML für das Home-Lab (z.B. Raspberry Pi, NAS). +spec: + owner: admin + type: service + + # Hier definierst du die Eingabemelder der UI + parameters: + - title: Basis-Informationen + required: [name, owner] + properties: + name: + title: Name + type: string + description: Eindeutiger Name der Resource (z.B. raspberry-pi-5) + description: + title: Beschreibung + type: string + description: Wofür wird das Gerät genutzt? + owner: + title: Owner + type: string + default: admin + description: Wer ist verantwortlich? + system: + title: System + type: string + default: home-lab + description: Zu welchem System gehört es? + netbox_name: + title: NetBox Name + type: string + description: Exakter Name in NetBox für die API-Verknüpfung + + # Hier definierst du, was nach dem Klick auf "Create" passiert + steps: + - id: fetch-base + name: Template Dateien laden + action: fetch:template + input: + url: ./skeleton + values: + name: ${{ parameters.name }} + description: ${{ parameters.description }} + owner: ${{ parameters.owner }} + system: ${{ parameters.system }} + netbox_name: ${{ parameters.netbox_name }} + + - id: publish + name: In Gitea speichern + action: publish:gitea + input: + allowedHosts: ['privat.stommer.com:555'] + description: "Neue Resource: ${{ parameters.name }}" + repoUrl: "privat.stommer.com?owner=Lars&repo=home-lab-catalog" + branchName: main + + - id: register + name: Im Katalog registrieren + action: catalog:register + input: + repoContentsUrl: ${{ steps['publish'].output.repoContentsUrl }} + catalogInfoPath: '/landscape/resources/${{ parameters.name }}.yaml' \ No newline at end of file