Skip to content

ci: cache repo mirror, not workspace, expand docs

Zygmunt Krynicki requested to merge zyga/oniro-docs:feature/repo-mirror into main

Working with the new documentation CI pipeline has uncovered problems caused by attempts to cache the entire repo workspace. Initially there are no problems but as pipelines are testing subsequent iterations of a branch, history may become non-linear. In one case repo refused to synchronize (with repo sync --force) the updated repository citing lack of common history.

In the experimental Oniro pipeline I've since switched to keeping a cache of the git repo miror, not repo workspace. This also helps with cache hit when multiple releases are being tested, as cache is mostly static (per release) and subsequent pielines do not fight with each other by ovrewriting the cache to their preferred state.

Some variable names are updated to better reflect what is going on. Ample new documentation is added, as code comments, to explain how things work.

Note that some of the defaults are unexpected, as they are coming from the oniro.git pipeline, and eventually will be included. This can be seen as variables defined on the .oniro-repo-workspace job that are subsequently re-defined in the build job.

Signed-off-by: Zygmunt Krynicki zygmunt.krynicki@huawei.com

Edited by Amit Kucheria

Merge request reports