This all is 100% open source, so if you would like to contribute, feel free to edit this page.
In order to enable software templates (for GitHub), the only first thing you’ll need to do, is configuring a GitHub application that has the permission to create Git repositories (see How to configure GitHub applications).
In order to enable component scanning from GitHub to Developer Hub (i.e., catalog entity type Component), you’ll need to execute the following steps:
- package: ./dynamic-plugins/dist/backstage-plugin-catalog-backend-module-github-dynamic
# documentation: https://backstage.io/docs/integrations/github/discovery/
disabled: false
pluginConfig: {}
catalog:
providers:
github:
# the provider ID can be any camelCase string
providerId:
organization: 'maarten-vandeperre' # string
catalogPath: '/catalog-info.yaml' # string
filters:
branch: 'master' # string
repository: '.*' # Regex
schedule: # optional; same options as in TaskScheduleDefinition
# supports cron, ISO duration, "human duration" as used in code
frequency: { minutes: 1 }
# supports ISO duration, "human duration" as used in code
timeout: { minutes: 1 }
initialDelay: { seconds: 15 }
Most important configurations:
If you want to see it in a complete configuration file, feel free to have a look at gitops/developer-hub/11_app-config-rhdh.yaml, which contains all the integrations, described in this README file.
integrations:
github:
- host: github.com
token: ${RHDH_GITHUB_INTEGRATION_PERSONAL_ACCESS_TOKEN}
apps:
- appId: ${RHDH_GITHUB_INTEGRATION_APP_ID}
clientId: ${RHDH_GITHUB_INTEGRATION_APP_CLIENT_ID}
clientSecret: ${RHDH_GITHUB_INTEGRATION_APP_CLIENT_SECRET}
webhookUrl: none
webhookSecret: none
privateKey: ${RHDH_GITHUB_INTEGRATION_APP_PRIVATE_KEY}
Note: The token is optional, but if you don’t configure it, you’ll run rather fast against GitHub API rate limits. So I would advise to have some kind of system user account in place to link to the catalog scanning configuration.
If you want to see it in a complete configuration file, feel free to have a look at gitops/developer-hub/11_app-config-rhdh.yaml, which contains all the integrations, described in this README file.