actually unzip assets

pull/6179/head
Niklas Fiekas 2020-03-18 21:56:36 +01:00
parent 1e0b00c81a
commit 8c4992c39c
1 changed files with 7 additions and 4 deletions

11
bin/ci-deploy.py 100644 → 100755
View File

@ -51,7 +51,6 @@ def workflow_runs(session, repo):
logging.info("Created workflow run database.")
data = {}
try:
new = 0
synced = False
@ -145,9 +144,13 @@ def main():
logging.info(f"Downloading {url} on khiaw ...")
header = f"Authorization: {session.headers['Authorization']}"
subprocess.call(["ssh", "-t", "root@khiaw.lichess.ovh", "tmux", "new-session", "-s", "lila-deploy", f"wget --header={shlex.quote(header)} {shlex.quote(url)}"], stdout=sys.stdout, stdin=sys.stdin)
return 0
artifact_target = f"/home/lichess-artifacts/lila-assets-{run['id']:d}.zip"
command = ";".join([
f"mkdir -p /home/lichess-artifacts; wget --header={shlex.quote(header)} -O {shlex.quote(artifact_target)} --no-clobber {shlex.quote(url)}",
f"unzip -o {shlex.quote(artifact_target)} -d /home/lichess-stage",
"/bin/bash",
])
return subprocess.call(["ssh", "-t", "root@khiaw.lichess.ovh", "tmux", "new-session", "-s", "lila-deploy", f"/bin/sh -c {shlex.quote(command)}"], stdout=sys.stdout, stdin=sys.stdin)
if __name__ == "__main__":