This commit is contained in:
parent
6157854f50
commit
2d083b9f40
6 changed files with 140 additions and 1 deletions
|
@ -0,0 +1,19 @@
|
||||||
|
apiVersion: backstage.io/v1alpha1
|
||||||
|
kind: Location
|
||||||
|
metadata:
|
||||||
|
name: basic-example-templates
|
||||||
|
description: A collection of example templates
|
||||||
|
spec:
|
||||||
|
targets:
|
||||||
|
- ./basic/template.yaml
|
||||||
|
- ./argo-workflows/template.yaml
|
||||||
|
- ./app-with-bucket/template.yaml
|
||||||
|
---
|
||||||
|
apiVersion: backstage.io/v1alpha1
|
||||||
|
kind: Location
|
||||||
|
metadata:
|
||||||
|
name: basic-organization
|
||||||
|
description: Basic organization data
|
||||||
|
spec:
|
||||||
|
targets:
|
||||||
|
- ./organization/guests.yaml
|
|
@ -0,0 +1,21 @@
|
||||||
|
apiVersion: backstage.io/v1alpha1
|
||||||
|
kind: Location
|
||||||
|
metadata:
|
||||||
|
name: basic-example-templates
|
||||||
|
description: A collection of example templates
|
||||||
|
spec:
|
||||||
|
targets:
|
||||||
|
- ./basic/template.yaml
|
||||||
|
|
||||||
|
- ./basic/template.yaml
|
||||||
|
- ./argo-workflows/template.yaml
|
||||||
|
- ./app-with-bucket/template.yaml
|
||||||
|
---
|
||||||
|
apiVersion: backstage.io/v1alpha1
|
||||||
|
kind: Location
|
||||||
|
metadata:
|
||||||
|
name: basic-organization
|
||||||
|
description: Basic organization data
|
||||||
|
spec:
|
||||||
|
targets:
|
||||||
|
- ./organization/guests.yaml
|
|
@ -0,0 +1,21 @@
|
||||||
|
apiVersion: backstage.io/v1alpha1
|
||||||
|
kind: Location
|
||||||
|
metadata:
|
||||||
|
name: basic-example-templates
|
||||||
|
description: A collection of example templates
|
||||||
|
spec:
|
||||||
|
targets:
|
||||||
|
- ./basic/template.yaml
|
||||||
|
|
||||||
|
- ./basic/template2.yaml
|
||||||
|
- ./argo-workflows/template.yaml
|
||||||
|
- ./app-with-bucket/template.yaml
|
||||||
|
---
|
||||||
|
apiVersion: backstage.io/v1alpha1
|
||||||
|
kind: Location
|
||||||
|
metadata:
|
||||||
|
name: basic-organization
|
||||||
|
description: Basic organization data
|
||||||
|
spec:
|
||||||
|
targets:
|
||||||
|
- ./organization/guests.yaml
|
|
@ -0,0 +1,20 @@
|
||||||
|
apiVersion: backstage.io/v1alpha1
|
||||||
|
kind: Location
|
||||||
|
metadata:
|
||||||
|
name: basic-example-templates
|
||||||
|
description: A collection of example templates
|
||||||
|
spec:
|
||||||
|
targets:
|
||||||
|
- ./basic/template.yaml
|
||||||
|
- ./basic/template2.yaml
|
||||||
|
- ./argo-workflows/template.yaml
|
||||||
|
- ./app-with-bucket/template.yaml
|
||||||
|
---
|
||||||
|
apiVersion: backstage.io/v1alpha1
|
||||||
|
kind: Location
|
||||||
|
metadata:
|
||||||
|
name: basic-organization
|
||||||
|
description: Basic organization data
|
||||||
|
spec:
|
||||||
|
targets:
|
||||||
|
- ./organization/guests.yaml
|
|
@ -0,0 +1,58 @@
|
||||||
|
apiVersion: scaffolder.backstage.io/v1beta3
|
||||||
|
kind: Template
|
||||||
|
metadata:
|
||||||
|
description: Creates a Basic Kubernetes Deployment
|
||||||
|
name: basic
|
||||||
|
title: Create a Basic Deployment
|
||||||
|
spec:
|
||||||
|
owner: guests
|
||||||
|
type: service
|
||||||
|
parameters:
|
||||||
|
- title: Configuration Options
|
||||||
|
required:
|
||||||
|
- name
|
||||||
|
properties:
|
||||||
|
name:
|
||||||
|
type: string
|
||||||
|
description: name of this application
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- id: template
|
||||||
|
name: Generating component
|
||||||
|
action: fetch:template
|
||||||
|
input:
|
||||||
|
url: ./skeleton
|
||||||
|
values:
|
||||||
|
name: ${{parameters.name}}
|
||||||
|
|
||||||
|
- id: publish
|
||||||
|
name: Publishing to a gitea git repository
|
||||||
|
action: publish:gitea
|
||||||
|
input:
|
||||||
|
description: This is an example app
|
||||||
|
# Hard coded value for this demo purposes only.
|
||||||
|
repoUrl: cnoe.localtest.me:8443/gitea?repo=${{parameters.name}}
|
||||||
|
defaultBranch: main
|
||||||
|
- id: create-argocd-app
|
||||||
|
name: Create ArgoCD App
|
||||||
|
action: cnoe:create-argocd-app
|
||||||
|
input:
|
||||||
|
appName: ${{parameters.name}}
|
||||||
|
appNamespace: ${{parameters.name}}
|
||||||
|
argoInstance: in-cluster
|
||||||
|
projectName: default
|
||||||
|
# necessary until we generate our own cert
|
||||||
|
repoUrl: https://cnoe.localtest.me:8443/gitea/giteaAdmin/${{parameters.name}}
|
||||||
|
path: "manifests"
|
||||||
|
- id: register
|
||||||
|
name: Register
|
||||||
|
action: catalog:register
|
||||||
|
input:
|
||||||
|
repoContentsUrl: ${{ steps['publish'].output.repoContentsUrl }}
|
||||||
|
catalogInfoPath: 'catalog-info.yaml'
|
||||||
|
|
||||||
|
output:
|
||||||
|
links:
|
||||||
|
- title: Open in catalog
|
||||||
|
icon: catalog
|
||||||
|
entityRef: ${{ steps['register'].output.entityRef }}
|
|
@ -6,9 +6,9 @@ metadata:
|
||||||
spec:
|
spec:
|
||||||
targets:
|
targets:
|
||||||
- ./basic/template.yaml
|
- ./basic/template.yaml
|
||||||
|
- ./basic/template2.yaml
|
||||||
- ./argo-workflows/template.yaml
|
- ./argo-workflows/template.yaml
|
||||||
- ./app-with-bucket/template.yaml
|
- ./app-with-bucket/template.yaml
|
||||||
- ./app-with-bucket/template.yaml
|
|
||||||
---
|
---
|
||||||
apiVersion: backstage.io/v1alpha1
|
apiVersion: backstage.io/v1alpha1
|
||||||
kind: Location
|
kind: Location
|
||||||
|
|
Loading…
Reference in a new issue