540675597a
Ship Harbor/Hub push with latest+version tags, deploy to ovirt.devops.org.ru, and show the package version badge in Help → About.
3.0 KiB
3.0 KiB
Language / Язык: English | Русский
CI/CD (Jenkins + Gitea)
SemVer lives in VERSION. Bump locally with make bump-patch /
make bump-minor (also syncs pyproject.toml and Helm chart/values). Jenkins
does not bump — it builds whatever is in the commit.
Public lab URL after deploy: https://ovirt.devops.org.ru/
Pipeline
Single Jenkinsfile on main / master:
- Build & push (agent
docker/ DinD) — multi-archlinux/amd64,linux/arm64to Harbor and Docker Hub with tags:{VERSION}and:latestonly. - Deploy —
kubectl set imageonsimulators/simulators-ovirt(main containersimulator+ initContainermigrate), then rollout status (--timeout=1200s).
First cluster install (Ingress, Postgres, secrets) is not this job — use
make addon-simulators in DevOpsTools/K3S (simulators_proxmox_host: ovirt.devops.org.ru).
Images
| Registry | Repository |
|---|---|
| Harbor | hub.antropoff.ru/devops-tools/ovirt-api-simulator |
| Docker Hub | inecs/ovirt-api-simulator |
Credentials (Jenkins Global)
| ID | Type | Use |
|---|---|---|
harbor-devops-tools-push-pull-access |
Username/password | Harbor robot push |
docker-hub |
Username/password | Docker Hub inecs |
k3s-kubeconfig |
Secret file | Kubeconfig for deploy |
ssh-gitea-key |
SSH private key | Gitea SCM checkout |
Gitea setup
- Ensure the repo is on Gitea (mirror or primary) with branch
main. - Deploy key / Jenkins credential
ssh-gitea-keycan clone the repo (git@…:…/ovirt_api_simulator.gitor your path). - Optional: webhook from Gitea → Jenkins Multibranch (or rely on Jenkins SCM polling / Organization Folder).
Jenkins setup
- Credentials — create the four IDs above if missing (same as Wrapped).
- Agent — Kubernetes cloud pod template with label
dockerand adockercontainer (DinD / buildx), same as Wrapped. - Job — Multibranch Pipeline (or Pipeline from SCM):
- Script Path:
Jenkinsfile - Branch discover:
main(andmasterif needed) - SCM: Gitea SSH URL + credential
ssh-gitea-key
- Script Path:
- Harbor project —
devops-toolsmust allow the robot to pushovirt-api-simulator(create the repository on first push or pre-create). - Docker Hub —
inecs/ovirt-api-simulatorexists / push rights for credentialdocker-hub. - Cluster — release
simulatorsin namespacesimulatorsalready installed (make addon-simulators). Deployment name must besimulators-ovirt. - Run once on
mainafter bumpingVERSIONand pushing. Confirm:- Harbor/Hub tags
:0.x.yand:latest kubectl -n simulators get deploy,ing- Help → About shows badge
v0.x.yon https://ovirt.devops.org.ru/
- Harbor/Hub tags
Local release (without Jenkins)
make bump-patch # or bump-minor
make version-commit
git push origin HEAD
# or manual Hub-only:
make release # DOCKER_IMAGE=inecs/ovirt-api-simulator