-
Notifications
You must be signed in to change notification settings - Fork 21
64 lines (61 loc) · 1.85 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
name: Test controller image build and deployment
on:
pull_request:
paths-ignore:
- 'LICENSE*'
- '**.gitignore'
- '**.md'
- '**.txt'
- '.github/ISSUE_TEMPLATE/**'
- '.github/dependabot.yml'
- 'docs/**'
env:
QUAY_IMG_REPO: model-registry-operator
PUSH_IMAGE: false
jobs:
build-and-test-image:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version: '1.21.13'
- 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 }}
IMG: "model-registry-operator:${{ steps.tags.outputs.tag }}"
run: |
make docker-build
- name: Start Kind Cluster
uses: helm/[email protected]
- name: Load Local Test Image
env:
IMG_VERSION: ${{ steps.tags.outputs.tag }}
IMG: "model-registry-operator:${{ steps.tags.outputs.tag }}"
run: |
kind load docker-image -n chart-testing ${IMG}
- name: Deploy Operator Image
env:
IMG_VERSION: ${{ steps.tags.outputs.tag }}
IMG: "model-registry-operator:${{ steps.tags.outputs.tag }}"
run: |
make deploy
- name: Create Test Registry
run: |
kubectl apply -k config/samples/postgres/
kubectl describe mr
- name: Wait for Test Registry Deployment
run: |
##debug
#kubectl describe pods
#kubectl logs -l name=model-registry-db || true
kubectl wait --for=condition=Available=true modelregistries/modelregistry-sample --timeout=5m