Created
April 3, 2024 20:19
-
-
Save jesuino/ff433c9124dea19a36a7a8ede6bfe095 to your computer and use it in GitHub Desktop.
azure-template.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apiVersion: scaffolder.backstage.io/v1beta3 | |
kind: Template | |
metadata: | |
name: azure-repo-demo | |
title: Azure Repository Test | |
description: Clone and push to an Azure repository example. | |
spec: | |
owner: parfuemerie-douglas | |
type: service | |
parameters: | |
- title: Fill in some steps | |
required: | |
- name | |
- owner | |
properties: | |
name: | |
title: Project name | |
type: string | |
description: Choose a unique project name. | |
ui:field: EntityNamePicker | |
ui:autofocus: true | |
owner: | |
title: Owner | |
type: string | |
description: Select an owner for the Backstage component. | |
ui:field: OwnerPicker | |
ui:options: | |
allowedKinds: | |
- Group | |
steps: | |
- id: cloneAzureRepo | |
name: Clone Azure Repo | |
action: azure:repo:clone | |
input: | |
remoteUrl: "https://wsiqueir@dev.azure.com/wsiqueir/rhdh-tests/_git/rhdh-tests" | |
branch: "main" | |
targetPath: ./sub-directory | |
- id: fetch | |
name: Template Skeleton | |
action: fetch:template | |
input: | |
url: ./skeleton | |
targetPath: ./sub-directory | |
values: | |
name: ${{ parameters.name }} | |
owner: ${{ parameters.owner }} | |
- id: pushAzureRepo | |
name: Push to Remote Azure Repo | |
action: azure:repo:push | |
input: | |
branch: main | |
sourcePath: ./sub-directory | |
gitCommitMessage: Add ${{ parameters.name }} project files | |
- id: pullRequestAzureRepo | |
name: Create a Pull Request to Azure Repo | |
action: azure:repo:pr | |
input: | |
sourceBranch: test | |
targetBranch: "main" | |
repoId: rhdh-tests | |
title: ${{ parameters.name }} | |
project: rhdh-tests | |
supportsIterations: false | |
- id: register | |
name: Register | |
action: catalog:register | |
input: | |
repoContentsUrl: "dev.azure.com?owner=rhdh-tests&repo=rhdh-tests&organization=wsiqueir&version=main" | |
catalogInfoPath: "/catalog-info.yaml" | |
output: | |
links: | |
- title: Repository | |
url: "dev.azure.com?owner=rhdh-tests&repo=rhdh-tests&organization=wsiqueir" | |
- title: Open in catalog | |
icon: catalog | |
entityRef: ${{ steps.register.output.entityRef }} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment