Changeset View
Changeset View
Standalone View
Standalone View
contrib/teamcity/build-configurations.py
Show First 20 Lines • Show All 75 Lines • ▼ Show 20 Lines | def load(self, build_name): | ||||
if template_name not in templates: | if template_name not in templates: | ||||
raise AssertionError( | raise AssertionError( | ||||
"Build {} configuration inherits from template {}, but the template does not exist.".format( | "Build {} configuration inherits from template {}, but the template does not exist.".format( | ||||
self.name, | self.name, | ||||
template_name | template_name | ||||
) | ) | ||||
) | ) | ||||
# The template exists, apply the build configuration on top of the | # If the template exists, apply the build configuration on top of the | ||||
# template | # template. Otherwise it is equivalent to the build configuration | ||||
# alone. | |||||
self.config = always_merger.merge( | self.config = always_merger.merge( | ||||
templates.get(template_name, {}), build) | templates.get(template_name, {}), build) | ||||
# Make sure there is a script file associated with the build... | # Make sure there is a script file associated with the build... | ||||
script = build.get("script", None) | script = build.get("script", None) | ||||
if script is None: | if script is None: | ||||
raise AssertionError( | raise AssertionError( | ||||
"No script provided for the build {}".format( | "No script provided for the build {}".format( | ||||
self.name | self.name | ||||
) | ) | ||||
▲ Show 20 Lines • Show All 247 Lines • Show Last 20 Lines |