-
Notifications
You must be signed in to change notification settings - Fork 20
64 lines (51 loc) · 2.28 KB
/
smoke.yaml
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: Smoke test
on:
pull_request:
branches:
- main
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Build and push operator container image
uses: docker/build-push-action@v2
with:
context: .
file: ./Dockerfile
load: true
tags: smoke/operator:pr-${{ github.event.pull_request.number || env.PR_NUMBER }}
- name: Create k8s Kind Cluster
uses: helm/kind-action@v1
with:
node_image: kindest/node:v1.24.17
cluster_name: kind
- name: Load the operator image into Kind
run: |
kind load docker-image smoke/operator:pr-${{ github.event.pull_request.number || env.PR_NUMBER }}
- name: Install kustomize
run: |
curl -s "https://raw.githubusercontent.com/kubernetes-sigs/kustomize/master/hack/install_kustomize.sh" | bash
sudo mv kustomize /usr/local/bin/
- name: Apply CRDs
run: |
kubectl apply -f tests/crds/monitoring.coreos.com_servicemonitors.yaml
kubectl apply -f tests/crds/route_crd.yaml
kubectl apply -f tests/crds/serving.kserve.io_inferenceservices.yaml
kubectl apply -f tests/crds/serving.kserve.io_servingruntimes.yaml
kustomize build config/crd | kubectl apply -f -
- name: Update params.env file
run: |
sed -i 's|trustyaiOperatorImage=quay.io/trustyai/trustyai-service-operator:latest|trustyaiOperatorImage=smoke/operator:pr-${{ github.event.pull_request.number || env.PR_NUMBER }}|' config/base/params.env
- name: Deploy the operator with kustomize
run: |
kubectl create namespace system
kustomize build config/base | kubectl apply -f -
- name: Run smoke tests
run: ./tests/smoke/test_smoke.sh
env:
PR_NUMBER: "default-pr-number"
KUBECONFIG: "${HOME}/.kube/config"