-
Notifications
You must be signed in to change notification settings - Fork 44
73 lines (73 loc) · 2.27 KB
/
build-image-pr.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
name: Test container image build and deployment
on:
workflow_dispatch:
pull_request:
paths-ignore:
- "LICENSE*"
- "**.gitignore"
- "**.md"
- "**.txt"
- ".github/ISSUE_TEMPLATE/**"
- ".github/dependabot.yml"
- "docs/**"
- "clients/python/**"
env:
IMG_ORG: kubeflow
IMG_REPO: model-registry
PUSH_IMAGE: false
BRANCH: ${{ github.base_ref }}
jobs:
build-and-test-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: Build Image
shell: bash
env:
IMG_VERSION: ${{ steps.tags.outputs.tag }}
run: make image/build
- name: Start Kind Cluster
uses: helm/[email protected]
with:
node_image: "kindest/node:v1.27.11"
- name: Load Local Registry Test Image
env:
IMG: "${{ env.IMG_ORG }}/${{ env.IMG_REPO }}:${{ steps.tags.outputs.tag }}"
run: |
kind load docker-image -n chart-testing ${IMG}
- name: Deploy Model Registry using manifests
env:
IMG: "${{ env.IMG_ORG }}/${{ env.IMG_REPO }}:${{ steps.tags.outputs.tag }}"
run: ./scripts/deploy_on_kind.sh
- name: Deployment logs
run: |
kubectl logs -n kubeflow deployment/model-registry-deployment
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.10"
- name: Upgrade pip
run: |
pip install --constraint=.github/workflows/constraints.txt pip
pip --version
- name: Install Poetry
run: |
pipx install --pip-args=--constraint=${{ github.workspace }}/.github/workflows/constraints.txt poetry
poetry --version
- name: Build package
working-directory: clients/python
run: |
poetry build --ansi
pip install dist/*.whl
- name: Connect with Python client
run: |
kubectl port-forward -n kubeflow service/model-registry-service 8080:8080 &
sleep 5
python test/python/test_mr_conn.py http://localhost 8080