From 30aa6eea7d5574ced816c3d604ab71385f1d38f5 Mon Sep 17 00:00:00 2001 From: Siarhei Pazdniakou Date: Wed, 12 Jan 2022 15:06:14 +0300 Subject: [PATCH] fix(sonar): fix file patterns for gcs upload (#3406) Co-authored-by: Christopher Fenner <26137398+CCFenner@users.noreply.github.com> --- cmd/sonarExecuteScan_generated.go | 8 ++++---- resources/metadata/sonarExecuteScan.yaml | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/cmd/sonarExecuteScan_generated.go b/cmd/sonarExecuteScan_generated.go index c1f76e7f3..877dabfa5 100644 --- a/cmd/sonarExecuteScan_generated.go +++ b/cmd/sonarExecuteScan_generated.go @@ -60,8 +60,8 @@ func (p *sonarExecuteScanReports) persist(stepConfig sonarExecuteScanOptions) { return } content := []gcs.ReportOutputParam{ - {FilePattern: "sonarscan.json", ParamRef: "", StepResultType: "sonarqube"}, - {FilePattern: "sonarExecuteScan_*.json", ParamRef: "", StepResultType: "sonarqube"}, + {FilePattern: "**/sonarscan.json", ParamRef: "", StepResultType: "sonarqube"}, + {FilePattern: "**/sonarscan-result.json", ParamRef: "", StepResultType: "sonarqube"}, } envVars := []gcs.EnvVar{ {Name: "GOOGLE_APPLICATION_CREDENTIALS", Value: GeneralConfig.GCPJsonKeyFilePath, Modified: false}, @@ -566,8 +566,8 @@ func sonarExecuteScanMetadata() config.StepData { Name: "reports", Type: "reports", Parameters: []map[string]interface{}{ - {"filePattern": "sonarscan.json", "type": "sonarqube"}, - {"filePattern": "sonarExecuteScan_*.json", "type": "sonarqube"}, + {"filePattern": "**/sonarscan.json", "type": "sonarqube"}, + {"filePattern": "**/sonarscan-result.json", "type": "sonarqube"}, }, }, { diff --git a/resources/metadata/sonarExecuteScan.yaml b/resources/metadata/sonarExecuteScan.yaml index ec2615f97..9c956e662 100644 --- a/resources/metadata/sonarExecuteScan.yaml +++ b/resources/metadata/sonarExecuteScan.yaml @@ -272,9 +272,9 @@ spec: - name: reports type: reports params: - - filePattern: "sonarscan.json" + - filePattern: "**/sonarscan.json" type: sonarqube - - filePattern: "sonarExecuteScan_*.json" + - filePattern: "**/sonarscan-result.json" type: sonarqube - name: influx type: influx