diff --git a/.github/workflows/fvt.yml b/.github/workflows/fvt-base.yml similarity index 89% rename from .github/workflows/fvt.yml rename to .github/workflows/fvt-base.yml index f7bb5535..472e9ed2 100644 --- a/.github/workflows/fvt.yml +++ b/.github/workflows/fvt-base.yml @@ -1,18 +1,13 @@ -name: FVT +name: FVT Base on: - workflow_dispatch: - pull_request: - branches: - - main - - 'release-[0-9].[0-9]+' - paths: - - '**' - - '!.github/**' - - '!.tekton/**' - - '!**.md' - - '!docs/**' - - '.github/workflows/fvt.yml' + workflow_call: + inputs: + namespace-scope-mode: + description: 'Whether to deploy ModelMesh Serving in namespace-scope mode' + type: boolean + required: false + default: false jobs: fvt: @@ -96,6 +91,7 @@ jobs: - name: Install ModelMesh Serving run: | + export NAMESPACE_SCOPE_MODE=${{ inputs.namespace-scope-mode }} kubectl create ns modelmesh-serving ./scripts/install.sh --namespace modelmesh-serving --fvt --dev-mode-logging @@ -123,13 +119,15 @@ jobs: run: | eval $(minikube -p minikube docker-env) docker images + kubectl get svc kubectl get pods - kubectl get clusterservingruntimes + kubectl get clusterservingruntimes 2> /dev/null || : + kubectl get servingruntimes 2> /dev/null || : - name: Run FVTs run: | go install github.com/onsi/ginkgo/v2/ginkgo export PATH=/root/go/bin/:$PATH export NAMESPACE=modelmesh-serving - export NAMESPACESCOPEMODE=false + export NAMESPACESCOPEMODE=${{ inputs.namespace-scope-mode }} make fvt diff --git a/.github/workflows/fvt-cs.yml b/.github/workflows/fvt-cs.yml new file mode 100644 index 00000000..f6151415 --- /dev/null +++ b/.github/workflows/fvt-cs.yml @@ -0,0 +1,22 @@ +name: FVT Cluster Scope + +on: + workflow_dispatch: + pull_request: + branches: + - main + - 'release-[0-9].[0-9]+' + paths: + - '**' + - '!.github/**' + - '!.tekton/**' + - '!**.md' + - '!docs/**' + - '.github/workflows/fvt*.yml' + +jobs: + fvt-cluster-scope: + uses: ./.github/workflows/fvt-base.yml + with: + namespace-scope-mode: false + secrets: inherit diff --git a/.github/workflows/fvt-ns.yml b/.github/workflows/fvt-ns.yml new file mode 100644 index 00000000..6ad2cc79 --- /dev/null +++ b/.github/workflows/fvt-ns.yml @@ -0,0 +1,22 @@ +name: FVT Namespace Scope + +on: + workflow_dispatch: + pull_request: + branches: + - main + - 'release-[0-9].[0-9]+' + paths: + - '**' + - '!.github/**' + - '!.tekton/**' + - '!**.md' + - '!docs/**' + - '.github/workflows/fvt*.yml' + +jobs: + fvt-namespace-scope: + uses: ./.github/workflows/fvt-base.yml + with: + namespace-scope-mode: true + secrets: inherit diff --git a/scripts/install.sh b/scripts/install.sh index ecd8a65c..aa09f9ba 100755 --- a/scripts/install.sh +++ b/scripts/install.sh @@ -25,7 +25,7 @@ dev_mode_logging=false quickstart=false fvt=false user_ns_array= -namespace_scope_mode=false # change to true to run in namespace scope +namespace_scope_mode=${NAMESPACE_SCOPE_MODE:-false} modelmesh_serving_image= enable_self_signed_ca=false