Wrap test runner image getter

This commit is contained in:
plondon 2021-10-17 16:42:47 -04:00
parent aeb55dc490
commit 0340f36564
1 changed files with 11 additions and 5 deletions

View File

@ -570,12 +570,18 @@ async function writeLog(lang, type, result, log) {
} }
async function getImageHash(tag) { async function getImageHash(tag) {
const output = ( const output = await run(
await run(["docker", "inspect", `riju:${tag}`], console.error, { ["docker", "inspect", `riju:${tag}`],
console.error,
{
suppressOutput: true, suppressOutput: true,
}).output }
); ).output;
try {
return JSON.parse(output)[0].Config.Labels["riju.image-hash"]; return JSON.parse(output)[0].Config.Labels["riju.image-hash"];
} catch (e) {
console.log(e);
}
} }
async function main() { async function main() {