2.5 KiB
2.5 KiB
🚀 Versioning & Docker Registry Setup Complete!
✅ What's Implemented
1. Dynamic Versioning from version.conf
Your pipeline now reads versioning from version.conf:
BASE_VERSION=1.0
DOCKER_REPO=hexah/auth-service
2. Generated Docker Tags
Images are now tagged as: <DOCKER_REPO>:<BASE_VERSION>.<DRONE_BUILD_NUMBER>
Examples:
hexah/auth-service:1.0.123(build #123)ghcr.io/username/auth-service:1.0.456(build #456)
3. Docker Registry Authentication
Added support for private registries with these secrets:
docker_username- Registry usernamedocker_password- Registry password/tokendocker_registry- Registry URL (docker.io, ghcr.io, etc.)
4. Pipeline Flow
- Clone - Get source code
- Read Version - Parse
version.conf - Test - Validate and show planned Docker tag
- Build - External Buildah with replica locking + versioned tag
- Push - Authenticated push to registry (main/master only)
- Scale Down - Release build lock
🔧 Setup Instructions
For Docker Hub:
# In Drone UI → Repository → Settings → Secrets:
docker_username = your-dockerhub-username
docker_password = your-dockerhub-password
docker_registry = docker.io
# In version.conf:
DOCKER_REPO=yourusername/auth-service
For GitHub Container Registry:
# Secrets:
docker_username = your-github-username
docker_password = ghp_your-github-token
docker_registry = ghcr.io
# In version.conf:
DOCKER_REPO=ghcr.io/yourusername/auth-service
For Private Harbor/Registry:
# Secrets:
docker_username = harbor-username
docker_password = harbor-password
docker_registry = harbor.example.com
# In version.conf:
DOCKER_REPO=harbor.example.com/project/auth-service
🎯 Next Steps
- Activate Repository in Drone UI at https://drone.aipice.local
- Set Docker Secrets in Repository → Settings → Secrets
- Update version.conf with your registry details
- Push to main/master to trigger build + push
💫 Advanced Features Ready
- ✅ Atomic Build Locking (replica scaling 0→1→0)
- ✅ Modular Jsonnet Configuration with imports
- ✅ External Buildah with privileged builds
- ✅ Graceful Termination (2s vs 30s)
- ✅ RBAC Permissions for deployment scaling
- ✅ Dynamic Versioning from config file
- ✅ Multi-Registry Support with authentication
- ✅ Branch-based Pushing (only main/master)
Your sophisticated CI/CD pipeline is now complete! 🎉