Do not automatically remove tmp/sources directory with epoch changes

This commit adds changes to not remove tmp/sources directory automatically when epoch changes but instead raise an exception. In case an env variable is set, system will then force the removal of these directories otherwise they would have to be done manually.
This commit is contained in:
Waqar Ahmed
2021-08-19 12:25:16 +05:00
parent 77be5cae66
commit ad7269c721
2 changed files with 13 additions and 4 deletions

View File

@@ -9,6 +9,7 @@ BUILD_TIME_OBJ = datetime.fromtimestamp(BUILD_TIME)
BUILDER_DIR = os.getenv('BUILDER_DIR', './')
BRANCH_OUT_NAME = os.getenv('NEW_BRANCH_NAME')
BRANCH_OVERRIDES = {k[:-(len('_OVERRIDE'))]: v for k, v in os.environ.items() if k.endswith('_OVERRIDE')}
FORCE_CLEANUP_WITH_EPOCH_CHANGE = os.getenv('FORCE_CLEANUP_WITH_EPOCH_CHANGE', False)
GITHUB_TOKEN = os.getenv('GITHUB_TOKEN')
PARALLEL_BUILD = int(os.getenv('PARALLEL_BUILDS', max(os.cpu_count(), 8) / 4))
PKG_DEBUG = os.getenv('PKG_DEBUG', False)