chore: migrating react-ssr-template over to v2
Signed-off-by: blam <ben@blam.sh>
This commit is contained in:
-3
@@ -1,3 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
echo "Could do something here?"
|
||||
+2
-2
@@ -4,8 +4,8 @@ metadata:
|
||||
name: {{cookiecutter.component_id | jsonify}}
|
||||
description: {{cookiecutter.description | jsonify}}
|
||||
annotations:
|
||||
github.com/project-slug: {{cookiecutter.destination.git.owner + "/" + cookiecutter.destination.git.name}}
|
||||
backstage.io/techdocs-ref: url:{{cookiecutter.storePath}}
|
||||
github.com/project-slug: {{cookiecutter.destination.owner + "/" + cookiecutter.destination.repo}}
|
||||
backstage.io/techdocs-ref: url:{{cookiecutter.destination.host + "/" + cookiecutter.destination.owner + "/" + cookiecutter.destination.repo}}
|
||||
spec:
|
||||
type: website
|
||||
lifecycle: experimental
|
||||
@@ -1,4 +1,4 @@
|
||||
apiVersion: backstage.io/v1alpha1
|
||||
apiVersion: backstage.io/v1beta2
|
||||
kind: Template
|
||||
metadata:
|
||||
name: react-ssr-template
|
||||
@@ -9,19 +9,69 @@ metadata:
|
||||
- react
|
||||
spec:
|
||||
owner: web@example.com
|
||||
templater: cookiecutter
|
||||
type: website
|
||||
path: '.'
|
||||
schema:
|
||||
required:
|
||||
- component_id
|
||||
- description
|
||||
properties:
|
||||
component_id:
|
||||
title: Name
|
||||
type: string
|
||||
description: Unique name of the component
|
||||
description:
|
||||
title: Description
|
||||
type: string
|
||||
description: Help others understand what this website is for.
|
||||
parameters:
|
||||
- title: Provide some simple information
|
||||
required:
|
||||
- component_id
|
||||
- owner
|
||||
properties:
|
||||
component_id:
|
||||
title: Name
|
||||
type: string
|
||||
description: Unique name of the component
|
||||
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: template
|
||||
name: Fetch Skeleton + Template
|
||||
action: fetch:cookiecutter
|
||||
input:
|
||||
url: ./skeleton
|
||||
copyWithoutRender:
|
||||
- .github/workflows/*
|
||||
values:
|
||||
component_id: '{{ parameters.component_id }}'
|
||||
description: '{{ parameters.description }}'
|
||||
destination: '{{ parseRepoUrl parameters.repoUrl }}'
|
||||
owner: '{{ parameters.owner }}'
|
||||
|
||||
- id: publish
|
||||
name: Publish
|
||||
action: publish:github
|
||||
input:
|
||||
allowedHosts: ['github.com']
|
||||
description: 'This is {{ parameters.component_id }}'
|
||||
repoUrl: '{{ parameters.repoUrl }}'
|
||||
|
||||
- id: register
|
||||
name: Register
|
||||
action: catalog:register
|
||||
input:
|
||||
repoContentsUrl: '{{ steps.publish.output.repoContentsUrl }}'
|
||||
catalogInfoPath: '/catalog-info.yaml'
|
||||
|
||||
output:
|
||||
remoteUrl: '{{ steps.publish.output.remoteUrl }}'
|
||||
entityRef: '{{ steps.register.output.entityRef }}'
|
||||
|
||||
Reference in New Issue
Block a user