aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2023-08-16ci-merge: allow forcing rebuild of the integration treeHEADmasterDmitry Baryshkov
In some cases it is useful to force rebuilding of the integration tree. Add option for force-rebuilding the integ. Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
2023-02-02ci-merge: fix a problem of not merged remote into integration branchVladimir Zapolskiy
If there are two remotes and one of their remote names matches another one as a regexp pattern, then it will not be added as a new remote. This condition is met, when one remote name is a substring of another, and it may result in a missing merge of a remote branch. The problem is encountered by me, but the fix is attributed to Dmitry Baryshkov. Signed-off-by: Vladimir Zapolskiy <vladimir.zapolskiy@linaro.org> Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
2021-02-22ci-merge: properly filter out remotes from local treeNicolas Dechesne
The purpose of this function is to remove remotes from the local trees if they have been removed from the config file. It is broken since 2ebf50e36955 (ci-merge: Add missing -q to grep when searching for old branches). When we have -q everywhere like: echo $LINE | grep -q "^$REMOTE_NAME\b" | grep -q $REMOTE_URL | grep -q "$REMOTE_BRANCH" Then it will *always* be false, since the first grep command will return an empty string. What we really wanted to do is to find a remote in the local tree which is *not* in the config, so that we can simply remove it. We don't even need to look/match for branches, e.g. if we have a remote with the same name and the same url, then it's found, and we can keep it in case it's in the config file. Signed-off-by: Nicolas Dechesne <nicolas.dechesne@linaro.org> Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
2020-11-24ci-merge: do_remove_old add quotes in REMOTE_BRANCHAníbal Limón
To avoid errors when more than one branch is get in REMOTE_BRANCH. Signed-off-by: Aníbal Limón <anibal.limon@linaro.org> Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
2020-11-24ci-merge: Add missing -q to grep when searching for old branchesAníbal Limón
Fixes multiple messages of, ... grep: integration-linux-qcomlt-20180420-210521-999f6879aa74: No such file or directory ... Example: https://ci.linaro.org/job/lt-qcom-linux-automerge/722/consoleFull Signed-off-by: Aníbal Limón <anibal.limon@linaro.org> Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
2018-08-29ci-merge: Improve READMEAmit Kucheria
Describe how we share the rerere cache in the team Signed-off-by: Amit Kucheria <amit.kucheria@linaro.org> Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
2018-08-29ci-merge: Remove the terminal() functionAmit Kucheria
We no longer spawn a new terminal for 'git mergetool'. Remove the function that tried to find a suitable terminal Signed-off-by: Amit Kucheria <amit.kucheria@linaro.org> Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
2018-08-29ci-merge: fix messages, grammarAmit Kucheria
Random bunch of fixes to make the output a bit nicer to read Signed-off-by: Amit Kucheria <amit.kucheria@linaro.org> Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
2018-08-29ci-merge: Introduce interactive modeAmit Kucheria
Instead of trying to guess whether we're running interactively by checking DISPLAY variable and other tricks, make non-interactive mode as default and add a new config option for interactive mode. mergetool will only be invoked in interactive mode. Signed-off-by: Amit Kucheria <amit.kucheria@linaro.org> Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
2018-08-29ci-merge: Clone rr-cache into .automergeBjorn Andersson
Instead of creating an abundance of directories in /tmp, clone the rr-cache into .automerge/rr-cache and symlink it into .git/rr-cache. After running ci-merge a new commit is created in the rr-cache git, which for now needs to be pushed manually to the shared rerere cache. Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org> [Manually applied the patch to master] Signed-off-by: Amit Kucheria <amit.kucheria@linaro.org> Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
2018-08-29ci-merge: Allow local overridesBjorn Andersson
Add support for local overrides in order to be able to rebase branches and iteratively try to build up and test the merged branch. Each remote being merged in can be overridden by a local branch named "override/<remote>" This makes it possible to create a bunch of local override branches, prepare the rr-cache, build, boot test and then push all pieces at once. Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org> Signed-off-by: Amit Kucheria <amit.kucheria@linaro.org> Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
2018-08-29ci-merge: Allow specifying config file on the cmdlineBjorn Andersson
Rather than depending on ci-config being available in the path, just allow --config to be specified directly with ci-merge. Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org> [Refactor for master branch] Signed-off-by: Amit Kucheria <amit.kucheria@linaro.org> Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
2018-08-29ci-merge: Allow running mergetool without XBjorn Andersson
Allow running mergetool in a non-windowing environment, by spawning mergetool inline from the script. We no longer need to guess what terminal might be installed on the system. As the config file is fed line by line into the while loop we need to dup the original stdin, or the spawned mergetool will read stdin from the config file. Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org> [refactored to master] Signed-off-by: Amit Kucheria <amit.kucheria@linaro.org> Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
2018-07-06README: fix example CONFIG_PATHNiklas Cassel
The example CONFIG_PATH in the README refers to a directory, when it should refer to a file. Signed-off-by: Niklas Cassel <niklas.cassel@linaro.org> Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
2018-06-27ci-merge: use git describe when archiving the previous branchNicolas Dechesne
'git describe' provides a better string to describe the branch, and for example it would show the kernel version, assuming that Linus' tags have been fetched. It makes it much simpler to look at branch history. Signed-off-by: Nicolas Dechesne <nicolas.dechesne@linaro.org> Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
2018-06-27ci-merge: enfore merge.conflictstyle is set to 'merge'Nicolas Dechesne
merge.conflictstyle can be either 'merge' or 'diff3'. When using 'diff3' there is more context information provided by git for each merge conflict. While git rerere will try to be smart to discard the additional data about 'common ancestor', it is possible that the conflict left when making the same merge are actually different when using these two conflict styles. IOW, if the merge produces <<< side A ||| common === side B >>> when diff3 style is chosen, but if the same merge results in <<< side A' === side B' >>> where side A' is not identical to side A (or B' and B are not identical), then we will fail to find the previously recorded resolution. as discussed here: https://marc.info/?l=git&m=153003225927418&w=2 So basically, it's safer to force a specific merge conflcit style in automerge to avoid this type of issues, especially when sharing a rr-cache within the team. Signed-off-by: Nicolas Dechesne <nicolas.dechesne@linaro.org> Acked-by: Amit Kucheria <amit.kucheria@linaro.org> Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
2018-05-31ci-merge: Require REMOTE_REPO and RR_CACHE to be specified explicitlyAmit Kucheria
REMOTE_REPO and RR_CACHE can be made optional, so remove their default values and make code that depends on them conditional on their being defined. This allows someone to to locally run ci-merge without any rerere cache and without requiring to push anything to a remote repository. This CHANGES the default behaviour of ci-merge to require the -r and -c options for REMOTE_REPO and RR_CACHE respectively. To make things more robust, add a new function to check if repos specified on the cmdline exist. We end up with some strange errors because we don't error out early enough currently. Signed-off-by: Amit Kucheria <amit.kucheria@linaro.org> Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
2018-05-29ci-merge: If a merge failed exit instead of continueAníbal Limón
The right behaviour is to exit when a merge fails instead of continue to avoid spend time. Signed-off-by: Aníbal Limón <anibal.limon@linaro.org> Tested-by: Nicolas Dechesne <nicolas.dechesne@linaro.org> Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
2018-05-07ci-merge: When a merge conflict exists try to commitAníbal Limón
Used to handle when a merge conflict is resolved by rerere should be ok to commit without any edit/add. Signed-off-by: Aníbal Limón <anibal.limon@linaro.org> Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
2018-05-07ci-merge: Enable git rerere autoupdateAníbal Limón
If a merge conflict is resolved by rerere auto add the files to commit later. Signed-off-by: Aníbal Limón <anibal.limon@linaro.org> Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
2018-05-02Begin a README for automergeAmit Kucheria
Signed-off-by: Amit Kucheria <amit.kucheria@linaro.org> Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
2018-05-02ci-merge: Simplify obtaining remote branch name of remoteAmit Kucheria
'git remote show <remote name>' queries the remote server which takes a bit of time. This makes the do_remove_old() operation very slow when you have several branches being merged in the config file. Since we check the REMOTE_NAME, REMOTE_URL, REMOTE_BRANCH of each line in the config file against pre-configured remotes, we can safely query only the local cache aka .git/config for these values instead of contacting the server each time. Making this assumption significantly speeds up the operation. Signed-off-by: Amit Kucheria <amit.kucheria@linaro.org> Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
2018-05-02ci-merge: simplify obtaining URL of remote using built-in commandAmit Kucheria
grep'ping for regexes and piping the result for further munging can be prone to breakage. As of Git 2.7, git remote get-url is officially supported. Use it. Signed-off-by: Amit Kucheria <amit.kucheria@linaro.org> Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
2018-05-02ci-merge: Rerere cache sharingAmit Kucheria
Pre-populates .git/rr-cache in the local tree with previous merge conflict resolutions so that they can be shared across teams. We currently don't push any new conflict resolutions directly to this global rerere cache. That is left as an exercise for the user. Signed-off-by: Amit Kucheria <amit.kucheria@linaro.org> Acked-by: Aníbal Limón <anibal.limon@linaro.org> Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
2018-04-23ci-blame: Whitespace cleanupsAmit Kucheria
Signed-off-by: Amit Kucheria <amit.kucheria@linaro.org> Signed-off-by: Daniel Lezcano <daniel.lezcano@free.fr>
2018-04-23ci-merge: handle the case of a dirty local git treeAmit Kucheria
We can't proceed with a local tree that has any changes. Either offer to clean them out, or abort and let the user clean them. Signed-off-by: Amit Kucheria <amit.kucheria@linaro.org> Signed-off-by: Daniel Lezcano <daniel.lezcano@free.fr>
2018-04-20ci-merge: Don't try to make manual merge if no DISPLAYAníbal Limón
If DISPLAY isn't set (user intervention), don't try to make a conflict resolution and abort merge. Signed-off-by: Aníbal Limón <anibal.limon@linaro.org> Acked-by: Daniel Lezcano <daniel.lezcano@linaro.org> Acked-by: Amit Kucheria <amit.kucheria@linaro.org>
2018-04-17ci-merge: Add support for push integ history branchAníbal Limón
When a new integ branch is made the old one is renamed to keep history so push it also in remote repository. Signed-off-by: Aníbal Limón <anibal.limon@linaro.org>
2018-04-17ci-{config, report, test}: Add support to specify settings from outsideAníbal Limón
This allows the environment variables to be set on the commandline before calling the scripts. Signed-off-by: Aníbal Limón <anibal.limon@linaro.org>
2018-04-03ci-merge: Add a timestamp to old integration treesAmit Kucheria
Also change the hash to append an abbreviated hash to make it shorter Signed-off-by: Amit Kucheria <amit.kucheria@linaro.org> Signed-off-by: Daniel Lezcano <daniel.lezcano@free.fr>
2018-04-03Use the generic x-terminal-emulator where available instead of forcing xtermAmit Kucheria
This defaults to whatever is the default terminal on the machine, which is likely to be better set up for colors, fonts, keybindings, etc. For example, the default xterm just looks ugly on my machine. Signed-off-by: Amit Kucheria <amit.kucheria@linaro.org> Signed-off-by: Daniel Lezcano <daniel.lezcano@free.fr>
2018-04-03ci-merge: Correctly print the URL and BRANCH name of the remote being deletedAmit Kucheria
We're printing REMOTE_BRANCH and REMOTE_URL but those are not set in the function, fix that. Signed-off-by: Amit Kucheria <amit.kucheria@linaro.org> Signed-off-by: Daniel Lezcano <daniel.lezcano@free.fr>
2018-04-03config sample: better describe the sample configuration fileAmit Kucheria
Signed-off-by: Amit Kucheria <amit.kucheria@linaro.org> Signed-off-by: Daniel Lezcano <daniel.lezcano@free.fr>
2018-03-28Change the hidden configuration directory name to .automergeDaniel Lezcano
Signed-off-by: Daniel Lezcano <daniel.lezcano@free.fr>
2018-03-28As we will share the scripts with everyone in Linaro, let change the nameDaniel Lezcano
to a more generic one. Signed-off-by: Daniel Lezcano <daniel.lezcano@free.fr>
2017-11-05pmwg-ci: Fix baseline used as remote changeDaniel Lezcano
With the current code, we consider the baseline as one regular remote but that is not true as we have specific policy for modified and updated baseline (tag or commit-id changes). That triggers multiple times an update of the CI loop for the same commit-id as it is assumed we have a remote branch updated when the baseline is changed (and we want to track per tag). Fix this by discarding the baseline when updating the remotes. Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
2017-10-31pmwg-ci: Fix missing path setupDaniel Lezcano
Currently the script only works on the current directory, as the local repository option is not set at the right moment. Fix this by adding a setup path function to move the current directory to the place set by the -l option or by default Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
2017-10-31pmwg-ci: Fix help messages and commentDaniel Lezcano
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
2017-10-27pmwg-ci: Don't merge the baseline branch on itselfDaniel Lezcano
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
2017-10-27pmwg-ci: Get the last commit id or the last tagDaniel Lezcano
Depending on the passed option, we check against the last commit id or the last tag change on the specified branch. Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
2017-10-27pmwg-ci: Add the track optionDaniel Lezcano
We want to track the changes on HEAD or on the latest tag change. Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
2017-10-27pmwg-ci: Encapsulate the options parsing into a functionDaniel Lezcano
... and call it from the big setup function Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
2017-10-27pmwg-ci: Initialize correctly and get the baseline branchDaniel Lezcano
This change group all setup functions into a bigger one which make sure the underlying functions are called in the right order. The baseline branch name is retrieved from the configuration file in order to get the tag from the branch itself and not in a global manner. That will allow to specify if we track <branch>/HEAD or <branch>/TAG change. Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
2017-10-26pmwg-ci: Baseline topic must be in the config file nowDaniel Lezcano
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
2017-10-26pmwg-ci: Improve the help message and exit when the help is askedDaniel Lezcano
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
2017-10-26pmwg-ci: Rename the BASELINE variableDaniel Lezcano
The usage of the name BASELINE_BRANCH is inadequate because it is a remote repository, not a branch. As we will need to specify a branch to track the baseline branch (which is today 'master' of Linus's tree), let's rename the variable to its real name. Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
2017-10-26pmwg-ci-integ: Encapsulate the get last tag commandDaniel Lezcano
In order to deal with generic code, we have to encapsulate the get last tag into a function because the rule will be different on an Android tree and we will have to deal the latest commit id. Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
2017-10-24pmwg-ci: Add option to the pmwg-ci-integ scriptDaniel Lezcano
Add options parsing in order to make the script more flexible for android integration tree. Keep the default value to the current ones, so no breakage will happen when installing the script. Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
2017-10-23pmwg-ci-report: launch tests when boot/build succeedVincent Guittot
Launch some tests when kernelci doesn't report any errors linked to one of our dev branches. pmwg-ci_report will return 0 only if everything is ok for launching test: - tests have not been done yet - kernelci report for the branch is available - No error reported by kernelci When everything is correct, pmwg-ci launches ktest that will build the kernel for our test platform, test that our platfrom boots correctly with the kernel and then launch Workload Automation. The current yalm agenda is simple and only runs hackbench cyclictest and ebizzy Signed-off-by: Vincent Guittot <vincent.guittot@linaro.org>
2017-05-04pmwg-ci-report: fix url of logs summaryVincent Guittot
url has changed when kernelci came back online after some maintenances