| OLD | NEW |
| 1 # Copyright 2015 The LUCI Authors. All rights reserved. | 1 # Copyright 2015 The LUCI Authors. All rights reserved. |
| 2 # Use of this source code is governed by the Apache v2.0 license that can be | 2 # Use of this source code is governed under the Apache License, Version 2.0 |
| 3 # found in the LICENSE file. | 3 # that can be found in the LICENSE file. |
| 4 | 4 |
| 5 """Imports config files stored in Gitiles. | 5 """Imports config files stored in Gitiles. |
| 6 | 6 |
| 7 If services_config_location is set in admin.GlobalConfig root entity, | 7 If services_config_location is set in admin.GlobalConfig root entity, |
| 8 each directory in the location is imported as services/<directory_name>. | 8 each directory in the location is imported as services/<directory_name>. |
| 9 | 9 |
| 10 For each project defined in the project registry with | 10 For each project defined in the project registry with |
| 11 config_storage_type == Gitiles, projects/<project_id> config set is imported | 11 config_storage_type == Gitiles, projects/<project_id> config set is imported |
| 12 from project.config_location. | 12 from project.config_location. |
| 13 """ | 13 """ |
| (...skipping 417 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 431 _import_config_set(ref_cs, ref_location) | 431 _import_config_set(ref_cs, ref_location) |
| 432 | 432 |
| 433 | 433 |
| 434 def cron_run_import(): # pragma: no cover | 434 def cron_run_import(): # pragma: no cover |
| 435 conf = admin.GlobalConfig.fetch() | 435 conf = admin.GlobalConfig.fetch() |
| 436 if (conf and conf.services_config_storage_type == GITILES_STORAGE_TYPE and | 436 if (conf and conf.services_config_storage_type == GITILES_STORAGE_TYPE and |
| 437 conf.services_config_location): | 437 conf.services_config_location): |
| 438 loc = gitiles.Location.parse_resolve(conf.services_config_location) | 438 loc = gitiles.Location.parse_resolve(conf.services_config_location) |
| 439 import_services(loc) | 439 import_services(loc) |
| 440 import_projects() | 440 import_projects() |
| OLD | NEW |