Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 34 additions & 0 deletions content/docs/architecture/step-registry.md
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,40 @@ ref:
Note that access to read these secrets from the namespace configured must be granted separately from the configuration being added to a step.
By default, only secrets in the `test-credentials` namespace will be available for mounting into test steps.

#### Injecting the `oc` CLI

Steps can make the `oc` CLI available to their commands by adding the `cli` configuration item to the test step, specifying which OpenShift
release the CLI should be sourced from. For example, the following configuration pulls in a CentOS image, a custom OCP release and runs a test
where the release's CLI is injected to the test step.

{{< highlight yaml >}}
base_images:
os: # import an image and call it "os"
name: centos
namespace: openshift
tag: '7'
releases:
custom: # import a release and call it "custom"
candidate:
product: okd
version: "4.3"
tests:
- as: with-cli
steps:
test:
- as: use-cli
commands: oc adm policy add-role-to-user --help
from: os # use the "os" image for running the test
cli: custom # allow the CLI from the "custom" release to be available
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wouldn't it make more sense to use an actual release like "4.6" to clarify that this has to be a release version?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That is not what this field should be, so no.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Then I don't understand it. Isn't the purpose of this to inject a oc cli from a specifig release?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The release is called "custom", as noted in the releases configuration above.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

resources:
requests:
cpu: 100m
memory: 200Mi
{{< /highlight >}}

If a test configuration uses `tag_specification` to import an OCP release, the `"initial"` and `"latest"` releases will be available for
sourcing the CLI.

## Chain

A chain is a registry component that specifies multiple registry components to be run. Components are run in the order that they are written.
Expand Down