From 43dd2059b725ba1a3a7381198bc5a92521132a67 Mon Sep 17 00:00:00 2001 From: andreas Date: Mon, 2 Oct 2023 20:45:55 +0200 Subject: [PATCH] run and find job with sha --- webinstall/cibuild.js | 3 ++- webinstall/cibuild.php | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/webinstall/cibuild.js b/webinstall/cibuild.js index 3ed336a..e593a33 100644 --- a/webinstall/cibuild.js +++ b/webinstall/cibuild.js @@ -77,10 +77,11 @@ import fileDownload from "https://cdn.skypack.dev/js-file-download@0.4.12" fetchJson(API,{api:'status',pipeline:currentPipeline}) .then((st)=>{ if (queryPipeline !== currentPipeline) return; + if (st.status === undefined) st.status=st.state; setValues(st); setVisible('status_url',st.status_url !== undefined,true); setVisible('error',st.error !== undefined,true); - if (st.status === 'error' || st.state === 'errored'){ + if (st.status === 'error' || st.status === 'errored'){ setRunning(false); setVisible('download',false,true); return; diff --git a/webinstall/cibuild.php b/webinstall/cibuild.php index 2e0280a..89c4f29 100644 --- a/webinstall/cibuild.php +++ b/webinstall/cibuild.php @@ -65,7 +65,7 @@ function getJobStatus($pipeline,$wf=workflowName,$job=jobName){ if (! isset($pstat['state'])){ throw new Exception("state not set"); } - if ($pstat['state'] == 'created'){ + if ($pstat['state'] != 'created'){ return $pstat; } $pipeline_id=$pstat['id'];