Skip to content

Gitea and Drone integration

This integration combines Gitea as the source code management platform with [[Drone]] as the Continuous Integration/Continuous Deployment (CI/CD) automation tool.

Implementation

The standard implementation involves setting up a containerized Drone server that connects to a Gitea instance.^[400-devops-04-ci-cd-pipelines-drone.md] This typically requires configuring the Drone server environment variables, such as DRONE_SERVER_HOST, and ensuring the DRONE_DATABASE_DATASOURCE (often SQLite in containerized examples) is properly mapped to a persistent volume.^[400-devops-04-ci-cd-pipelines-drone.md]

To facilitate this, users often employ Docker or similar container technologies to build and deploy the Drone server image tailored to their specific Gitea environment.^[400-devops-04-ci-cd-pipelines-drone.md]

Drone server configuration

When deploying Drone, particularly for self-hosted scenarios, configuration may involve build tags to manage feature limits.^[400-devops-04-ci-cd-pipelines-drone.md] For instance, a build command might use tags like nolimit to remove standard operational restrictions found in default binaries^[400-devops-04-ci-cd-pipelines-drone.md].

A typical deployment setup involves the following environment configurations: * Database: Often configured to use sqlite3 for persistent storage within the container.^[400-devops-04-ci-cd-pipelines-drone.md] * Networking: Exposing ports (commonly 80 and 443) and setting the DRONE_SERVER_HOST to match the Gitea external URL.^[400-devops-04-ci-cd-pipelines-drone.md] * Volumes: Mapping /data to ensure data persistence across container restarts^[400-devops-04-ci-cd-pipelines-drone.md].

Sources

^[400-devops-04-ci-cd-pipelines-drone.md]