Configuring Yontrack for GitHub
In this section, we'll see how to configure Yontrack for GitHub workflows.
Don't forget to check the Configuration as Code section to see how to configure Yontrack using CasC.
Yontrack needs to be able to access the GitHub API. Create the GitHub token with the following permissions:
reporead:user,user:email
Create a secret in the same namespace as Yontrack with the name yontrack-github and with the value of the GitHub token
in the token key.
In your Yontrack Casc files, define:
ontrack:
config:
github:
name: github
url: https://github.com
oauth2Token: {{ secrets.yontrack-github.token }}
In the Helm chart values for your Yontrack installation, declare this secret:
ontrack:
casc:
secrets:
mapping: file
names:
- yontrack-github
When Yontrack is restarted, it will be able to access the GitHub API. You can check this by navigating to your user menu at Configurations > GitHub configurations. You should see the GitHub configuration you just created and you can test it by using the button.