correct yaml error, better error handling

This commit is contained in:
andreas 2023-10-02 20:38:15 +02:00
parent faa946c8dc
commit d0c7651864
3 changed files with 6 additions and 6 deletions

View File

@ -72,7 +72,7 @@ workflows:
when: << pipeline.parameters.run_build >> when: << pipeline.parameters.run_build >>
jobs: jobs:
- pio-build - pio-build
# set the filter to allow a build for any sha tag # set the filter to allow a build for any sha tag
filters: filters:
tags: tags:
only: /.*/ only: /.*/

View File

@ -80,7 +80,7 @@ import fileDownload from "https://cdn.skypack.dev/js-file-download@0.4.12"
setValues(st); setValues(st);
setVisible('status_url',st.status_url !== undefined,true); setVisible('status_url',st.status_url !== undefined,true);
setVisible('error',st.error !== undefined,true); setVisible('error',st.error !== undefined,true);
if (st.status === 'error'){ if (st.status === 'error' || st.state === 'errored'){
setRunning(false); setRunning(false);
setVisible('download',false,true); setVisible('download',false,true);
return; return;

View File

@ -65,7 +65,7 @@ function getJobStatus($pipeline,$wf=workflowName,$job=jobName){
if (! isset($pstat['state'])){ if (! isset($pstat['state'])){
throw new Exception("state not set"); throw new Exception("state not set");
} }
if ($pstat['state'] != 'created'){ if ($pstat['state'] == 'created'){
return $pstat; return $pstat;
} }
$pipeline_id=$pstat['id']; $pipeline_id=$pstat['id'];