| OLD | NEW |
| 1 # Copyright 2013 The Chromium Authors. All rights reserved. | 1 # Copyright 2013 The Chromium Authors. All rights reserved. |
| 2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
| 3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
| 4 | 4 |
| 5 import os | 5 import os |
| 6 import types | 6 import types |
| 7 | 7 |
| 8 from recipe_engine.config import config_item_context, ConfigGroup | 8 from recipe_engine.config import config_item_context, ConfigGroup |
| 9 from recipe_engine.config import Dict, Single, Set | 9 from recipe_engine.config import Dict, Single, Set |
| 10 | 10 |
| 11 | 11 |
| 12 def BaseConfig(CBB_CONFIG=None, CBB_BRANCH=None, CBB_BUILD_NUMBER=None, | 12 def BaseConfig(CBB_CONFIG=None, CBB_BRANCH=None, CBB_BUILD_NUMBER=None, |
| 13 CBB_DEBUG=False, CBB_CLOBBER=False, CBB_BUILDBUCKET_ID=None, | 13 CBB_DEBUG=False, CBB_CLOBBER=False, CBB_BUILDBUCKET_ID=None, |
| 14 **_kwargs): | 14 CBB_MASTER_BUILD_ID=None, **_kwargs): |
| 15 return ConfigGroup( | 15 return ConfigGroup( |
| 16 # Base mapping of repository key to repository name. | 16 # Base mapping of repository key to repository name. |
| 17 repositories = Dict(value_type=Set(basestring)), | 17 repositories = Dict(value_type=Set(basestring)), |
| 18 | 18 |
| 19 # Checkout Chromite at this branch. "origin/" will be prepended. | 19 # Checkout Chromite at this branch. "origin/" will be prepended. |
| 20 chromite_branch = Single(basestring, empty_val=CBB_BRANCH or 'master'), | 20 chromite_branch = Single(basestring, empty_val=CBB_BRANCH or 'master'), |
| 21 | 21 |
| 22 # Should the Chrome version be supplied to cbuildbot? | 22 # Should the Chrome version be supplied to cbuildbot? |
| 23 use_chrome_version = Single(bool), | 23 use_chrome_version = Single(bool), |
| 24 | 24 |
| (...skipping 15 matching lines...) Expand all Loading... |
| 40 | 40 |
| 41 # cbuildbot tool flags. | 41 # cbuildbot tool flags. |
| 42 cbb = ConfigGroup( | 42 cbb = ConfigGroup( |
| 43 # The Chromite configuration to use. | 43 # The Chromite configuration to use. |
| 44 config = Single(basestring, empty_val=CBB_CONFIG), | 44 config = Single(basestring, empty_val=CBB_CONFIG), |
| 45 | 45 |
| 46 # The buildroot directory name to use. | 46 # The buildroot directory name to use. |
| 47 builddir = Single(basestring), | 47 builddir = Single(basestring), |
| 48 | 48 |
| 49 # If supplied, forward to cbuildbot as '--master-build-id'. | 49 # If supplied, forward to cbuildbot as '--master-build-id'. |
| 50 build_id = Single(basestring), | 50 build_id = Single(basestring, empty_val=CBB_MASTER_BUILD_ID), |
| 51 | 51 |
| 52 # If supplied, forward to cbuildbot as '--buildnumber'. | 52 # If supplied, forward to cbuildbot as '--buildnumber'. |
| 53 build_number = Single(int, empty_val=CBB_BUILD_NUMBER), | 53 build_number = Single(int, empty_val=CBB_BUILD_NUMBER), |
| 54 | 54 |
| 55 # If supplied, forward to cbuildbot as '--chrome-rev'. | 55 # If supplied, forward to cbuildbot as '--chrome-rev'. |
| 56 chrome_rev = Single(basestring), | 56 chrome_rev = Single(basestring), |
| 57 | 57 |
| 58 # If supplied, forward to cbuildbot as '--chrome_version'. | 58 # If supplied, forward to cbuildbot as '--chrome_version'. |
| 59 chrome_version = Single(basestring), | 59 chrome_version = Single(basestring), |
| 60 | 60 |
| (...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 169 def chromiumos_coverage(c): | 169 def chromiumos_coverage(c): |
| 170 c.use_chrome_version = True | 170 c.use_chrome_version = True |
| 171 c.read_cros_manifest = True | 171 c.read_cros_manifest = True |
| 172 c.cbb.chrome_rev = 'stable' | 172 c.cbb.chrome_rev = 'stable' |
| 173 c.cbb.config_repo = 'https://example.com/repo.git' | 173 c.cbb.config_repo = 'https://example.com/repo.git' |
| 174 | 174 |
| 175 # TODO(dnj): Remove this config once variant support is removed. | 175 # TODO(dnj): Remove this config once variant support is removed. |
| 176 @config_ctx() | 176 @config_ctx() |
| 177 def coverage_variant(c): | 177 def coverage_variant(c): |
| 178 c.cbb.chrome_rev = 'canary' | 178 c.cbb.chrome_rev = 'canary' |
| OLD | NEW |