Skip to content

Commit

Permalink
test: Add FVT in namespace-scope mode (#448)
Browse files Browse the repository at this point in the history
- Transform the current FVT workflow into a reusable workflow: fvt-base.yml
- Create 2 separate new workflows fvt-ns.yaml and fvt-cs.yaml that call the
  FVT Base workflow with namespace-scope-mode input parameter

Resolves #436

---------

Signed-off-by: Christian Kadner <[email protected]>
  • Loading branch information
ckadner authored Oct 12, 2023
1 parent 0ed75cb commit b5affff
Show file tree
Hide file tree
Showing 4 changed files with 58 additions and 16 deletions.
28 changes: 13 additions & 15 deletions .github/workflows/fvt.yml → .github/workflows/fvt-base.yml
Original file line number Diff line number Diff line change
@@ -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:
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
22 changes: 22 additions & 0 deletions .github/workflows/fvt-cs.yml
Original file line number Diff line number Diff line change
@@ -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
22 changes: 22 additions & 0 deletions .github/workflows/fvt-ns.yml
Original file line number Diff line number Diff line change
@@ -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
2 changes: 1 addition & 1 deletion scripts/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit b5affff

Please sign in to comment.