git credentials

This commit is contained in:
2025-01-08 23:54:57 -05:00
parent c46b465a19
commit 7f4e807feb
3 changed files with 7 additions and 5 deletions

4
.gitignore vendored
View File

@@ -2,4 +2,6 @@
venv/*
production/*
test*
logs/*
logs/*
credentials.sh
deploy_key*

View File

@@ -5,9 +5,9 @@ from time import time
@dataclass
class DeployerRequest:
user: str
repo: str
branch: str
clone_url: str
commit_hash: str
DEPLOYERDIR = "/home/drm/live"
@@ -26,9 +26,9 @@ def handle_request(rq: DeployerRequest):
env=dict(
os.environ,
DEPLOYERDIR=DEPLOYERDIR,
USER=rq.user,
REPO=rq.repo,
BRANCH=rq.branch,
CLONE_URL=rq.clone_url,
BRANCH=rq.branch
COMMIT_HASH=rq.commit_hash,
),
)

View File

@@ -4,7 +4,7 @@ deploydir=$DEPLOYERDIR/$REPO/$BRANCH
mkdir -p $deploydir/src
cd $deploydir
git clone $CLONE_URL ./src
git clone -b $BRANCH "git@localhost:3000/$USER/$REPO.git" ./src
cd src
git fetch origin $BRANCH