Skip to content

Commit

Permalink
changed-save-name (#4759)
Browse files Browse the repository at this point in the history
  • Loading branch information
dimaste authored Jan 8, 2024
1 parent f5f72bc commit 32657c4
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions cmd/whitesourceExecuteScan.go
Original file line number Diff line number Diff line change
Expand Up @@ -1090,14 +1090,16 @@ func createToolRecordWhitesource(utils whitesourceUtils, workspace string, confi

func downloadDockerImageAsTar(config *ScanOptions, utils whitesourceUtils) error {

imageNameToSave := strings.Replace(config.ScanImage, "/", "-", -1)

saveImageOptions := containerSaveImageOptions{
ContainerImage: config.ScanImage,
ContainerRegistryURL: config.ScanImageRegistryURL,
ContainerRegistryUser: config.ContainerRegistryUser,
ContainerRegistryPassword: config.ContainerRegistryPassword,
DockerConfigJSON: config.DockerConfigJSON,
FilePath: config.ScanPath + "/" + config.ScanImage, // previously was config.ProjectName
ImageFormat: "legacy", // keep the image format legacy or whitesource is not able to read layers
FilePath: config.ScanPath + "/" + imageNameToSave, // previously was config.ProjectName
ImageFormat: "legacy", // keep the image format legacy or whitesource is not able to read layers
}
dClientOptions := piperDocker.ClientOptions{ImageName: saveImageOptions.ContainerImage, RegistryURL: saveImageOptions.ContainerRegistryURL, LocalPath: "", ImageFormat: "legacy"}
dClient := &piperDocker.Client{}
Expand Down

0 comments on commit 32657c4

Please sign in to comment.