aboutsummaryrefslogtreecommitdiff
Qualcomm Landing Team automerge and integration branch
======================================================

The QCOM LT main development branch is called
integration-linux-qcomlt, and it can be found here:
https://git.codelinaro.org/linaro/qcomlt/kernel/-/tree/integration-linux-qcomlt

Automation tools are used to generate this branch.

Automerge
---------

Automerge is a set of scripts used to manage continuous integration of a
set of branches being developed against mainline. Functionally, it aspires
to do what linux-next does.

List of relevant tools/trees
----------------------------

* https://git.linaro.org/power/automerge.git
  Automerge tool (linux-next style)
* https://git.linaro.org/ci/job/configs.git
  Linaro Jenkins configuration files
* https://git.codelinaro.org/linaro/qcomlt/automerge-rrcache.git
  QCOM LT git rerere cache
* https://git.codelinaro.org/linaro/qcomlt/kernel-integration.git
  History of previous integration branches

List of relevant CI jobs
------------------------

All Jenkins CI jobs can be found in
https://git.linaro.org/ci/job/configs.git/tree/.

* trigger-lt-qcom-linux-automerge-repo-manifest.yaml: Jenkins trigger
  to detect when the QCOM LT automerge config has been updated
* trigger-lt-qcom-linux-automerge.yaml: Jenkins trigger to detect when
  to run QCOM LT automerge
* lt-qcom-linux-automerge.yaml: Actual job to run the automerge tools
  for the QCOM LT integration branch

All the Jenkins scripts are straight forward to read/parse and follow
through. CI jobs/results can be monitored here:
https://ci.linaro.org/job/lt-qcom-linux-automerge/.

If the merge succeeds, which means that all dev branches were merged,
a build test is done for ARM and ARM64 with multi_v7_defconfig and
defconfig respectively.

In case of build or merge failure, an email notification is sent to
qcomlt-patches@lists.linaro.org. If both builds succeed then the
branch called integration-linux-qcomlt is updated on git.codelinaro.org
(it is a git rebase / forced push).

An archive of all previous integration branches can be found in the
kernel-integration git tree with a relevant branch name (which
includes dates and git commit description).

QCOM LT automerge configuration file
------------------------------------

The automerge configuration file for the QCOM LT CI can be found here:
https://git.codelinaro.org/linaro/qcomlt/configs/-/blob/master/automerge-ci.conf.

It is a list of branches that need to merged in order to produce the
resulting integration branch. The baseline branch is the starting
point of the merge process, which is typically Linus' master branch. A
merge is attempted when any of these conditions is met:
1. Linus' pushes a new tag
2. Any of the developer branch is updated
3. The automerge config file is updated

Each developer from the QCOM LT can update the automerge configuration
file as needed (e.g. add or remove a new dev branch).

To ease the integration with Jenkins triggers, the automerge
configuration file is converted into a repo XML manifest file, and
Jenkins uses this manifest file to detect changes in the developers'
branches. The conversion is automated, and the resulting XML file is
stored in the 'repo' branch,
e.g. https://git.codelinaro.org/linaro/qcomlt/configs/-/blob/repo/automerge-ci.xml,
however this remains an implementation detail.

Git rerere
----------

Since we are attempting to merge many branches on a very frequent
basis, merge conflicts are expected. Automerge can use a git rerere
cache. It is the responsibility of QCOM LT to ensure that the git
rerere cache is up-to-date whenever a new merge conflicts shows
us, e.g. a developer who notices the merge issue, will run the
automerge tools locally, fix the merge conflicts, recorde the rerere
entry and update the QCOMLT rerere cache (git tree).

Generally we expect the 'main' owner of each branch to monitor the
merge results and fix issues related to their code. However anyone
should be able to do it or help if/as needed. As such it's a good
practice to create dev branches in the QCOMLT kernel tree on
git.linaro.org so that we all have read/write access to all branches
(as opposed to personal repos on github, or on git.linaro.org).

Running automerge locally
-------------------------

Please check the main automerge README file for instructions to get
started and use the tool locally, see
https://git.linaro.org/power/automerge.git/tree/README.

CI tests
--------

Once the integration branch is published, further testing is done
using Linaro CI and LAVA as well as kernelci.org.