summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNavil Perez <navil@google.com>2021-02-17 23:06:59 +0000
committerCommit Bot <commit-bot@chromium.org>2021-02-18 01:43:41 +0000
commit0b91bc127459008ed6e068d8f44fca7b2ad8ad1a (patch)
treef66d17d4e44a1f455b2927e0dbcfeb8895961c5c
parente064a0f7bd23a4e42ac066951885bd53f60146eb (diff)
downloadchromite-0b91bc127459008ed6e068d8f44fca7b2ad8ad1a.tar.gz
config_stages: Config updater push ToT.json to main branch.
Config-updater is failing because it tries to push to a read only branch (https://ci.chromium.org/b/8855031191051902064). BUG=chromium:1126855 TEST=CQ passes Change-Id: If65c264e9a4a677481f09eff0daa7d1df92727c1 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/chromite/+/2702414 Commit-Queue: Navil Perez <navil@google.com> Tested-by: Navil Perez <navil@google.com> Reviewed-by: Mike Frysinger <vapier@chromium.org>
-rw-r--r--cbuildbot/stages/config_stages.py8
-rw-r--r--cbuildbot/stages/config_stages_unittest.py6
2 files changed, 7 insertions, 7 deletions
diff --git a/cbuildbot/stages/config_stages.py b/cbuildbot/stages/config_stages.py
index 3bfbd4201..7d8da4656 100644
--- a/cbuildbot/stages/config_stages.py
+++ b/cbuildbot/stages/config_stages.py
@@ -101,8 +101,8 @@ def GetBranchName(template_file):
if match:
if match.group(1) == 'ToT':
# Given 'build_config.ToT.json',
- # return branch name 'master'.
- return 'master'
+ # return branch name 'main'.
+ return 'main'
else:
# Given 'build_config.release-R51-8172.B.json',
# return branch name 'release-R51-8172.B'.
@@ -138,7 +138,7 @@ class CheckTemplateStage(generic_stages.BuilderStage):
milestone_path_pairs = []
for release_template in release_list:
milestone_num = _GetMilestone(release_template)
- # Enable config-updater builder for master branch
+ # Enable config-updater builder for main branch
# and release branches with milestone_num > 53
if milestone_num and milestone_num > 53:
milestone_path_pairs.append((milestone_num, release_template))
@@ -303,7 +303,7 @@ class UpdateConfigStage(generic_stages.BuilderStage):
TODO(crbug/1062657): remove the legacy fallback when ConfigUpdater
no longer runs on a milestone <= 83.
"""
- if self.branch == 'master':
+ if self.branch == 'main':
self._RunNewUnitTest()
else:
match = re.search(r'release-R(.+)-.*', self.branch)
diff --git a/cbuildbot/stages/config_stages_unittest.py b/cbuildbot/stages/config_stages_unittest.py
index cebfeb6cf..6ab9988a6 100644
--- a/cbuildbot/stages/config_stages_unittest.py
+++ b/cbuildbot/stages/config_stages_unittest.py
@@ -176,12 +176,12 @@ class UpdateConfigStageTest(generic_stages_unittest.AbstractStageTestCase):
self.assertEqual(
os.path.basename(config_change_patch), 'config_change.patch')
- def testMasterBasic(self):
- """Basic test on master branch."""
+ def testMainBasic(self):
+ """Basic test on main branch."""
template = 'build_config.ToT.json'
stage = self.ConstructStage(template)
stage.PerformStage()
- self.assertTrue(stage.branch == 'master')
+ self.assertTrue(stage.branch == 'main')
def testReleaseBasic(self):
"""Basic test on release branch."""