File tree Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Original file line number Diff line number Diff line change @@ -186,21 +186,20 @@ for sbom_path in "${sboms_to_upload[@]}"; do
186
186
token_type=" $( jq -r .token_type <<< " $token_response" ) "
187
187
expires_in=" $( jq -r " .expires_in // empty" <<< " $token_response" ) "
188
188
189
- retry_max_time=0 # no limit
189
+ retry_max_time=600 # 10 minutes as the default value
190
190
if [[ -n " $expires_in " ]]; then
191
- retry_max_time=" $expires_in "
191
+ retry_max_time=" $expires_in " # Adjust timeout to match token expiration
192
192
fi
193
193
194
194
# This sbom_id is the one created in the gather-sboms step - sha256:${checksum}
195
195
sbom_id=" $( basename -s .json " $sbom_path " ) "
196
196
supported_version_of_sbom=" ${sbom_path} .supported_version"
197
197
198
- echo " Uploading SBOM to $bombastic_api_url (with id=$sbom_id )"
198
+ echo " Uploading SBOM to $bombastic_api_url (with id=$sbom_id ) [retry_max_time= $retry_max_time ] "
199
199
# https://docs.trustification.dev/trustification/user/bombastic.html#publishing-an-sbom-doc
200
200
curl " ${curl_opts[@]} " \
201
201
--retry-max-time " $retry_max_time " \
202
202
-H " authorization: $token_type $access_token " \
203
- -H " transfer-encoding: chunked" \
204
203
-H " content-type: application/json" \
205
204
--data " @$supported_version_of_sbom " \
206
205
" $bombastic_api_url /api/v2/sbom?id=$sbom_id "
You can’t perform that action at this time.
0 commit comments