Added the HTTPS POST for a successful build to the unattended test build.

This commit is contained in:
Anton Hvornum 2020-08-20 19:56:58 +00:00
parent f6f5875892
commit d449bb4b1f
2 changed files with 12 additions and 3 deletions

View File

@ -112,7 +112,7 @@ class Profile():
# TODO: Remove
__builtins__['installation'] = self.installer
with instructions as runtime:
log(f'Profile {self._path} finished successfully.', bg='black', fg='green')
log(f'{self} finished successfully.', bg='black', fg='green')
return True

View File

@ -1,4 +1,6 @@
import archinstall, getpass
import archinstall
import json
import urllib.request
# Unmount and close previous runs
archinstall.sys_command(f'umount -R /mnt', surpress_errors=True)
@ -29,4 +31,11 @@ with archinstall.Filesystem(harddrive, archinstall.GPT) as fs:
installation.user_create('anton', 'test')
installation.user_set_pw('root', 'toor')
installation.add_AUR_support()
installation.add_AUR_support()
conditions = {"profile" : "52-54-00-12-34-56", "status" : "successful"}
req = urllib.request.Request("https://archlinux.life/build/successful",
data=json.dumps(conditions).encode('utf8'),
headers={'content-type': 'application/json'})
urllib.request.urlopen(req)