GitHub Integrations¶
Below can you find some tutorial to integrate the CI server of CodeMC into GitHub (or vice-versa).
Add CommitStatus¶
To add a CommitStatus of CodeMC to GitHub, follow these basic steps:
- Go to https://github.com/settings/tokens
- Click
Generate new token
- Give the token a descriptive name (i.e.
CodeMC-CommitStatus
) and grant it the following Scopes:repo
admin:repo_hook
admin:org_hook
- Click on
Generate token
and copy the generated code. - Head over to https://ci.codemc.io/job/:organisation (replace
:organisation
with your user/organisation name) - Click on
Configure
and under Projects, click theAdd
button right next to theCredentials
field. - A drop-down menu should now open. Click your user/organisation name.
- Eneter your username and use the copied token as password. Then Click
Add
. - Select the credentials in the drop-down menu and click
Save
. - You're done!
Automatically build¶
When you want CodeMC to automatically build artefacts once you push commits to your repository, can you follow these steps:
Organisations¶
Important
These webhooks will work for events fired on repositories of the entire Organisations.
If you only want webhooks to be triggered for specific repositories, setup one for a specific repository
- Go to https://github.com/organizations/:organisation/settings/hooks (Replace
:organisation
with the name of your organisation). - Click
Add webhook
- Put https://ci.codemc.io/github-webhook/ as the Payload URL.
-
Under
Which events would you like to trigger this webhook?
selectLet me select individual events
and enable the below options:Pull requests
Pushes
Repositories
Note
You can also leave the setting on "Just the
push
event" if you only want pushes to trigger it -
Click
Add Webhook
- You're done!
Repositories¶
- Go to https://github.com/:user/:repo/settings/hooks (Replace
:user
with your user/organisation name and:repo
with the repository name). - Click
Add webhook
- Put https://ci.codemc.io/github-webhook/ as the Payload URL.
-
Under
Which events would you like to trigger this webhook?
selectLet me select individual events
and enable the below options:Pull requests
Pushes
Repositories
Note
You can also leave the setting on "Just the
push
event" if you only want pushes to trigger it -
Click
Add Webhook
- You're done!