Projects
Organize Odoo development with Git-connected projects for structured deployment workflows.
A project in oCore represents a logical grouping of environments, deployments, and Git repository connections. Projects organize your Odoo development workflow by linking a source code repository to one or more environments (development, staging, production) with automated deployment support.
Project Management
View and manage all your projects.
Creating a Project
Navigate to Projects in the sidebar and click Create Project.
Enter the project details:
- Name -- A descriptive name for the project
- Description -- Optional project description
Click Create. You can now connect a Git repository and add environments.
curl -X POST https://ocore.example.com/api/projects \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{
"name": "Odoo ERP Customizations",
"description": "Custom modules for Acme Corp"
}'ocore project create --name "Odoo ERP Customizations"Connecting a Git Repository
Link a GitHub, GitLab, or Bitbucket repository to enable automated deployments and branch tracking.
Open the project and go to the Repository tab.
Choose your Git provider and enter the repository details:
- Repository URL -- The clone URL (HTTPS or SSH)
- Branch -- Default branch to track (e.g.,
main) - Provider --
github,gitlab, orbitbucket
oCore generates a deploy key for read access to your repository. Add this key to your repository's deploy keys settings.
oCore creates a webhook in your repository that triggers deployments on push events. See Git Integration for detailed webhook setup.
curl -X POST https://ocore.example.com/api/projects/{projectId}/repository \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{
"repositoryUrl": "git@github.com:acme/odoo-custom.git",
"branch": "main",
"provider": "github"
}'ocore project connect-repo <project-id> \
--url git@github.com:acme/odoo-custom.git \
--branch main \
--provider githubRegenerating the Deploy Key
If the deploy key is compromised or needs rotation:
curl -X POST https://ocore.example.com/api/projects/{projectId}/repository/regenerate-key \
-H "Authorization: Bearer $TOKEN"Reconfiguring the Webhook
If the webhook stops working:
curl -X POST https://ocore.example.com/api/projects/{projectId}/repository/reconfigure-webhook \
-H "Authorization: Bearer $TOKEN"Disconnecting a Repository
curl -X DELETE https://ocore.example.com/api/projects/{projectId}/repository \
-H "Authorization: Bearer $TOKEN"Project Settings
Update project details, manage access, and configure deployment behavior.
Updating a Project
curl -X PUT https://ocore.example.com/api/projects/{projectId} \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{"name": "Updated Project Name"}'ocore project update <project-id> --name "Updated Project Name"Archiving and Unarchiving
Archive a project to hide it from the default list without deleting it:
# Archive
curl -X PUT https://ocore.example.com/api/projects/{projectId}/archive \
-H "Authorization: Bearer $TOKEN"
# Unarchive
curl -X PUT https://ocore.example.com/api/projects/{projectId}/unarchive \
-H "Authorization: Bearer $TOKEN"Cloning a Project
Create a copy of an existing project with its configuration:
curl -X POST https://ocore.example.com/api/projects/{projectId}/clone \
-H "Authorization: Bearer $TOKEN"Project Access Control
oCore supports per-project access control, allowing you to restrict which team members can view or manage specific projects. See Roles and Permissions for details on the view:projects and manage:projects permissions.
Branch Management
Branch-to-Environment Mapping
Map Git branches to environments so pushes to a specific branch automatically deploy to the correct environment:
| Branch | Environment | Behavior |
|---|---|---|
main | Production | Deploy on merge |
staging | Staging | Deploy on push |
develop | Development | Deploy on push |
View and manage branch mappings:
curl https://ocore.example.com/api/projects/{projectId}/branch-mappings \
-H "Authorization: Bearer $TOKEN"See Git Integration for configuring automatic deployments.
Deleting a Project
Permanent Action
Deleting a project removes all environments, deployment history, and Git configuration. This action cannot be undone.
curl -X DELETE https://ocore.example.com/api/projects/{projectId} \
-H "Authorization: Bearer $TOKEN"ocore project delete <project-id>Required Permissions
- Viewing projects requires
view:projectspermission - Managing projects (create, update, delete, repository) requires
manage:projectspermission - Per-project access can further restrict visibility to specific team members
Troubleshooting
Cannot connect repository
- Verify the repository URL is accessible from the oCore server
- For SSH URLs, ensure the deploy key has been added to the repository's settings
- For private repositories, confirm the key has read access
Webhook not triggering deployments
- Check that the webhook URL is correctly configured in your Git provider
- Verify the webhook secret matches between oCore and the provider
- View webhook delivery logs in your Git provider's settings
- Use the Reconfigure Webhook action to regenerate the webhook
Deploy key rejected
- Ensure the deploy key was added to the correct repository
- Check that the key has at least read access
- Regenerate the deploy key if it was revoked or expired
Project not visible to team members
- Check the member's role has
view:projectspermission - If per-project access is enabled, ensure the member has been granted access