Repositories and webhooks
Choose the Git repository and branch a CoreStack Enterprise environment deploys from, and deploy on every push.
On this page
Before you start
- You can open the environment: see Websites and environments.
- You are an owner, or your role has Manage Deployment Repositories for the repository rows and Manage Deployment Source for Deployment Source and Git Deployment Type.
- Your organisation has connected its GitHub, GitLab or Bitbucket account: see Repository connections.
Add a repository
Open Repositories
Open the environment and choose Deployments. Set Deployment Source to GIT, then choose the + button beside Repositories.
Fill in the row
Choose the pipeline under Select pipeline and the connected account under Select provider, then the repository and the branch. The last box is the folder of the repository to deploy from, such as
/.Save
Choose the tick at the end of the row.
The repository is saved, and the Control Panel adds its webhook to it.
Deploy on every push
Set Git Deployment Type
Set Git Deployment Type to Automatic, which also needs Create Deployments. With Manual, you start each deployment with Deploy.
A push to the repository's branch starts a deployment.
If pushes do not deploy
| The row says | What to do |
|---|---|
| The connected user does not have admin access to the repository | Give the account admin access, then remove the repository and add it again. |
| Pushes to this repository are not reaching the Control Panel | The webhook could not be added: follow the reason beside it. |
| Grant organisation access | Follow the link to let the connection read the repositories of your GitHub organisation. |
| Reconnect | Follow the link and sign in to the Git account again. |
Remove a repository
Remove the row
Choose the × button at the end of the row.
Pushes to that repository no longer deploy to this environment.
Automate this
Connects a git repository to the environment through one of the git accounts GET / lists.
curl -X POST https://manage.corefinity.com/api/environments/1311/repositories \
-H "Authorization: Bearer $COREFINITY_TOKEN" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-d '{
"branch": "main",
"connection_id": 4216,
"pipeline_id": 2210,
"repo": "northwind-digital/harbourandfinch-trade-theme",
"root_directory": "/"
}'Your assistant calls corestack_enterprise_repository_set.
{
"name": "corestack_enterprise_repository_set",
"arguments": {
"enterprise_env_id": 1530,
"connection_id": 412,
"pipeline_id": 2210,
"repo": "example-org/storefront",
"branch": "main",
"root_directory": "/"
}
}