1
0
mirror of https://github.com/SAP/jenkins-library.git synced 2025-09-16 09:26:22 +02:00

deprecate 'useDetect8' (#5443)

Co-authored-by: Serhii-Kosharuk <serhii.kosharuk@sap.com>
This commit is contained in:
piotrskindel-sap
2025-08-06 13:51:06 +02:00
committed by GitHub
parent 0141f8480c
commit 48180028e9
3 changed files with 7 additions and 6 deletions

View File

@@ -443,19 +443,18 @@ func exitCodeMapping(exitCodeKey int) string {
func getDetectScript(config detectExecuteScanOptions, utils detectUtils) error {
if config.ScanOnChanges {
log.Entry().Infof("The scanOnChanges option is deprecated")
log.Entry().Info("The scanOnChanges option is deprecated")
}
log.Entry().Infof("Downloading Detect Script")
downloadScript := func() error {
if config.UseDetect8 {
return utils.DownloadFile("https://detect.blackduck.com/detect8.sh", "detect.sh", nil, nil)
log.Entry().Warn("The useDetect8 option is deprecated")
} else if config.UseDetect9 {
return utils.DownloadFile("https://detect.blackduck.com/detect9.sh", "detect.sh", nil, nil)
}
return utils.DownloadFile("https://detect.blackduck.com/detect10.sh", "detect.sh", nil, nil)
}
if err := downloadScript(); err != nil {

View File

@@ -355,7 +355,7 @@ func addDetectExecuteScanFlags(cmd *cobra.Command, stepConfig *detectExecuteScan
cmd.Flags().StringVar(&stepConfig.RegistryURL, "registryUrl", os.Getenv("PIPER_registryUrl"), "Used accessing for the images to be scanned (typically filled by CPE)")
cmd.Flags().StringVar(&stepConfig.RepositoryUsername, "repositoryUsername", os.Getenv("PIPER_repositoryUsername"), "Used accessing for the images to be scanned (typically filled by CPE)")
cmd.Flags().StringVar(&stepConfig.RepositoryPassword, "repositoryPassword", os.Getenv("PIPER_repositoryPassword"), "Used accessing for the images to be scanned (typically filled by CPE)")
cmd.Flags().BoolVar(&stepConfig.UseDetect8, "useDetect8", false, "This flag enables the use of the supported version 8 of the Detect script instead of default version 10")
cmd.Flags().BoolVar(&stepConfig.UseDetect8, "useDetect8", false, "DEPRECATED: This flag enables the use of the supported version 8 of the Detect script instead of default version 10")
cmd.Flags().BoolVar(&stepConfig.UseDetect9, "useDetect9", false, "This flag enables the use of the supported version 9 of the Detect script instead of default version 10")
cmd.Flags().BoolVar(&stepConfig.ContainerScan, "containerScan", false, "When set to true, Container Scanning will be used instead of Docker Inspector as the Detect tool for scanning images, and all other detect tools will be ignored in the scan")
@@ -946,7 +946,7 @@ func detectExecuteScanMetadata() config.StepData {
Scope: []string{"PARAMETERS", "STAGES", "STEPS"},
Type: "bool",
Mandatory: false,
Aliases: []config.Alias{{Name: "detect/useDetect8"}},
Aliases: []config.Alias{{Name: "detect/useDetect8", Deprecated: true}},
Default: false,
},
{

View File

@@ -644,15 +644,17 @@ spec:
param: container/repositoryPassword
- name: useDetect8
description:
"This flag enables the use of the supported version 8 of the Detect script instead of default version 10"
"DEPRECATED: This flag enables the use of the supported version 8 of the Detect script instead of default version 10"
aliases:
- name: detect/useDetect8
deprecated: true
type: bool
scope:
- PARAMETERS
- STAGES
- STEPS
default: false
deprecated: true
- name: useDetect9
description:
"This flag enables the use of the supported version 9 of the Detect script instead of default version 10"