cleanup test template

Signed-off-by: Johan Haals <johan.haals@gmail.com>
This commit is contained in:
Johan Haals
2021-02-26 14:44:08 +01:00
parent 78dfa45500
commit 4b0b815372
@@ -1,76 +1,3 @@
# apiVersion: backstage.io/v1beta2
# kind: Template
# metadata:
# name: test-template
# title: Test Template
# description: Testing out the new template schema
# spec:
# owner: backstage/techdocs-core
# type: service
# parameters:
# title: Fill in some BS params
# required:
# - name
# properties:
# name:
# title: Name
# type: string
# description: Unique name of the component
# ui:widget: textarea
# ui:autofocus: true
# ui:options:
# rows: 5
# storePath: # provides {owner, repository, providerUrl}
# # $ref: '#/definitions/StorePath'
# title: Store Path
# type: string
# description: Copy https://github.com/aeothgiaetgh/aetkijhahte and hammer in some more letters
# steps:
# - id: prepare
# name: Prepare
# action: legacy:prepare
# parameters:
# protocol: file
# url: file:///Users/patriko/dev/backstage/plugins/scaffolder-backend/sample-templates/test-template-v2
# - id: template
# name: Template
# action: legacy:template
# parameters:
# templater: cookiecutter
# values:
# name: '{{ parameters.name }}'
# - id: publish
# name: Publish
# action: legacy:publish
# parameters:
# values:
# name: '{{ parameters.name }}'
# storePath: '{{ parameters.storePath }}'
# owner: kungen # not use
# - id: register
# name: Register
# action: catalog:register
# parameters:
# catalogInfoUrl: '{{ steps.publish.output.catalogInfoUrl }}'
# output:
# catalogInfoUrl: '{{ steps.publish.output.catalogInfoUrl }}'
# entityRef: '{{ steps.register.entityRef }}'
# TODO:
# 1. [x] entity beta2 type & schema
# 2. [x] endpoint for template params + frontend refactor
# 3. [ ] implement new actions that work well with new steps format, e.g. prepare+template = fetch
# 4. [ ] external API for registering custom actions
# 5. [x] implement uiSchema split
# 6. [ ] document beta2 entity schema
# 6. [ ] user documentation for beta2
---
apiVersion: backstage.io/v1beta2
kind: Template
metadata:
@@ -127,7 +54,6 @@ spec:
parameters:
allowedHosts: ['github.com']
description: 'This is {{ parameters.name }}'
# repoUrl: github.com?owner=spotify&repo=name
repoUrl: '{{ parameters.repoUrl }}'
- id: register
@@ -136,222 +62,6 @@ spec:
parameters:
repoContentsUrl: '{{ steps.publish.output.repoContentsUrl }}'
catalogInfoPath: '/catalog-info.yaml'
output:
remoteUrl: '{{ steps.publish.output.remoteUrl }}'
entityRef: '{{ steps.register.output.entityRef }}'
---
apiVersion: backstage.io/v1beta2
kind: Template
metadata:
name: test-template-v2-gitlab
title: Test Template v2-gitlab
description: Testing out the new template schema
spec:
owner: backstage/techdocs-core
type: service
parameters:
- title: Fill in some steps
required:
- name
properties:
name:
title: Name
type: string
description: Unique name of the component
ui:autofocus: true
ui:options:
rows: 5
- title: Choose a location
required:
- repoUrl
properties:
repoUrl:
title: Repository Location
type: string
ui:field: RepoUrlPicker
ui:options:
allowedHosts:
- gitlab.com
steps:
- id: fetch-base
name: Fetch Base
action: fetch:cookiecutter
parameters:
url: ./template
values:
name: '{{ parameters.name }}'
- id: fetch-docs
name: Fetch Docs
action: fetch:plain
parameters:
targetPath: ./community
url: https://github.com/backstage/community/tree/main/backstage-community-sessions
- id: publish
name: Publish
action: publish:gitlab
parameters:
allowedHosts: ['gitlab.com']
description: 'This is {{ parameters.name }}'
repoUrl: '{{ parameters.repoUrl }}'
- id: register
name: Register
action: catalog:register
parameters:
repoContentsUrl: '{{ steps.publish.output.repoContentsUrl }}'
catalogInfoPath: '/catalog-info.yaml'
output:
remoteUrl: '{{ steps.publish.output.remoteUrl }}'
entityRef: '{{ steps.register.output.entityRef }}'
---
apiVersion: backstage.io/v1beta2
kind: Template
metadata:
name: test-template-v2-bitbucket
title: Test Template v2-bitbucket
description: Testing out the new template schema
spec:
owner: backstage/techdocs-core
type: service
parameters:
- title: Fill in some steps
required:
- name
properties:
name:
title: Name
type: string
description: Unique name of the component
ui:autofocus: true
ui:options:
rows: 5
- title: Choose a location
required:
- repoUrl
properties:
repoUrl:
title: Repository Location
type: string
ui:field: RepoUrlPicker
ui:options:
allowedHosts:
- bitbucket.org
steps:
- id: fetch-base
name: Fetch Base
action: fetch:cookiecutter
parameters:
url: ./template
values:
name: '{{ parameters.name }}'
- id: fetch-docs
name: Fetch Docs
action: fetch:plain
parameters:
targetPath: ./community
url: https://github.com/backstage/community/tree/main/backstage-community-sessions
- id: publish
name: Publish
action: publish:bitbucket
parameters:
allowedHosts: ['bitbucket.org']
description: 'This is {{ parameters.name }}'
repoUrl: '{{ parameters.repoUrl }}'
- id: register
name: Register
action: catalog:register
parameters:
repoContentsUrl: '{{ steps.publish.output.repoContentsUrl }}'
catalogInfoPath: '/catalog-info.yaml'
output:
remoteUrl: '{{ steps.publish.output.remoteUrl }}'
entityRef: '{{ steps.register.output.entityRef }}'
---
apiVersion: backstage.io/v1beta2
kind: Template
metadata:
name: test-template-v2-azure
title: Test Template v2-azure
description: Testing out the new template schema
spec:
owner: backstage/techdocs-core
type: service
parameters:
- title: Fill in some steps
required:
- name
properties:
name:
title: Name
type: string
description: Unique name of the component
ui:autofocus: true
ui:options:
rows: 5
- title: Choose a location
required:
- repoUrl
properties:
repoUrl:
title: Repository Location
type: string
ui:field: RepoUrlPicker
ui:options:
allowedHosts:
- dev.azure.com
steps:
- id: fetch-base
name: Fetch Base
action: fetch:cookiecutter
parameters:
url: ./template
values:
name: '{{ parameters.name }}'
- id: fetch-docs
name: Fetch Docs
action: fetch:plain
parameters:
targetPath: ./community
url: https://github.com/backstage/community/tree/main/backstage-community-sessions
- id: publish
name: Publish
action: publish:azure
parameters:
allowedHosts: ['dev.azure.com']
description: 'This is {{ parameters.name }}'
repoUrl: '{{ parameters.repoUrl }}'
- id: register
name: Register
action: catalog:register
parameters:
repoContentsUrl: '{{ steps.publish.output.repoContentsUrl }}'
catalogInfoPath: '/catalog-info.yaml'
output:
remoteUrl: '{{ steps.publish.output.remoteUrl }}'