cbuildbot_launch: Add option to ignore preload for overlayfs mount
Add option to skip performing a preload if the option is provided, to
allow for testing using overlayfs again. The intent is to change the
location of the buildroot, along with an overlayfs mount, to utilize
snapshot mounts. This will speed up the sync process, align with the
standard approach, and support branches in the future.
BUG=b:198442885
TEST=`local tryjob`
Change-Id: Ida23a8668465fe2626a8b31551abcfc7aa5d2645
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/chromite/+/3138413
Tested-by: Mike Nichols <mikenichols@chromium.org>
Reviewed-by: Sean McAllister <smcallis@google.com>
diff --git a/scripts/cbuildbot_launch.py b/scripts/cbuildbot_launch.py
index 7693e36..4f73d0f 100644
--- a/scripts/cbuildbot_launch.py
+++ b/scripts/cbuildbot_launch.py
@@ -345,9 +345,10 @@
options: A parsed options object from a cbuildbot parser.
"""
cbuildbot_alerts.PrintBuildbotStepText('Branch: %s' % repo.branch)
- logging.info('Bootstrap script starting initial sync on branch: %s',
- repo.branch)
- repo.PreLoad('/preload/chromeos')
+ if not options.source_cache:
+ logging.info('Bootstrap script starting initial sync on branch: %s',
+ repo.branch)
+ repo.PreLoad('/preload/chromeos')
repo.Sync(detach=True,
downgrade_repo=_ShouldDowngradeRepo(options))