A personal, self-hosted pipeline runner and deployment platform built from scratch.
Note: Note: This project marks my first deep dive into Go. While I utilized an LLM to assist with syntax and implementation speed, the architecture, system design, and engineering logic are entirely my own. To ensure a deep understanding of the fundamentals, I intentionally avoided high-level orchestration tools, building the deployment logic from the ground up to master the underlying mechanics.
This project aims to provide a lightweight, robust alternative to heavy CI/CD systems, offering custom pipelines, isolated execution, and automated deployments.
- Docker & Docker Compose
- Go 1.25+
- Node.js & npm (for the frontend)
-
Start Infrastructure Launch the database and SonarQube services:
docker-compose up -d
-
Configure & Run Backend
# Install dependencies go mod tidy # Configure environment cp .env.example .env # Populate the .env file (Database connection, OAuth credentials, etc.) # Run the server go run main.go
The backend API will be available at
http://localhost:8080. -
Run Frontend (in a separate terminal) Navigate to the frontend directory:
cd ../imt-cloud-CI-CD-frontend npm install npm run devAccess the UI at
http://localhost:5173.
- Log in to the platform.
- Click "New Project".
- Provide the Repository URL (HTTPS).
- (Optional) Provide a Personal Access Token if the repo is private.
To enable automated deployment, you must set up SSH access to your target server.
- Ensure you have a user (e.g.,
ubuntuorroot) that can rundockercommands without sudo. - Generate an SSH key pair (or use an existing one).
- Add the Public Key to the target user's
~/.ssh/authorized_keysfile.
In the CI/CD Project Settings:
- Go to Project Settings.
- SSH Host: Enter the IP address and port (e.g.,
192.168.1.10:22). - SSH User: Enter the username (e.g.,
ubuntu). - SSH Private Key: Paste the Private Key content directly.
To push built images to a registry (Docker Hub, etc.):
- In Project Settings > Container Registry.
- Enter Registry User (e.g., Docker Hub username).
- Enter Registry Token (Access Token).
You can inject secrets (like SONAR_TOKEN, API_KEYS) without hardcoding them in your files:
- Go to Project Settings > Environment Variables.
- Add Key/Value pairs.
- Toggle the Lock Icon to mark sensitive values as Secret.
- These are injected into your pipeline jobs automatically.
Add a pipeline.yml (default name) to your repository root. We use a lightweight, GitLab-CI inspired syntax.
stages:
- build
- test
- scan
build_job:
stage: build
image: python:3.9
script:
- pip install -r requirements.txt
- python setup.py buildAdd a docker-compose.yml to your repository root.
The system automatically handles versioning by generating a docker-compose.override.yml that points to the specific image tag built in the pipeline.
Automatic Rollback: If a deployment fails (e.g., a container crashes immediately after startup), the system detects the failure and automatically rolls back to the last known successful commit.
Conflict Handling: The deployment engine automatically handles container name conflicts by cleaning up old containers before starting the new version, ensuring a smooth update process.
For detailed technical architecture and internal workings, please refer to TECHNICAL_DOCS.md.