Compare commits

..
3 Commits
Author SHA1 Message Date
brb 2aabc9ab37 added more logging 2023-07-06 12:20:02 +02:00
brb 2f964dabcc added more logging 2023-07-06 12:19:49 +02:00
brb 47576392a9 updated logging level 2023-07-06 12:19:33 +02:00
3 changed files with 4 additions and 2 deletions
+1 -1
View File
@@ -42,8 +42,8 @@ def handle_event(request: GiteaRequest):
return {'status': 'received task'}
# clone repository
repo_url = request.repository['clone_url']
logging.info('cloning repository: {repo_url}')
local_repo_dir = clone_repository(repo_url)
print('local_repo_dir: ', local_repo_dir)
return {'status': 'success'}
if __name__ == '__main__':
+2
View File
@@ -1,6 +1,7 @@
from pydantic import AnyHttpUrl
from pathlib import Path
from git import Repo
import logging
import shutil
import os
@@ -16,4 +17,5 @@ def clone_repository(repo_url: AnyHttpUrl) -> Path:
dst_dir.mkdir()
# git clone repo
Repo.clone_from(url=repo_url, to_path=dst_dir)
logging.debug('finished')
return dst_dir
+1 -1
View File
@@ -7,7 +7,7 @@ services:
ports:
- "8000:8000"
environment:
- LOGGER_LEVEL=info
- LOGGER_LEVEL=debug
- LISTEN_IP=0.0.0.0
- LISTEN_PORT=8000
- REPO_DIR=/home/app/repo/