Changeset View
Changeset View
Standalone View
Standalone View
contrib/teamcity/build-configurations.py
Show First 20 Lines • Show All 212 Lines • ▼ Show 20 Lines | def __init__(self, configuration): | ||||
if self.logs["clean_log"].is_file(): | if self.logs["clean_log"].is_file(): | ||||
self.logs["clean_log"].unlink() | self.logs["clean_log"].unlink() | ||||
self.logs["full_log"] = build_directory.joinpath("build.full.log") | self.logs["full_log"] = build_directory.joinpath("build.full.log") | ||||
if self.logs["full_log"].is_file(): | if self.logs["full_log"].is_file(): | ||||
self.logs["full_log"].unlink() | self.logs["full_log"].unlink() | ||||
def copy_artifacts(self, artifacts): | def copy_artifacts(self, artifacts): | ||||
# Make sure the artifact directory always exists. It is created before | |||||
# the build is run (to let the build install things to it) but since we | |||||
# have no control on what is being executed, it might very well be | |||||
# deleted by the build as well. This can happen when the artifacts | |||||
# are located in the build directory and the build calls git clean. | |||||
self.artifact_dir.mkdir(exist_ok=True) | |||||
# Find and copy artifacts. | # Find and copy artifacts. | ||||
# The source is relative to the build tree, the destination relative to | # The source is relative to the build tree, the destination relative to | ||||
# the artifact directory. | # the artifact directory. | ||||
# The artifact directory is located in the build directory tree, results | # The artifact directory is located in the build directory tree, results | ||||
# from it needs to be excluded from the glob matches to prevent infinite | # from it needs to be excluded from the glob matches to prevent infinite | ||||
# recursion. | # recursion. | ||||
for pattern, dest in artifacts.items(): | for pattern, dest in artifacts.items(): | ||||
matches = [m for m in sorted(self.configuration.build_directory.glob( | matches = [m for m in sorted(self.configuration.build_directory.glob( | ||||
▲ Show 20 Lines • Show All 239 Lines • Show Last 20 Lines |