chore: think that's all the templates

Signed-off-by: blam <ben@blam.sh>
This commit is contained in:
blam
2021-05-21 15:18:35 +02:00
parent 6c410d16bc
commit 7c4c41fb6a
20 changed files with 73 additions and 33 deletions
@@ -1,3 +0,0 @@
{
"_copy_without_render": [".github/workflows/*"]
}
@@ -1,7 +0,0 @@
{
"component_id": "",
"artifact_id": "{{ cookiecutter.component_id }}",
"java_package_name": "{{ cookiecutter.component_id|replace('-', '') }}",
"description": "We promise to update this description /{{cookiecutter.owner}}",
"http_port": 8080
}
@@ -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: service
lifecycle: experimental
@@ -1,4 +1,4 @@
apiVersion: backstage.io/v1alpha1
apiVersion: backstage.io/v1beta2
kind: Template
metadata:
name: springboot-template
@@ -10,24 +10,74 @@ metadata:
- grpc
spec:
owner: service@example.com
templater: cookiecutter
type: service
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 service does.
http_port:
title: Port
type: integer
default: 8080
description: The port to run the gRPC service on
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 }}'
artifact_id: '{{ parameters.component_id }}'
java_package_name: \{{ cookiecutter.component_id|replace('-', '') }}
owner: '{{ parameters.owner }}'
destination: '{{ parseRepoUrl parameters.repoUrl }}'
http_port: 8080
- 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 }}'