Skip to content

Commit

Permalink
Merge branch 'master' into events
Browse files Browse the repository at this point in the history
  • Loading branch information
CCFenner authored May 6, 2024
2 parents 60a39a5 + fb809a2 commit 3299bc9
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 6 deletions.
15 changes: 9 additions & 6 deletions cmd/detectExecuteScan.go
Original file line number Diff line number Diff line change
Expand Up @@ -389,13 +389,16 @@ func getDetectScript(config detectExecuteScanOptions, utils detectUtils) error {

log.Entry().Infof("Downloading Detect Script")

err := utils.DownloadFile("https://detect.synopsys.com/detect8.sh", "detect.sh", nil, nil)
if err != nil {
time.Sleep(time.Second * 5)
err = utils.DownloadFile("https://detect.synopsys.com/detect8.sh", "detect.sh", nil, nil)
if err != nil {
return err
downloadScript := func() error {
if config.UseDetect9 {
return utils.DownloadFile("https://detect.synopsys.com/detect9.sh", "detect.sh", nil, nil)
}
return utils.DownloadFile("https://detect.synopsys.com/detect8.sh", "detect.sh", nil, nil)
}

if err := downloadScript(); err != nil {
time.Sleep(5 * time.Second)
return downloadScript()
}

return nil
Expand Down
11 changes: 11 additions & 0 deletions cmd/detectExecuteScan_generated.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 11 additions & 0 deletions resources/metadata/detectExecuteScan.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -601,6 +601,17 @@ spec:
resourceRef:
- name: commonPipelineEnvironment
param: container/repositoryPassword
- name: useDetect9
description:
"This flag enables the use of the supported version 9 of the Detect Script instead of v8"
aliases:
- name: detect/useDetect9
type: bool
scope:
- PARAMETERS
- STAGES
- STEPS
default: false
outputs:
resources:
- name: influx
Expand Down

0 comments on commit 3299bc9

Please sign in to comment.