Project:Tinderbox-cluster/How the Buildbot backend works

From Gentoo Wiki
Jump to:navigation Jump to:search

Buildbot

Buildbot check the repository for changes. When the change happen to a ebuild it trigger builders. That call factories where the steptes is defined. Read more on Buildbot's Doc's

Builders console view.jpg

In console view you can see the builders in upper right coner.

The builder id's is under. On the left is info off the commits.

update_db_check

This get projects and repositorys data and trigger next builder.

update_repo_check

We update the repositorys use by the database.

update_cpv_data

Check caterorys and packages, update the database if needed.

update_v_data

Add, change or delete the version in the database of the package

build_request_data

Check of the package trigger a build request.

run_build_request

Run build request.jpg

Build the package in multiplay steps

In setproperty steps you can see the stdio output and line 0 is the command line that being use.

The main steps is

  • setup /etc/portage
  • Update the repo
  • Update packages
    • We do a pre emerge. We check if all is okey to run emerge with no pretend.
    • Command: emerge -v -uDN --changed-deps --changed-use --pretend @world --buildpkg-exclude virtual --buildpkg-exclude acct-*
  • Clean it up
    • We do a pre depclean if all is okay run depclean without pretend.
    • Run preserved-libs if needed
    • Run depclean
  • Run Pkg check
    • We run Pkgcheck on the package dir and get a json output that we check.
  • Check if the package is the best match
    • We run emerge -v -pO --usepkg=n caterory/package to see if the package that portage find match the package we try to build. It can be set to match all.
  • Build the package
    • We do a pre emerge to test if need to update portage settings like use flags.
      • Check for use changes and if needed update package.use
    • Run emerge to build the package
      • Command: emerge -v -1 =category/package-version --usepkg-exclude category/package --buildpkg-exclude virtual --buildpkg-exclude acct-*
      • Check the output for info
      • Download the logs
      • Trigger the parse_build_log builder for showing logs (summery, emerge --info, pkgcheck log)
  • Clean it up
    • We do a pre depclean if all is okay run depclean without pretend.
    • Run preserved-libs if needed
    • Run depclean

parse_build_log

Parse the logs and info and make summery of it.