Quick n' dirty working PoC

This commit is contained in:
Darks 2021-06-09 21:17:04 +02:00
parent a94b0378ff
commit e19d5aebb4
Signed by: Darks
GPG Key ID: 7515644268BE1433
2 changed files with 8 additions and 4 deletions

View File

@ -1,7 +1,7 @@
#!/usr/bin/env python3
import argparse
import logging, sys
import logging, sys, os
import requests as r
from datetime import date
from utils import *
@ -53,10 +53,14 @@ def main(arch):
docker_build()
os.popen(f"rsync output/*.pkg.* khazad-dum:/var/lib/nginx/http/arch.middleearth.fr/{arch}/")
os.popen(f"ssh khazad-dum 'cd /var/lib/nginx/http/arch.middleearth.fr/{arch} && repose -z casio'")
# TODO:
# - create a systemd timer to run this script
# - setup a web server to publish logs in case of failure
# - go to bed >_>
# - clean the 2 lines above
if __name__ == "__main__":
parser = argparse.ArgumentParser(description='Build some packages.')

View File

@ -11,5 +11,5 @@ def docker_build():
if not quiet:
logging.info(r)
run(f"docker build . -t middlearch/ci")
run(f"docker run -i --mount type=bind,src=/home/eldeberen/Programmation/Casio/MiddleArch/output,dst=/mnt/output middlearch/ci", quiet=False)
run(f"sudo docker build . -t middlearch/ci")
run(f"sudo docker run -i --mount type=bind,src=/home/eldeberen/Programmation/Casio/MiddleArch/output,dst=/mnt/output middlearch/ci", quiet=False)