works
This commit is contained in:
23
deploy.py
23
deploy.py
@@ -6,17 +6,20 @@ import os
|
||||
class DeployerRequest:
|
||||
repo: str
|
||||
branch: str
|
||||
clone_url: str
|
||||
commit_hash: str
|
||||
|
||||
|
||||
DEPLOYERDIR = "/home/drm/deployer/production"
|
||||
|
||||
def handle_request(rq: DeployerRequest):
|
||||
subprocess.run(
|
||||
["./deploy.sh"],
|
||||
env=dict(
|
||||
os.environ,
|
||||
REPO=rq.repo,
|
||||
BRANCH=rq.branch,
|
||||
COMMIT_HASH=rq.commit_hash,
|
||||
),
|
||||
)
|
||||
subprocess.Popen(
|
||||
["sudo", "-E", "./deploy.sh"],
|
||||
env=dict(
|
||||
os.environ,
|
||||
DEPLOYERDIR=DEPLOYERDIR,
|
||||
REPO=rq.repo,
|
||||
BRANCH=rq.branch,
|
||||
CLONE_URL=rq.clone_url,
|
||||
COMMIT_HASH=rq.commit_hash,
|
||||
),
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user