Skip to content
This repository has been archived by the owner on Jan 31, 2024. It is now read-only.

Commit

Permalink
Add KfDef to install OpenShift Pipelines for tests
Browse files Browse the repository at this point in the history
  • Loading branch information
VaishnaviHire committed Apr 19, 2023
1 parent 4596f8b commit 2302eff
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 9 deletions.
1 change: 1 addition & 0 deletions tests/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ COPY setup/operatorsetup scripts/install.sh scripts/installandtest.sh $HOME/peak
COPY resources $HOME/peak/operator-tests/odh-manifests/resources
COPY util $HOME/peak/operator-tests/odh-manifests
COPY setup/odh-core.yaml $HOME/kfdef/
COPY setup/openshift-pipelines.yaml $HOME/kfdef/
COPY basictests $HOME/peak/operator-tests/odh-manifests/basictests

RUN chmod -R 777 $HOME/kfdef && \
Expand Down
8 changes: 7 additions & 1 deletion tests/scripts/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

echo "Installing kfDef from test directory"
KFDEF_FILENAME=odh-core.yaml
KFDEF_OS_PIPELINE=openshift-pipelines.yaml

set -x
## Install the opendatahub-operator
Expand Down Expand Up @@ -47,6 +48,7 @@ else
if [ $REPO_NAME == "odh-manifests" ]; then
echo "Setting manifests in kfctl_openshift to use pull number: $PULL_NUMBER"
sed -i "s#uri: https://github.com/opendatahub-io/odh-manifests/tarball/master#uri: https://api.github.com/repos/opendatahub-io/odh-manifests/tarball/pull/${PULL_NUMBER}/head#" ./${KFDEF_FILENAME}
sed -i "s#uri: https://github.com/opendatahub-io/odh-manifests/tarball/master#uri: https://api.github.com/repos/opendatahub-io/odh-manifests/tarball/pull/${PULL_NUMBER}/head#" ./${KFDEF_OS_PIPELINE}
fi
fi

Expand Down Expand Up @@ -86,7 +88,11 @@ else
oc apply -k $HOME/peak/operator-tests/odh-manifests/resources/odh-dashboard/crd
fi

echo "Creating the following KfDef"
echo "Creating the openshift-pipelines KfDef"
cat ./${KFDEF_OS_PIPELINE} > ${ARTIFACT_DIR}/${KFDEF_OS_PIPELINE}
oc apply -f ./${KFDEF_OS_PIPELINE}

echo "Creating the odh-core KfDef"
cat ./${KFDEF_FILENAME} > ${ARTIFACT_DIR}/${KFDEF_FILENAME}
oc apply -f ./${KFDEF_FILENAME}
kfctl_result=$?
Expand Down
9 changes: 1 addition & 8 deletions tests/setup/odh-core.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# Deploy openshift-pipelines KfDef before odh-core.
# This file should always match the KfDef used to deploy ODH Core components
apiVersion: kfdef.apps.kubeflow.org/v1
kind: KfDef
Expand All @@ -10,14 +11,6 @@ spec:
name: manifests
path: odh-common
name: odh-common
- kustomizeConfig:
parameters:
- name: namespace
value: openshift-operators
repoRef:
name: manifests
path: openshift-pipelines/cluster
name: openshift-pipelines
- kustomizeConfig:
repoRef:
name: manifests
Expand Down
21 changes: 21 additions & 0 deletions tests/setup/openshift-pipelines.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Openshift pipelines needs a dedicated KfDef, since it installed in a separate namespce
# The operator cannot be installed in the opendatahub namespace
apiVersion: kfdef.apps.kubeflow.org/v1
kind: KfDef
metadata:
name: openshift-pipelines
namespace: openshift-operators
spec:
applications:
- kustomizeConfig:
parameters:
- name: namespace
value: openshift-operators
repoRef:
name: manifests
path: openshift-pipelines/cluster
name: openshift-pipelines
repos:
- name: manifests
uri: https://github.com/opendatahub-io/odh-manifests/tarball/master
version: master

0 comments on commit 2302eff

Please sign in to comment.