Initialisation depot
This commit is contained in:
86
arti-api/auth-service/VERSIONING-COMPLETE.md
Normal file
86
arti-api/auth-service/VERSIONING-COMPLETE.md
Normal file
@@ -0,0 +1,86 @@
|
||||
# 🚀 Versioning & Docker Registry Setup Complete!
|
||||
|
||||
## ✅ What's Implemented
|
||||
|
||||
### 1. Dynamic Versioning from `version.conf`
|
||||
Your pipeline now reads versioning from `version.conf`:
|
||||
```bash
|
||||
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 username
|
||||
- `docker_password` - Registry password/token
|
||||
- `docker_registry` - Registry URL (docker.io, ghcr.io, etc.)
|
||||
|
||||
### 4. Pipeline Flow
|
||||
1. **Clone** - Get source code
|
||||
2. **Read Version** - Parse `version.conf`
|
||||
3. **Test** - Validate and show planned Docker tag
|
||||
4. **Build** - External Buildah with replica locking + versioned tag
|
||||
5. **Push** - Authenticated push to registry (main/master only)
|
||||
6. **Scale Down** - Release build lock
|
||||
|
||||
## 🔧 Setup Instructions
|
||||
|
||||
### For Docker Hub:
|
||||
```bash
|
||||
# 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:
|
||||
```bash
|
||||
# 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:
|
||||
```bash
|
||||
# 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
|
||||
|
||||
1. **Activate Repository** in Drone UI at https://drone.aipice.local
|
||||
2. **Set Docker Secrets** in Repository → Settings → Secrets
|
||||
3. **Update version.conf** with your registry details
|
||||
4. **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!** 🎉
|
||||
Reference in New Issue
Block a user