mirror of
https://github.com/f-droid/fdroidserver.git
synced 2025-09-14 23:12:46 +03:00
Write buildserver ID to buildserver on creation
The ID of the buildserver is just the corresponding commit hash in fdroidserver at the point where it was built, which should be enough to uniquely identify a version of it. The idea is that this will ultimately end up as metadata in an apk, such that its precise lineage can be traced, and the exact same binary can be reproduced.
This commit is contained in:
parent
a7c077634b
commit
aa98a8d64a
1 changed files with 10 additions and 0 deletions
|
@ -163,6 +163,16 @@ with open(os.path.join(serverdir, 'up.log'), 'w') as log:
|
||||||
if returncode != 0:
|
if returncode != 0:
|
||||||
print "Failed to configure server"
|
print "Failed to configure server"
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
|
|
||||||
|
print "Writing buildserver ID"
|
||||||
|
p = subprocess.Popen(['git', 'rev-parse', 'HEAD'], stdout=subprocess.PIPE)
|
||||||
|
buildserverid = p.communicate()[0].strip()
|
||||||
|
print "...ID is " + buildserverid
|
||||||
|
subprocess.call(
|
||||||
|
['vagrant', 'ssh', '-c', 'sh -c "echo {0} >/home/vagrant/buildserverid"'
|
||||||
|
.format(buildserverid)],
|
||||||
|
cwd=serverdir)
|
||||||
|
|
||||||
print "Stopping build server VM"
|
print "Stopping build server VM"
|
||||||
vagrant(['halt'], serverdir)
|
vagrant(['halt'], serverdir)
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue