|
1 | 1 | name: stock Containerd CRI tests
|
2 | 2 |
|
3 | 3 | on:
|
4 |
| - push: |
5 |
| - branches: [ main ] |
6 |
| - paths-ignore: |
7 |
| - - 'docs/**' |
8 |
| - - '**.md' |
9 |
| - - 'function-images/**' |
10 |
| - pull_request: |
11 |
| - branches: [ main ] |
12 |
| - paths-ignore: |
13 |
| - - 'docs/**' |
14 |
| - - '**.md' |
15 |
| - - 'function-images/**' |
16 | 4 | workflow_dispatch:
|
17 | 5 | schedule:
|
18 |
| - - cron: '0 0 * * *' |
| 6 | + - cron: '0 9 * * *' |
19 | 7 |
|
20 | 8 | env:
|
21 | 9 | GOOS: linux
|
22 | 10 | GO111MODULE: on
|
23 | 11 | TMPDIR: /root/tmp/
|
24 |
| - KUBECONFIG: /etc/kubernetes/admin.conf |
25 | 12 |
|
26 | 13 | jobs:
|
27 | 14 | stock-containerd-test:
|
28 | 15 | name: Stock Containerd test
|
29 |
| - runs-on: [stock-knative] |
| 16 | + runs-on: [self-hosted, cri] |
30 | 17 |
|
31 | 18 | steps:
|
32 |
| - - name: Setup TMPDIR |
33 |
| - run: mkdir -p $TMPDIR |
| 19 | + - name: Setup TMPDIR |
| 20 | + run: mkdir -p $TMPDIR |
34 | 21 |
|
35 |
| - - name: Check out code into the Go module directory |
36 |
| - uses: actions/checkout@v2 |
| 22 | + - name: Check out code into the Go module directory |
| 23 | + uses: actions/checkout@v2 |
37 | 24 |
|
38 |
| - - name: Fix namespace |
39 |
| - run: kubectl config set-context --current --namespace=default |
| 25 | + - name: Start Containerd |
| 26 | + run: sudo containerd & |
40 | 27 |
|
41 |
| - - name: Create helloworld container |
42 |
| - run: kn service create helloworld-go --image gcr.io/knative-samples/helloworld-go --env TARGET="vHive CRI test" |
| 28 | + - name: Create k8s cluster |
| 29 | + run: ./scripts/cluster/create_one_node_cluster.sh stock-only && sleep 2m |
43 | 30 |
|
44 |
| - - name: Invoke the deployed function |
45 |
| - run: | |
46 |
| - set -x |
| 31 | + - name: Deploy zipkin |
| 32 | + env: |
| 33 | + KUBECONFIG: /etc/kubernetes/admin.conf |
| 34 | + run: ./scripts/setup_zipkin.sh && sleep 5s |
47 | 35 |
|
48 |
| - export NODEPORT=$(kubectl get svc kourier-ingress -n kourier-system -o=jsonpath='{.spec.ports[0].nodePort}') |
49 |
| - export URL=$(kubectl get ksvc -n default helloworld-go -o jsonpath='{.status.url}') |
| 36 | + - name: Create helloworld container |
| 37 | + run: KUBECONFIG=/etc/kubernetes/admin.conf kn service create helloworld-go --image gcr.io/knative-samples/helloworld-go --env TARGET="vHive CRI test" |
50 | 38 |
|
51 |
| - curl $URL:$NODEPORT |
| 39 | + - name: Invoke the deployed function |
| 40 | + run: curl http://helloworld-go.default.192.168.1.240.sslip.io |
52 | 41 |
|
53 |
| - - name: Cleaning |
54 |
| - if: ${{ always() }} |
55 |
| - run: kn service delete helloworld-go --wait |
| 42 | + - name: Cleaning |
| 43 | + if: ${{ always() }} |
| 44 | + run: | |
| 45 | + kn service delete helloworld-go --wait |
| 46 | + ./scripts/github_runner/clean_cri_runner.sh stock-only |
0 commit comments