Get livelog keys from tc-secrets instead of worker type definition

… in scripts for deploying new Macstadium or Packet.net workers.

CC: https://bugzilla.mozilla.org/show_bug.cgi?id=1375182#c6
This commit is contained in:
Simon Sapin 2019-02-15 15:33:22 +01:00
parent 710271f070
commit 28e3321e99

View file

@ -22,8 +22,8 @@ def check():
def livelog(): def livelog():
win2016 = api("awsProvisioner", "workerType", "servo-win2016") win2016 = secret("worker-type:aws-provisioner-v1/servo-win2016")
files = win2016["secrets"]["files"] files = win2016["files"]
assert all(f["encoding"] == "base64" for f in files) assert all(f["encoding"] == "base64" for f in files)
files = {f.get("description"): f["content"] for f in files} files = {f.get("description"): f["content"] for f in files}
cert = files["SSL certificate for livelog"] cert = files["SSL certificate for livelog"]
@ -33,7 +33,7 @@ def livelog():
"livelog_key_base64": key, "livelog_key_base64": key,
"livelog_cert": base64.b64decode(cert), "livelog_cert": base64.b64decode(cert),
"livelog_key": base64.b64decode(key), "livelog_key": base64.b64decode(key),
"livelog_secret": win2016["secrets"]["generic-worker"]["config"]["livelogSecret"], "livelog_secret": win2016["config"]["livelogSecret"],
} }