Files
ovirt-api-simulator/docs/ci-cd.md
T
inecs 540675597a Add SemVer VERSION, Jenkins CI/CD, and release 0.1.1.
Ship Harbor/Hub push with latest+version tags, deploy to ovirt.devops.org.ru, and show the package version badge in Help → About.
2026-07-28 00:56:52 +03:00

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:

  1. Build & push (agent docker / DinD) — multi-arch linux/amd64,linux/arm64 to Harbor and Docker Hub with tags :{VERSION} and :latest only.
  2. Deploykubectl set image on simulators/simulators-ovirt (main container simulator + initContainer migrate), 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

  1. Ensure the repo is on Gitea (mirror or primary) with branch main.
  2. Deploy key / Jenkins credential ssh-gitea-key can clone the repo (git@…:…/ovirt_api_simulator.git or your path).
  3. Optional: webhook from Gitea → Jenkins Multibranch (or rely on Jenkins SCM polling / Organization Folder).

Jenkins setup

  1. Credentials — create the four IDs above if missing (same as Wrapped).
  2. Agent — Kubernetes cloud pod template with label docker and a docker container (DinD / buildx), same as Wrapped.
  3. Job — Multibranch Pipeline (or Pipeline from SCM):
    • Script Path: Jenkinsfile
    • Branch discover: main (and master if needed)
    • SCM: Gitea SSH URL + credential ssh-gitea-key
  4. Harbor projectdevops-tools must allow the robot to push ovirt-api-simulator (create the repository on first push or pre-create).
  5. Docker Hubinecs/ovirt-api-simulator exists / push rights for credential docker-hub.
  6. Cluster — release simulators in namespace simulators already installed (make addon-simulators). Deployment name must be simulators-ovirt.
  7. Run once on main after bumping VERSION and pushing. Confirm:

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