-
Notifications
You must be signed in to change notification settings - Fork 87
128 lines (110 loc) · 3.77 KB
/
build-test.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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
name: build-test
on:
push:
branches:
- "**"
jobs:
build-kots:
runs-on: ubuntu-18.04
steps:
- uses: actions/setup-go@v1
with:
go-version: "1.14.3"
- name: setup env
run: |
echo "::set-env name=GOPATH::$(go env GOPATH)"
echo "::add-path::$(go env GOPATH)/bin"
shell: bash
- uses: actions/checkout@v2
- run: make ci-test kots
- uses: actions/upload-artifact@v1
with:
name: kots
path: bin/kots
- run: make -C kotsadm kotsadm
- run: make -C kotsadm/operator build
- run: make -C kotsadm/kurl_proxy build
- env:
GIT_COMMIT: ${{ github.sha }}
run: make -C kotsadm/web deps build-kotsadm
- name: build and push migrations for e2e
uses: docker/build-push-action@v1
with:
repository: ttl.sh/automated-${{ github.run_id }}/kotsadm-migrations
tags: 2h
path: ./kotsadm/migrations
dockerfile: ./kotsadm/migrations/deploy/Dockerfile
- name: build and push kotsadm for e2e
uses: docker/build-push-action@v1
with:
repository: ttl.sh/automated-${{ github.run_id }}/kotsadm
tags: 2h
path: ./kotsadm
dockerfile: ./kotsadm/deploy/Dockerfile
- name: build and push api for e2e
uses: docker/build-push-action@v1
with:
repository: ttl.sh/automated-${{ github.run_id }}/kotsadm-api
tags: 2h
path: ./kotsadm/api
dockerfile: ./kotsadm/api/deploy/Dockerfile
- name: build and push operator for e2e
uses: docker/build-push-action@v1
with:
repository: ttl.sh/automated-${{ github.run_id }}/kotsadm-operator
tags: 2h
path: ./kotsadm/operator
dockerfile: ./kotsadm/operator/deploy/Dockerfile
- name: build and push kurl_proxy for e2e
uses: docker/build-push-action@v1
with:
repository: ttl.sh/automated-${{ github.run_id }}/kurl-proxy
tags: 2h
path: ./kotsadm/kurl_proxy
dockerfile: ./kotsadm/kurl_proxy/deploy/Dockerfile
- name: build and push minio for e2e
uses: docker/build-push-action@v1
with:
repository: ttl.sh/automated-${{ github.run_id }}/minio
tags: 2h
path: ./kotsadm/minio
dockerfile: ./kotsadm/minio/Dockerfile
validate:
runs-on: ubuntu-18.04
needs: build-kots
strategy:
matrix:
k8s_version: [v1.16.9-k3s1,v1.17.4-k3s1,v1.18.2-k3s1]
steps:
- uses: debianmaster/actions-k3s@v1.0.0
id: k3s
with:
version: ${{ matrix.k8s_version }}
- name: download kots binary
uses: actions/download-artifact@v1
with:
name: kots
path: bin/
- run: chmod +x bin/kots
- uses: actions/setup-node@v1
with:
node-version: '10.x'
- name: setup testIM
run: npm i -g @testim/testim-cli
shell: bash
- name: prepare kotsadm-smoke-test
run: |
./bin/kots \
install qakots/github-actions \
--port-forward=false \
--namespace kotsadm-smoke-test \
--shared-password password \
--kotsadm-registry ttl.sh \
--kotsadm-namespace automated-${{ github.run_id }} \
--kotsadm-tag 2h
- name: execute kotsadm-smoke-test
run: |
./bin/kots admin-console -n kotsadm-smoke-test &
ADMIN_CONSOLE_PID=$!
testim --token ${{ secrets.TESTIM_ACCESS_TOKEN }} --project ${{ secrets.TESTIM_PROJECT_ID }} --grid "Testim-grid" --report-file testim-report.xml --label kotsadm-smoke-test --tunnel --tunnel-port 8800
kill $ADMIN_CONSOLE_PID