The GitHub Repository Manager Integration have to be configured on your CDS by a CDS Administrator.
This integration allows you to link a Git Repository hosted by GitHub to a CDS Application.
This integration enables some features:
Generate a new token on https://github.com/settings/tokens with the following scopes:
Create a yml file:
version: v1.0
name: github
type: github
description: "my github"
auth:
username: your-username
token: ghp_your-token-here
options:
urlApi: "" # optional, default is https://api.github.com
disableStatus: false # Set to true if you don't want CDS to push statuses on the VCS server - optional
disableStatusDetails: false # Set to true if you don't want CDS to push CDS URL in statuses on the VCS server - optional
disablePolling: false # Does polling is supported by VCS Server - optional
disableWebHooks: false # Does webhooks are supported by VCS Server - optional
cdsctl project vcs import YOUR_CDS_PROJECT_KEY vcs-github.yml
As a user, with writing rights on a CDS project
Select the first pipeline, then click on Add a hook
.
Select the RepositoryWebhook, then click on Save.
The webhook is automatically created on GitHub.
git push
on your Git Repository on GitHubWhen someone git push on your Git Repository, GitHub have to call your CDS to run your CDS Workflow. This is the behaviour of the RepositoryWebhook. But if your CDS is not reacheable from GitHub, how can you do?
By chance, you have two choices :)
Git Repository Poller documentation
If you hesitate between the two: the RepositoryWebhook
is more reactive than the Git Repository Poller
.
Before adding a hook on your Workflow, you have to add the application in the Pipeline Context. Select the first pipeline, then click on Edit the pipeline context from the sidebar.
Pipeline Context Documentation
For now, CDS supports push events. CDS uses this push event to remove existing runs for deleted branches (24h after branch deletion).