From f8540c1049b6dc333565364adeddc6f126048b1d Mon Sep 17 00:00:00 2001 From: Vincenzo Scamporlino Date: Wed, 11 Jan 2023 11:22:46 +0100 Subject: [PATCH] backend: add example of template with capabilities Signed-off-by: Vincenzo Scamporlino --- template.yaml | 56 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) create mode 100644 template.yaml diff --git a/template.yaml b/template.yaml new file mode 100644 index 0000000000..0bb67735a9 --- /dev/null +++ b/template.yaml @@ -0,0 +1,56 @@ +apiVersion: scaffolder.backstage.io/v1beta3 +kind: Template +metadata: + name: my_custom_template + title: My custom template + description: Just testing +spec: + owner: web@example.com + type: website + parameters: + - title: Provide some simple information + required: + - component_id + - owner + properties: + component_id: + backstage:capabilities: ${{ capabilities.cap1 }} + title: Name + type: string + description: Unique name of the component + ui:field: EntityNamePicker + description: + title: Description + type: string + description: Help others understand what this website is for. + owner: + title: Owner + type: string + description: Owner of the component + ui:field: OwnerPicker + ui:options: + allowedKinds: + - Group + - title: Choose a location + required: + - repoUrl + properties: + repoUrl: + title: Repository Location + type: string + ui:field: RepoUrlPicker + ui:options: + allowedHosts: + - github.com + steps: + - id: one + backstage:capabilities: ${{ capabilities.cap1 }} + name: First log + action: debug:log + input: + message: hello + - id: two + name: Second log + action: debug:log + input: + message: world