Sync GitHub repositories into InterSystems Cache.
- Download the latest Release .xml file and import it into Caché (any namespace, further referred to as {Namespace}).
Call
w ##class(CacheUpdater.Task).Update("Owner", "Repository", "Branch", "Username", "Password", "Namespace")
to download and compile classes from the Github repo.
Where
Owner - The name of the repository owner.
Repository - The name of the repository.
Branch - The name of the commit/branch/tag. If skipped the repository’s default branch (usually master) would be used.
Username - GitHub user, who has access to repository. Optional for public repositories.
Password - GitHub password, corresponding to Username. Optional for public repositories.
Note, that with Username, you can make up to 5,000 requests per hour.
For unauthenticated requests, the rate limit allows to make up to 60 requests per hour.
Unauthenticated requests are associated with an IP address.
Namespace - Namespace, where to download and compile repository.
For example in the repository: https://github.com/intersystems-ru/Cache-MDX2JSON
Owner - intersystems-ru, Repository - Cache-MDX2JSON.
OR
create task for syncing GitHub repository → Cache instance do the following:
- Go to SMP → System Operation → Task Manager → New Task
- Set Name as desired
- Set Namespace to run task in to {Namespace}
- Set Task type to GitHub Update
- Set GitHubURL to a valid GitHub repository, eg: https://github.com/intersystems-ru/Cache-MDX2JSON
- Set Namespace to a Namespace you want to download GitHub repository to
- Optionally provide Username, Password (for private repos or very frequent updates).
- Set up the Branch you need. Possible values are names of commit/branch/tag
- Set other parameters as desired and finish creation of the task
After task runs at least once you will get GitHubURL repository contents in Namespace
If you want more functionality check out CacheGitHubCI project.