diff --git a/modules/osdk-scorecard-store-output.adoc b/modules/osdk-scorecard-store-output.adoc new file mode 100644 index 000000000000..a2b7a09bcb58 --- /dev/null +++ b/modules/osdk-scorecard-store-output.adoc @@ -0,0 +1,52 @@ +// Module included in the following assemblies: +// +// * operators/operator_sdk/osdk-scorecard.adoc + +:osdk_ver: v1.16.0 + +:_content-type: PROCEDURE +[id="osdk-scorecard-store-output_{context}"] += Storing scorecard test results + +You can enable local storage of scorecard test results by using the `scorecard` command or by modifying your `config.yaml` file. + +[IMPORTANT] +==== +There is a known issue with the Operator SDK scorecard storage utility. Currently, running the `operator-sdk scorecard` command with the `--test-output` flag returns an empty directory. There is no known workaround at this time. (link:https://bugzilla.redhat.com/show_bug.cgi?id=2017669[*BZ#2017669*]) +==== + +.Procedure + +. If you want to run a scorecard test from the command line and store the results, run the following command in a terminal window: ++ +[source,terminal] +---- +$ operator-sdk scorecard --test-output=/ <.> +---- +<.> Define the output directory. ++ +If you do not specify a directory, the command stores the test results in the `test-output` directory of your working directory. + +. If you want to enable local storage in your configuration file, add the following to your `config.yaml` file: ++ +[source,terminal] +---- +tests: + - entrypoint: + - scorecard-test + - <.> + image: quay.io/operator-framework/scorecard-test:v1.10.0 + labels: + suite: <.> + test: <.> + storage: + spec: + mountPath: + path: / <.> +---- +<.> Replace `` with the command and arguments that you want to run, such as `scorecared-test`. +<.> Define the test suite that you want to run, such as `olm`. +<.> Define the test name that you want to run, such as `olm-bundle-validation-test`. +<.> Set the the location of directory to store your test results, such as `test-results`. + +:!osdk_ver: diff --git a/operators/operator_sdk/osdk-scorecard.adoc b/operators/operator_sdk/osdk-scorecard.adoc index 86a084eaae71..82ca1aea2c11 100644 --- a/operators/operator_sdk/osdk-scorecard.adoc +++ b/operators/operator_sdk/osdk-scorecard.adoc @@ -16,6 +16,7 @@ include::modules/osdk-scorecard-config.adoc[leveloffset=+1] include::modules/osdk-scorecard-tests.adoc[leveloffset=+1] include::modules/osdk-scorecard-run.adoc[leveloffset=+1] include::modules/osdk-scorecard-output.adoc[leveloffset=+1] +include::modules/osdk-scorecard-store-output.adoc[leveloffset=+2] include::modules/osdk-scorecard-select-tests.adoc[leveloffset=+1] include::modules/osdk-scorecard-parallel.adoc[leveloffset=+1] include::modules/osdk-scorecard-custom-tests.adoc[leveloffset=+1]