Overview
Nurosentrix supports CI/CD integration through webhooks. When you push code to your repository, Nurosentrix can automatically deploy the changes to your Odoo instances.
Supported Platforms
- GitHub
- GitLab
GitHub Integration
Step 1: Create a Webhook
- Go to your GitHub repository → Settings → Webhooks
- Click "Add webhook"
- Configure:
- Payload URL: Copy from Nurosentrix instance settings
- Content type:
application/json - Secret: Generate in Nurosentrix
- Select events: "Just the push event"
- Click "Add webhook"
Step 2: Configure in Nurosentrix
- Go to your instance → Settings → CI/CD
- Click "Connect Repository"
- Select "GitHub"
- Enter:
- Repository URL
- Branch to deploy (e.g., main, production)
- Modules path (e.g., addons/)
- Copy the webhook URL and secret
- Configure the webhook in GitHub (Step 1)
- Click "Save"
GitLab Integration
Step 1: Create a Webhook
- Go to your GitLab project → Settings → Webhooks
- Configure:
- URL: Copy from Nurosentrix instance settings
- Secret token: Generate in Nurosentrix
- Select trigger: "Push events"
- Click "Add webhook"
Step 2: Configure in Nurosentrix
- Go to your instance → Settings → CI/CD
- Click "Connect Repository"
- Select "GitLab"
- Enter:
- Repository URL
- Branch to deploy
- Modules path
- Copy the webhook URL and secret
- Configure the webhook in GitLab (Step 1)
- Click "Save"
Deployment history and webhook status are visible under Instance → Deployments.
Deployment Process
When a push is received, Nurosentrix:
- Verifies the webhook signature
- Checks if the push is to the configured branch
- Creates a pre-deployment backup
- Pulls the latest code
- Updates Odoo modules
- Restarts the instance if needed
Configuration Options
Deployment Settings
| Setting | Description |
|---|---|
| Auto-deploy | Automatically deploy on every push |
| Branch filter | Only deploy from specific branches |
| Pre-deploy backup | Create backup before deployment |
| Update modules | Run -u all after deployment |
| Restart instance | Restart Odoo after deployment |
Module Path Configuration
Specify where your custom modules are located in the repository:
# Common structures: addons/ # Modules in addons folder custom_addons/ # Modules in custom_addons folder . # Modules in repository root # Multiple paths (comma-separated): addons/,custom_addons/,third_party/
Deployment Logs
View deployment history and logs:
- Go to your instance → Deployments
- Click on a deployment to see details
- View:
- Commit message and SHA
- Deployment status
- Duration
- Logs output
Rollback
If a deployment causes issues:
- Go to your instance → Deployments
- Find the last working deployment
- Click "Rollback to this version"
- Confirm the rollback
This restores the code and database from the pre-deployment backup.
Example Repository Structure
my-odoo-modules/ ├── addons/ │ ├── custom_crm/ │ │ ├── __init__.py │ │ ├── __manifest__.py │ │ ├── models/ │ │ └── views/ │ └── custom_sale/ │ ├── __init__.py │ ├── __manifest__.py │ └── ... ├── .gitignore └── README.md
Best Practices
- Use separate branches for development and production
- Test changes in a staging environment first
- Keep pre-deployment backups enabled
- Use descriptive commit messages
- Review deployment logs after each push
Troubleshooting
Webhook Not Received
- Check webhook URL is correct
- Verify the secret matches
- Check GitHub/GitLab webhook delivery logs
- Ensure the webhook is enabled
Deployment Failed
- Check deployment logs for specific errors
- Verify module manifest files are valid
- Ensure all dependencies are listed
- Check for Python syntax errors
Module Not Updated
- Verify the module path is correct
- Check the manifest version was incremented
- Try running module update manually