BuildIt! 2 is the latest generation of BuildIt! build automation system for AOSC OS.
BuildIt! 2 have the following frontends:
- Web: hosted at https://buildit.aosc.io
- Telegram: Telegram bot @aosc_buildit_bot
- GitHub: add @aosc-buildit-bot in pr comments
BuildIt! 2 uses PostgreSQL as the database.
The database should have the following tables:
- pipelines: pipeline is a series of jobs
- jobs: job is a specific task for worker to do
- packages: track the status of packages in stable branch
- users: track github and telegram user association
The terms pipelines
and jobs
are taken from GitLab CI.
Backend server handles new requests from Frontend and create new pipeline. The pipeline may contain multi architectures, then it is split into multiple jobs for each architecture.
Worker can grab new job from backend server. Workers need to send heartbeat to the server periodically reporting its current state, otherwise the job will be rescheduled.
Worker server fetches jobs from backend and runs ciel to do the actual build. The result is reported to backend server via HTTP api endpoint.
Each worker can only build for one architecture.
Each job contains the following arguments:
- One or more packages to build
- Git ref of aosc-os-abbs repo
- Architecture e.g. amd64 to filter worker
Job result:
- List of successful builds
- Failed package and link to build log (on buildit.aosc.io)
Job status:
- created: can be assigned to worker
- running: assigned to worker
- error: unexpected error
- success: finished, build_success && pushpkg_success
- failed: finished, !build_success || !pushpkg_success
Pipeline status is computed from job status:
- error: any job has status
error
- failed: any job has status
failed
, no job has statuserror
- success: all job has status
success
- running: otherwise
Authentication:
- Web: login via GitHub App
- Telegram: jump to GitHub App and authenticate, associate with Telegram user
- GitHub: username provided by GitHub
User roles:
- Anonymous: not logged-in
- Guest: logged-in, but not in AOSC-Dev GitHub organization
- Developer: loggined and in AOSC-Dev GitHub organization
ENVREQ in package spec file, space-separated filters that are AND-ed:
- big_job: assign to big machines (what is BIG?)
- core_mem=4: minimum memory size in GiB to logical core count ratio
- total_mem=128: minimum memory size in GiB
- dist=128: minimum free disk space in GiB