Skip to content

Commit

Permalink
Update model registry CSI
Browse files Browse the repository at this point in the history
Signed-off-by: Andrea Lamparelli <[email protected]>
  • Loading branch information
lampajr committed Jul 22, 2024
1 parent 1b10696 commit ffe1e3f
Show file tree
Hide file tree
Showing 13 changed files with 584 additions and 261 deletions.
63 changes: 63 additions & 0 deletions .github/workflows/csi-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
name: Test custom storage initializer
on:
pull_request:
paths:
- "csi/**"
- "internal/server/openapi/api_model_registry_service*"
- "pkg/openapi/**"

env:
IMG_ORG: kubeflow
MODEL_REGISTRY_IMG: model-registry
MODEL_REGISTRY_CSI_IMG: model-registry-storage-initializer
PUSH_IMAGE: false
BRANCH: ${{ github.base_ref }}
jobs:
build-and-test-csi-image:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Generate tag
shell: bash
id: tags
run: |
commit_sha=${{ github.event.after }}
tag=main-${commit_sha:0:7}
echo "tag=${tag}" >> $GITHUB_OUTPUT
- name: Install network tools
run: sudo apt-get update && sudo apt-get install -y netcat

- name: Build local model registry image
shell: bash
env:
IMG_REPO: ${{ env.MODEL_REGISTRY_IMG }}
VERSION: ${{ steps.tags.outputs.tag }}
PUSH_IMAGE: false
run: ./scripts/build_deploy.sh

- name: Build local custom storage initializer
working-directory: ./csi
shell: bash
env:
IMG_REPO: ${{ env.MODEL_REGISTRY_CSI_IMG }}
IMG_VERSION: ${{ steps.tags.outputs.tag }}
# TODO: update go.mod to use local model registry library
run: make docker-build

- name: Start KinD cluster
uses: helm/[email protected]
with:
node_image: "kindest/node:v1.27.11"

- name: Install kustomize
run: ./csi/scripts/install_kustomize.sh

- name: Run tests
working-directory: ./csi
shell: bash
env:
MR_IMG: "${{ env.IMG_ORG }}/${{ env.MODEL_REGISTRY_IMG }}:${{ steps.tags.outputs.tag }}"
MR_CSI_IMG: "${{ env.IMG_ORG }}/${{ env.MODEL_REGISTRY_CSI_IMG }}:${{ steps.tags.outputs.tag }}"
CLUSTER: chart-testing
run: ./test/e2e_test.sh
3 changes: 3 additions & 0 deletions csi/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,6 @@ bin/

# Go workspace file
go.work

# KServe manifests
istio-*
2 changes: 1 addition & 1 deletion csi/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ USER root
COPY ["Makefile", "main.go", "./"]

# Copy rest of the source
COPY bin/ bin/
# COPY bin/ bin/
COPY pkg/ pkg/

# Build
Expand Down
Loading

0 comments on commit ffe1e3f

Please sign in to comment.