Create Workflows without using the Harness Pipelines
Goal
This tutorial will help you create an IDP Self Service Workflow which automates GitHub Repo Onboarding for users. This is also an example to demonstrate that you can build IDP Flows by using Backstage Scaffolder actions and without using Harness pipelines. This however, is not our recommended approach as we recommend using a Harness pipeline to leverage features like Access Control and Governance.
Pre-requisite
Add Connector
- Go to Admin -> Git Integrations.
- Add a New Git Integration with type as GitHub.
- Now Select the GitHub Connector and Save Changes, follow the steps to add a new connector
Make sure the Connector URL used here is pointed towards the org where you want to create the new repo and the token used have write permission for the repo also Enable the API while creating connector.
Register Template in IDP
- In the left navigation, select Create, and then select Register Software Component.
- Enter the URL to register this already available template.
https://github.com/backstage/software-templates/blob/main/scaffolder-templates/react-ssr-template/template.yaml
- Select Import.
- Now click on the template name
Use Workflows to Create a Repo
- Once you're on the entity page for template, Launch the Template.
- Now fill the fields as displayed in the image below
- Name: Name of the component that will be registered in the IDP
- Description: Describe the usage of the component
- Owner (Dropdown): Select a user group as the owner of the component being created.
- Owner: The GitHub org under which you want to create the new repository. The org is usually picked from the URL used in the Connector.
- Repository: Give a name to the newly created repository.
- Now Trigger the flow, it will create a repository and register it back in your software catalog.
Delete the Template
If you want to unregister or delete the template follow the steps mentioned here.
Further Reading
Self Service Onboarding in IDP is powered by scaffolder templates and Harness Pipeline(IDP Stage) . Follow the tutorials to learn more about it.