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 @@ -179,21 +179,20 @@ for sbom_path in "${sboms_to_upload[@]}"; do
179
179
token_type=" $( jq -r .token_type <<< " $token_response" ) "
180
180
expires_in=" $( jq -r " .expires_in // empty" <<< " $token_response" ) "
181
181
182
- retry_max_time=0 # no limit
182
+ retry_max_time=600 # 10 minutes as the default value
183
183
if [[ -n " $expires_in " ]]; then
184
- retry_max_time=" $expires_in "
184
+ retry_max_time=" $expires_in " # Adjust timeout to match token expiration
185
185
fi
186
186
187
187
# This sbom_id is the one created in the gather-sboms step - sha256:${checksum}
188
188
sbom_id=" $( basename -s .json " $sbom_path " ) "
189
189
supported_version_of_sbom=" ${sbom_path} .supported_version"
190
190
191
- echo " Uploading SBOM to $bombastic_api_url (with id=$sbom_id )"
191
+ echo " Uploading SBOM to $bombastic_api_url (with id=$sbom_id ) [retry_max_time= $retry_max_time ] "
192
192
# https://docs.trustification.dev/trustification/user/bombastic.html#publishing-an-sbom-doc
193
193
curl " ${curl_opts[@]} " \
194
194
--retry-max-time " $retry_max_time " \
195
195
-H " authorization: $token_type $access_token " \
196
- -H " transfer-encoding: chunked" \
197
196
-H " content-type: application/json" \
198
197
--data " @$supported_version_of_sbom " \
199
198
" $bombastic_api_url /api/v2/sbom?id=$sbom_id "
You can’t perform that action at this time.
0 commit comments