You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Dec 11, 2021. It is now read-only.
internal/pkg/scorecard: access CRManifestOpt correctly with --olm-deployed (operator-framework#1565)
* internal/pkg/scorecard/scorecard.go: use viper.GetStringSlice() for getting and use []string when setting CRManifestOpt
* CHANGELOG.md: update with scorecard cr-manifests bug fix
Copy file name to clipboardexpand all lines: CHANGELOG.md
+1
Original file line number
Diff line number
Diff line change
@@ -11,6 +11,7 @@
11
11
### Bug Fixes
12
12
13
13
- Fixes header file content validation when the content contains empty lines or centered text. ([#1544](https://github.com/operator-framework/operator-sdk/pull/1544))
14
+
- Running the [scorecard](https://github.com/operator-framework/operator-sdk/blob/master/doc/sdk-cli-reference.md#up) with `--olm-deployed` will now only use the first CR set in either the `cr-manifest` config option or the CSV's `metadata.annotations['alm-examples']` as was intended, and access manifests correctly from the config. ([#1565](https://github.com/operator-framework/operator-sdk/pull/1565))
log.Errorf("Could not delete temporary CR manifest file: (%v)", err)
204
+
}
205
+
}
206
+
}()
207
+
} else {
208
+
returnnil, errors.New("cr-manifest config option must be set if CSV has no metadata.annotations['alm-examples']")
209
+
}
210
+
} else {
211
+
// TODO: run scorecard against all CR's in CSV.
212
+
viper.Set(CRManifestOpt, []string{crMans[0]})
213
+
logCRMsg=len(crMans) >1
214
+
}
215
+
// Let users know that only the first CR is being tested.
216
+
iflogCRMsg {
217
+
log.Infof("The scorecard does not support testing multiple CR's at once when run with --olm-deployed. Testing the first CR %s", viper.GetStringSlice(CRManifestOpt)[0])
0 commit comments