diff --git a/deploy.py b/deploy.py index 4a47201..0a606b9 100644 --- a/deploy.py +++ b/deploy.py @@ -54,7 +54,7 @@ def handle_request(rq: DeployerRequest): f"{domain}-build-{deployment_id}", "sh", "-c", - f"/path/to/build.sh > {build_log} 2>&1", + f"./build.sh > {build_log} 2>&1", ], user="root", shell=True, diff --git a/deploy.sh b/deploy.sh index c777755..d3e6dad 100755 --- a/deploy.sh +++ b/deploy.sh @@ -40,6 +40,9 @@ status: log: \tjournalctl -u deployer-$DOMAIN +cleanlogs: +\trm -rf $LOGS_DIR + buildlog: \ttmux a -r -t $DOMAIN-build-$DEPLOYMENT_ID diff --git a/deploy_self.py b/deploy_self.py index a65d1ec..9d988e9 100644 --- a/deploy_self.py +++ b/deploy_self.py @@ -1,11 +1,11 @@ from deploy import DeployerRequest, handle_request +import sys -# foo handle_request( DeployerRequest( user="drm", repo="deployer", branch="main", - commit_hash="14e7d578bbb69ae08ba2533003f6ad284b325809", + commit_hash=sys.argv[1], ) )