Compare commits

...

3 Commits

10
main.py
View File

@@ -12,16 +12,22 @@ REPO_UPDATER_SCRIPT = os.getcwd() + '/update_repo.sh'
def update_repositories(): def update_repositories():
for repo_path in config.git_repositories: for repo_path in config.git_repositories:
os.system(f"{REPO_UPDATER_SCRIPT} {repo_path}") ret = os.system(f"{REPO_UPDATER_SCRIPT} {repo_path}")
if ret > 0:
exit(ret)
def update_stack(stack): def update_stack(stack):
project_name = stack['Name'] project_name = stack['Name']
compose_file = DOCKER_COMPOSE_PATH.format(stack['Id']) compose_file = DOCKER_COMPOSE_PATH.format(stack['Id'])
os.system(f"{BASH_COMPANION_SCRIPT} {project_name} {compose_file}") ret = os.system(f"{BASH_COMPANION_SCRIPT} {project_name} {compose_file}")
if ret > 0:
exit(ret)
if __name__ == '__main__': if __name__ == '__main__':
update_repositories()
headers = { headers = {
"accept": "application/json", "accept": "application/json",
"X-API-Key": config.access_token "X-API-Key": config.access_token