-
-
Save stone-monkeys/72bc3cf010f2a36696714a26e89b505d to your computer and use it in GitHub Desktop.
This file contains hidden or 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: nodejs-template-frontend-new-8 | |
| title: Node.js Template Frontend New8 | |
| description: An example template for the scaffolder that creates a simple Node.js 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 | |
| ui:options: | |
| rows: 5 | |
| - title: Choose a location | |
| required: | |
| - repoUrl | |
| properties: | |
| repoUrl: | |
| title: Repository Location | |
| type: string | |
| ui:field: RepoUrlPicker | |
| ui:options: | |
| allowedHosts: | |
| - github.com | |
| - title: Fill in some steps | |
| properties: | |
| circleci: | |
| title: CCI Token | |
| type: string | |
| description: CCI API token | |
| ui:autofocus: true | |
| ui:help: 'Hint: additional description...' | |
| - title: Repository Info | |
| properties: | |
| repoName: | |
| title: Repository Name | |
| type: string | |
| description: The name of the repository to be created | |
| ui:autofocus: true | |
| steps: | |
| - id: fetch | |
| name: Fetch Node.js frontend template | |
| action: fetch:plain | |
| input: | |
| url: https://github.com/stone-monkeys/engineering-repo-templates/tree/main/frontend-templates/node | |
| targetPath: ./workspace | |
| - id: publish | |
| name: Publish to a new GitHub repository | |
| action: publish:github | |
| input: | |
| allowedHosts: ["github.com"] | |
| description: This is ${{ parameters.name }} | |
| repoUrl: ${{ parameters.repoUrl }} | |
| repo: ${{ parameters.repoName }} | |
| defaultBranch: main | |
| sourcePath: ./workspace | |
| - id: Set Up CircleCI | |
| name: Run a shell command | |
| action: custom:command:execute | |
| input: | |
| command: 'curl -X POST https://circleci.com/api/v1.1/project/github/stone-monkeys/"${{ parameters.repoName }}"/follow -H "Circle-Token: ${{ parameters.circleci }}"' | |
| arguments: [] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment