Arch Linux AUR build bot using nspawn container
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

21 lines
586 B

#!/usr/bin/env python
import json
import os
import sys
import time
import tornado.ioloop
import tornado.web
class WebHookHandler(tornado.web.RequestHandler):
def post(self):
data = json.loads(self.request.body.decode())
if data["type"] == "session_register":
print(data["params"]["stoken_ro"])
target = sys.argv[1:]
os.spawnlp(os.P_NOWAIT, target[0], target)
if __name__ == "__main__":
tornado.web.Application([("/aur_buildbot", WebHookHandler)]).listen(8080)
tornado.ioloop.IOLoop.instance().start()
time.sleep(5)