Skip to content

Commit

Permalink
test: create volume replication crds for yaml validation
Browse files Browse the repository at this point in the history
The yaml validation of the examples folder requires all the CRDs
to be created in advance of the dry-run command.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
  • Loading branch information
travisn committed Oct 27, 2021
1 parent 1896359 commit 2c61ea2
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions tests/scripts/github-action-helper.sh
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,16 @@ function build_rook_all() {

function validate_yaml() {
cd cluster/examples/kubernetes/ceph

# create the Rook CRDs and other resources
kubectl create -f crds.yaml -f common.yaml

# create the volume replication CRDs
replication_version=v0.1.0
replication_url="https://raw.githubusercontent.com/csi-addons/volume-replication-operator/${replication_version}/config/crd/bases"
kubectl create -f "${replication_url}/replication.storage.openshift.io_volumereplications.yaml"
kubectl create -f "${replication_url}/replication.storage.openshift.io_volumereplicationclasses.yaml"

# skipping folders and some yamls that are only for openshift.
manifests="$(find . -maxdepth 1 -type f -name '*.yaml' -and -not -name '*openshift*' -and -not -name 'scc*')"
with_f_arg="$(echo "$manifests" | awk '{printf " -f %s",$1}')" # don't add newline
Expand Down

0 comments on commit 2c61ea2

Please sign in to comment.