While the production instance is hosted on
linux.kernelci.org, another independent instance
is hosted on staging.kernelci.org. This is
where all the changes to the KernelCI code and configuration get tested before
getting merged and deployed in production. It consists of a Jenkins instance
on bot.staging.kernelci.org, a Mongo
database with a
kernelci-backend
instance and
a kernelci-frontend
instance
for the web dashboard.
Jobs are run every 8h on staging, using all the code from open pull requests on GitHub. The kernel revisions being tested are rotating between mainline, stable and linux-next. An extra commit and a staging tag is created on top of each branch to artifically create a new revision in the KernelCI kernel tree even if there was no changes upstream, to ensure that jobs are run with a separate set of results. A reduced set of build configurations is used to limit the resources used on staging and to get results quicker.
There is also a plain mainline build every day, and a full linux-next build every Friday to at least have some complete coverage and potentially catch issues that can’t be seen with the reduced number of configs in staging builds.
A special feature of the staging instance is the ability to test code from open
GitHub pull requests before they get merged. This is handled by tools in the
kernelci-deploy
project, to
pull all the open pull requests for a given project, apply some arbitrary
patches and push a resulting staging.kernelci.org
branch back to the
repository with a tag. This branch is being replaced (force-pushed) every time
the tool is run.
Things to note:
kernelci-deploy
configuration files.staging-skip
label set.kernelci-deploy
doesn’t apply, the resulting branch is
not pushed. It is required that all the patches always apply since some of
them are necessary to adjust the staging behaviour (say, to not send
bisection email reports). They will need to get updated if they conflict
with pending PRs.The staging instance is running Jenkins, just like production. The main difference is that the staging one is publicly visible, read-only for anonymous users: bot.staging.kernelci.org
This allows for the job logs to be inspected. Also, some developers have a personal folder there to run modified versions of the Jenkins job but still using the available resources (builders, API tokens to submit jobs in test labs…).
There is a timer on the staging.kernelci.org server which starts a job every 8h, so 3 times per day. The job does the following:
kernelci-jenkins
kernelci-core
kernelci-backend
kernelci-backend
service using Ansible from kernelci-backend-config
with the staging branchkernelci-frontend
kernelci-frontend
service using Ansible from kernelci-frontend-config
with the staging branchstaging-${tree}
branch with a tag to the KernelCI kernel repokernelci_staging
build configThe last step should cause the monitor job to detect that the staging kernel
branch has been updated, and run a kernel build trigger job which in turn will
cause tests to be run. Builds and test results will be sent to the staging
backend instance, and results will be available on the staging web dashboard.
Regressions will cause bisections to be run on the staging instance, and
results to be sent to the
kernelci-results-staging@groups.io
mailing list.