Git Integration & CI/CD
import { Steps, Aside, Tabs, TabItem } from ‘@astrojs/starlight/components’;
Deploy Monkey includes a full CI/CD pipeline for deploying custom Odoo modules from Git repositories. Connect your repo, and every push to your tracked branch automatically builds and deploys your code — with automatic rollback if anything goes wrong.
How It Works
Section titled “How It Works”- You connect a GitHub or GitLab repository to your instance
- Deploy Monkey clones the code and builds an immutable Docker image with your modules baked in
- On every push to your tracked branch, a webhook triggers a new pipeline run
- The pipeline builds a new image, upgrades modules, and performs a health check
- If the build succeeds, the new image goes live. If it fails, the instance automatically rolls back to the previous working version
Connecting a Repository
Section titled “Connecting a Repository”-
Open your instance — Navigate to your instance in the Deploy Monkey dashboard.
-
Go to the Git tab — Click the “Git” tab in the instance navigation.
-
Choose your provider — Select GitHub, GitLab, or Custom (manual URL).
-
Connect your account — Sign in via OAuth (GitHub/GitLab) or enter a Personal Access Token.
-
Select repository and branch — Browse your repos and pick the branch to track (e.g.
main). -
Deploy — Deploy Monkey clones the repo, builds a Docker image, and deploys it to your instance. A webhook is automatically created on your repository for push auto-sync.
Supported Providers
Section titled “Supported Providers”Repository Structure
Section titled “Repository Structure”Your repository should contain Odoo modules at the root level or in subdirectories. Each directory with a __manifest__.py file is automatically detected as an Odoo module.
my-odoo-modules/├── module_one/│ ├── __manifest__.py│ ├── __init__.py│ └── models/├── module_two/│ ├── __manifest__.py│ ├── __init__.py│ └── views/└── requirements.txt # Optional — pip dependenciesCI/CD Pipeline
Section titled “CI/CD Pipeline”Every git operation runs through Deploy Monkey’s pipeline engine. Here’s what happens on each push:
Pipeline Steps
Section titled “Pipeline Steps”| Step | What happens |
|---|---|
| Git Pull | Pulls the latest changes from your tracked branch |
| Detect Modules | Scans for __manifest__.py files to find Odoo modules |
| Build Image | Creates an immutable Docker image with your code and pip dependencies baked in |
| Update Config | Regenerates odoo.conf and docker-compose.yml for the new image |
| Upgrade Modules | Runs odoo -u for all installed modules from your repo |
| Restart | Restarts the container with the new image |
| Health Check | Verifies Odoo responds with HTTP 200 (up to 2 minutes) |
| Finalize | Records the deployed SHA and cleans up old Docker images |
Build Cards
Section titled “Build Cards”The Overview tab shows build cards for each pipeline run:
- Commit message and author (with avatar)
- Git SHA (first 7 characters)
- Build duration and time ago
- Status badge (success, warning, failed, running, queued)
- Expandable step timeline showing each step’s progress and timing
Automatic Rollback
Section titled “Automatic Rollback”If a pipeline run fails at any step:
- The instance automatically reverts to the previous working Docker image
- The failed image is deleted to save disk space
- Your instance remains accessible throughout — zero downtime
Webhook Auto-Sync
Section titled “Webhook Auto-Sync”When you connect a repository, Deploy Monkey automatically creates a webhook on your GitHub or GitLab repo. This means:
- Push to your tracked branch → pipeline run is automatically triggered
- Push to a different branch → ignored (branch matching enforced)
- Rapid pushes → coalesced (only the latest code is deployed, not every intermediate commit)
- Webhook signatures → verified to prevent unauthorized triggers
The webhook is automatically removed when you disconnect the repository.
Syncing Manually
Section titled “Syncing Manually”You can trigger a sync manually from the Git tab:
- Click the Sync button on the repo card
- A pipeline run is queued immediately
- Watch the progress in real-time on the Overview tab
Switching Branches
Section titled “Switching Branches”To switch the tracked branch:
- Click the branch name on the repo card in the Git tab
- Select a new branch from the dropdown (fetched from your provider)
- Deploy Monkey re-clones with the new branch and rebuilds the image
Disconnecting a Repository
Section titled “Disconnecting a Repository”To remove a connected repository:
- Click the Disconnect button on the repo card
- Confirm in the dialog (shows the repository name being disconnected)
- Deploy Monkey removes the clone from the server, rebuilds the base image without your custom code, and deletes the webhook from your provider
Private Repository Access
Section titled “Private Repository Access”OAuth (Recommended)
Section titled “OAuth (Recommended)”Sign in with your GitHub or GitLab account. Deploy Monkey receives a scoped token that can read your repositories. Tokens are stored encrypted and refreshed automatically.
Personal Access Token
Section titled “Personal Access Token”For custom providers or if you prefer not to use OAuth:
- GitHub: Create a token at Settings → Developer Settings → Personal Access Tokens with
reposcope - GitLab: Create a token at Settings → Access Tokens with
read_repositoryscope - The token is stored encrypted in the Deploy Monkey database
Disk Management
Section titled “Disk Management”Deploy Monkey automatically manages Docker images and build cache:
- Image retention: Keeps the current image + one previous image (for rollback). Older images are automatically deleted.
- Build cache: Capped at 2GB. Dangling images pruned after each build.
- Failed images: Deleted immediately after rollback.
Troubleshooting
Section titled “Troubleshooting”Module Not Showing in Odoo Apps
Section titled “Module Not Showing in Odoo Apps”- Activate developer mode in Odoo (Settings → Developer Tools)
- Click “Update Apps List” in the Apps menu
- Verify
__manifest__.pyis valid and the module’sdependsare installed
Pipeline Fails at “Build Image”
Section titled “Pipeline Fails at “Build Image””- Check the step log for Docker build errors
- Ensure
requirements.txthas compatible package versions - Pip errors are non-fatal during build but shown as warnings
Pipeline Fails at “Upgrade Modules”
Section titled “Pipeline Fails at “Upgrade Modules””- Check the step log for the specific Odoo error (usually XML parsing or Python import errors)
- The instance automatically rolls back to the previous working image
- Fix the code, push again, and a new pipeline run will start
Webhook Not Triggering
Section titled “Webhook Not Triggering”- Verify the webhook exists in your provider’s repo settings
- Check that your Deploy Monkey server is accessible from the internet
- In GitHub/GitLab, check the webhook delivery history for error codes
- Ensure you’re pushing to the tracked branch (other branches are ignored)
Clone Failed
Section titled “Clone Failed”- Verify the repository URL is correct
- For private repos, ensure the token has read access
- Check that the branch name matches exactly (case-sensitive)