Cloud Repository Integrations - Hosting a Unified Agent Configuration File on GitHub.com
This article will describe how you can host a custom configuration file on GitHub.com. This article will specifically describe how to host a whitesource.config file for use with our Repository Integration for GitHub.com’s external configuration mode.
Problem:
You have installed our GitHub.com Repository Integration and have onboarded several repositories that require the same configuration file. Instead of setting the parameter ‘configMode’ to ‘LOCAL’ and creating a whitesource.config file for each repository, you would like each repository to use the same whitesource.config file to reduce configuration file maintenance.
Solution:
Create a new GitHub repository dedicated to your configuration. You can name this repository ‘whitesource-configuration’.
Add your whitesource.config file to the root of the main branch of ‘whitesource-configuration’.
In the ‘whitesource-configuration’ repo, go to Settings > Pages > Source, and then select ‘Main’.
Click Save
At the top of the page you should see a message that says "Your site is ready to be published at <url>. Copy this URL. It should look something like https://<githubUserName>.github.io/whitesource-configuration/
For each repository that needs to use this configuration file, open each repository's .whitesource file and change the following parameters:
CODE"configMode": "EXTERNAL", "configExternalURL": "https://<githubUserName>.github.io/whitesource-configuration/whitesource.config",
Where ‘configExternalURL’ is set to the URL copied in step 5.
Notes:
These instructions make use of GitHub's Pages feature. Pages are available for all public repositories. Pages are available for private repositories if you are licensed for GitHub Enterprise Cloud.
To find more information about GitHub Pages please visit the GitHub Pages Website.