Skip to content

Commit 74c2fb3

Browse files
BST-12445: add main branch scan timeout (#11)
* add main branch scan timeout
1 parent 6899052 commit 74c2fb3

File tree

3 files changed

+20
-2
lines changed

3 files changed

+20
-2
lines changed

README.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,15 @@ Optional path within the git repository to execute scanners in.
9797

9898
When this parameter is specified, you must also provide a `scan_label` to identify the component.
9999

100-
### `scan_timeout` (Optional, number)
100+
### `scan_timeout` (Optional, number) deprecated
101101

102102
The optional timeout after which the Github check will be marked as failed. This defaults to 120 seconds.
103103

104+
### `scan_diff_timeout` (Optional, number)
105+
106+
The optional timeout on a diff scan after which the Github check will be marked as failed. This defaults to 120 seconds.
107+
108+
### `scan_main_timeout` (Optional, number)
109+
110+
The optional timeout on a main scan after which the Github check will be marked as failed. This defaults to 2 hours.
111+

action.yaml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,14 @@ inputs:
4343
description: "Optional relative path to scan"
4444
default: ""
4545
scan_timeout:
46+
description: "Maximum amount of time a diff scan should complete in (deprecated)"
47+
default: ""
48+
scan_diff_timeout:
4649
description: "Maximum amount of time a diff scan should complete in"
4750
default: ""
51+
scan_main_timeout:
52+
description: "Maximum amount of time a main scan should complete in"
53+
default: ""
4854
runs:
4955
using: "composite"
5056
steps:
@@ -59,7 +65,9 @@ runs:
5965
BOOST_GIT_MAIN_BRANCH: ${{ inputs.main_branch }}
6066
BOOST_IGNORE_FAILURE: ${{ inputs.ignore_failure }}
6167
BOOST_LOG_LEVEL: ${{ inputs.log_level }}
62-
BOOST_DIFF_SCAN_TIMEOUT: ${{ inputs.scan_timeout }}
68+
BOOST_SCAN_TIMEOUT: ${{ inputs.scan_timeout }}
69+
BOOST_DIFF_SCAN_TIMEOUT: ${{ inputs.scan_diff_timeout }}
70+
BOOST_MAIN_SCAN_TIMEOUT: ${{ inputs.scan_main_timeout }}
6371
BOOST_PRE_SCAN: ${{ inputs.pre_scan_cmd }}
6472
BOOST_SCAN_LABEL: ${{ inputs.scan_label }}
6573
BOOST_SCAN_PATH: ${{ inputs.scan_path }}

lib/scan.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@ init.config ()
2020
{
2121
log.info "initializing configuration"
2222

23+
export BOOST_DIFF_SCAN_TIMEOUT=${BOOST_DIFF_SCAN_TIMEOUT:-${BOOST_SCAN_TIMEOUT:-}}
24+
2325
export BOOST_TMP_DIR=${BOOST_TMP_DIR:-${WORKSPACE_TMP:-${TMPDIR:-/tmp}}}
2426
export BOOST_EXE=${BOOST_EXE:-${BOOST_TMP_DIR}/boost-cli/latest}
2527

0 commit comments

Comments
 (0)