forked from microsonic/usonic
-
Notifications
You must be signed in to change notification settings - Fork 0
37 lines (37 loc) · 1.46 KB
/
Copy pathci.yaml
File metadata and controls
37 lines (37 loc) · 1.46 KB
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
on:
pull_request:
branches:
- master
- 201811
- 201904
env:
K: sudo k3s kubectl
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: crazy-max/ghaction-docker-buildx@v1
- name: install k3s
run: curl -sfL https://get.k3s.io | sh -s - --docker
- uses: actions/checkout@v2
- run: git submodule update --init --recursive sm/sonic-py-swsssdk sm/sonic-sairedis sm/sonic-swss sm/sonic-swss-common sm/sonic-utilities sm/sonic-mgmt-common sm/sonic-mgmt-framework
- run: git submodule update --init sm/sonic-buildimage
- run: make all
- run: |
$K create -f ./k8s
while [ true ]
do
sleep 10
$K get pods || true
($K exec usonic-cli -- show interface status | grep Ethernet1) && exit 0 || true
done
- run: |
$K exec usonic-cli -- show interface status
$K exec usonic-cli -- config vlan add 1000
$K exec usonic-cli -- config vlan member add 1000 Ethernet1 -u
$K exec usonic-cli -- config vlan member add 1000 Ethernet2 -u
$K exec usonic-cli -- show vlan brief
- run: |
SONIC_MGMT_ADDR=$($K get svc sonic-mgmt -o=jsonpath='{.spec.clusterIP}{"\n"}')
curl http://$SONIC_MGMT_ADDR/restconf/data/sonic-port:sonic-port
curl http://$SONIC_MGMT_ADDR/restconf/data/sonic-vlan:sonic-vlan