Last active
June 14, 2024 13:14
-
-
Save gashcrumb/4d5705887f3b3c248b0720cb08dd2cb3 to your computer and use it in GitHub Desktop.
simple test scaffolder template
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Notice the v1beta3 version | |
apiVersion: scaffolder.backstage.io/v1beta3 | |
kind: Template | |
# some metadata about the template itself | |
metadata: | |
name: v1beta3-demo | |
title: SPAM Selection and Delivery | |
description: scaffolder UI custom field test thingie | |
spec: | |
owner: backstage/techdocs-core | |
type: service | |
# these are the steps which are rendered in the frontend with the form input | |
parameters: | |
- title: Decide on your preferred food product combination | |
required: | |
- spamVariant | |
properties: | |
spamVariant: | |
title: SPAM Variant | |
type: string | |
description: What preferred variant of SPAM food product is needed | |
ui:autofocus: true | |
ui:options: | |
rows: 5 | |
sauceFlavor: | |
title: Sauce Flavor | |
type: string | |
description: What flavor of sauce should be layered on top of the SPAM | |
ui:field: ValidateKebabCase | |
- title: Choose a location where the food product should be placed | |
required: | |
- depositoryAddress | |
properties: | |
depositoryAddress: | |
title: Depository Address | |
type: string | |
ui:field: SimpleTestFieldExtension | |
ui:options: | |
allowedBuildings: | |
- aShed | |
- aBarn | |
- theBank | |
# just some junk | |
steps: | |
- id: fetch-base | |
name: Fetch Base | |
action: fetch:template | |
input: | |
url: ./template | |
values: | |
spamVariant: ${{ parameters.spamVariant }} | |
sauceFlavor: ${{ parameters.sauceFlavor }} | |
depositoryAddress: ${{ parameters.depositoryAddress }} | |
- id: register | |
name: Register | |
action: catalog:register | |
input: | |
repoContentsUrl: ${{ steps['publish'].output.repoContentsUrl }} | |
catalogInfoPath: '/catalog-info.yaml' | |
# this part probably won't work | |
output: | |
links: | |
- title: Repository | |
url: ${{ steps['publish'].output.remoteUrl }} | |
- title: Open in catalog | |
icon: catalog | |
entityRef: ${{ steps['register'].output.entityRef }} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment