Compare commits
2 commits
IPCEICIS-5
...
main
Author | SHA1 | Date | |
---|---|---|---|
7135109368 | |||
f9219c358f |
3 changed files with 60 additions and 0 deletions
|
@ -9,6 +9,7 @@ spec:
|
||||||
- ./argo-workflows/template.yaml
|
- ./argo-workflows/template.yaml
|
||||||
- ./app-with-bucket/template.yaml
|
- ./app-with-bucket/template.yaml
|
||||||
- ./demo-go-hello-world/template.yaml
|
- ./demo-go-hello-world/template.yaml
|
||||||
|
- ./template-for-poc/template.yaml
|
||||||
---
|
---
|
||||||
apiVersion: backstage.io/v1alpha1
|
apiVersion: backstage.io/v1alpha1
|
||||||
kind: Location
|
kind: Location
|
||||||
|
|
|
@ -0,0 +1,59 @@
|
||||||
|
apiVersion: scaffolder.backstage.io/v1beta3
|
||||||
|
kind: Template
|
||||||
|
metadata:
|
||||||
|
name: example-go-template
|
||||||
|
title: Example Go template
|
||||||
|
description: An example template for the scaffolder that creates a simple go service
|
||||||
|
spec:
|
||||||
|
owner: user:guest
|
||||||
|
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
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- id: fetch-template
|
||||||
|
name: Fetch Template
|
||||||
|
action: fetch:template
|
||||||
|
input:
|
||||||
|
url: ./skeleton
|
||||||
|
targetPath: ./skeleton
|
||||||
|
values:
|
||||||
|
name: ${{ parameters.name }}
|
||||||
|
|
||||||
|
- id: publish
|
||||||
|
name: Publish to Gitea
|
||||||
|
action: publish:gitea
|
||||||
|
input:
|
||||||
|
repoUrl: ghttps://gitea.cnoe.localtest.me:443/giteaAdmin/?repo=${{parameters.name}}
|
||||||
|
description: This is the repository for ${{ parameters.name }}
|
||||||
|
sourcePath: ./skeleton
|
||||||
|
defaultBranch: main
|
||||||
|
|
||||||
|
- id: register
|
||||||
|
name: Register in Catalog
|
||||||
|
action: catalog:register
|
||||||
|
input:
|
||||||
|
repoContentsUrl: ${{ steps['publish'].output.repoContentsUrl }}
|
||||||
|
|
||||||
|
- id: trigger-pipeline
|
||||||
|
name: Trigger Forgejo Pipeline
|
||||||
|
action: fetch:plain
|
||||||
|
input:
|
||||||
|
url: https://gitea.cnoe.localtest.me:443/giteaAdmin/actions/workflows/trigger
|
||||||
|
method: POST
|
||||||
|
headers:
|
||||||
|
Authorization: Bearer ${{ secrets.FORGEJO_API_TOKEN }}
|
||||||
|
Content-Type: application/json
|
||||||
|
body: |
|
||||||
|
{
|
||||||
|
"ref": "${{ parameters.branchName }}"
|
||||||
|
}
|
Loading…
Reference in a new issue