Skip to content

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.

  1. You connect a GitHub or GitLab repository to your instance
  2. Deploy Monkey clones the code and builds an immutable Docker image with your modules baked in
  3. On every push to your tracked branch, a webhook triggers a new pipeline run
  4. The pipeline builds a new image, upgrades modules, and performs a health check
  5. If the build succeeds, the new image goes live. If it fails, the instance automatically rolls back to the previous working version
  1. Open your instance — Navigate to your instance in the Deploy Monkey dashboard.

  2. Go to the Git tab — Click the “Git” tab in the instance navigation.

  3. Choose your provider — Select GitHub, GitLab, or Custom (manual URL).

  4. Connect your account — Sign in via OAuth (GitHub/GitLab) or enter a Personal Access Token.

  5. Select repository and branch — Browse your repos and pick the branch to track (e.g. main).

  6. 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.

- Public and private repositories - OAuth login or Personal Access Token - Webhook auto-created with HMAC-SHA256 signature verification - Commit author avatars fetched from GitHub API - Public and private repositories (including self-hosted GitLab) - OAuth login or Personal Access Token - Webhook auto-created with token verification - Supports nested groups/subgroups - Any Git repository accessible via HTTPS - Authenticated with a Personal Access Token - Manual webhook setup required

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 dependencies

Every git operation runs through Deploy Monkey’s pipeline engine. Here’s what happens on each push:

StepWhat happens
Git PullPulls the latest changes from your tracked branch
Detect ModulesScans for __manifest__.py files to find Odoo modules
Build ImageCreates an immutable Docker image with your code and pip dependencies baked in
Update ConfigRegenerates odoo.conf and docker-compose.yml for the new image
Upgrade ModulesRuns odoo -u for all installed modules from your repo
RestartRestarts the container with the new image
Health CheckVerifies Odoo responds with HTTP 200 (up to 2 minutes)
FinalizeRecords the deployed SHA and cleans up old Docker images

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

If a pipeline run fails at any step:

  1. The instance automatically reverts to the previous working Docker image
  2. The failed image is deleted to save disk space
  3. Your instance remains accessible throughout — zero downtime

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.

You can trigger a sync manually from the Git tab:

  1. Click the Sync button on the repo card
  2. A pipeline run is queued immediately
  3. Watch the progress in real-time on the Overview tab

To switch the tracked branch:

  1. Click the branch name on the repo card in the Git tab
  2. Select a new branch from the dropdown (fetched from your provider)
  3. Deploy Monkey re-clones with the new branch and rebuilds the image

To remove a connected repository:

  1. Click the Disconnect button on the repo card
  2. Confirm in the dialog (shows the repository name being disconnected)
  3. Deploy Monkey removes the clone from the server, rebuilds the base image without your custom code, and deletes the webhook from your provider

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.

For custom providers or if you prefer not to use OAuth:

  • GitHub: Create a token at Settings → Developer Settings → Personal Access Tokens with repo scope
  • GitLab: Create a token at Settings → Access Tokens with read_repository scope
  • The token is stored encrypted in the Deploy Monkey database

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.
  • Activate developer mode in Odoo (Settings → Developer Tools)
  • Click “Update Apps List” in the Apps menu
  • Verify __manifest__.py is valid and the module’s depends are installed
  • Check the step log for Docker build errors
  • Ensure requirements.txt has compatible package versions
  • Pip errors are non-fatal during build but shown as warnings
  • 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
  • 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)
  • Verify the repository URL is correct
  • For private repos, ensure the token has read access
  • Check that the branch name matches exactly (case-sensitive)