-
Notifications
You must be signed in to change notification settings - Fork 84
250 lines (241 loc) · 8.46 KB
/
nightly.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
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
name: nightly
on:
workflow_dispatch:
push:
branches:
- master
schedule:
- cron: "0 0 * * *"
jobs:
build-matrix:
runs-on: ubuntu-latest
steps:
- id: set-matrix
run: |
sudo apt-get install jq
testmode=("pod" "pod-mount-share" "pod-provisioner" "webhook" "webhook-provisioner" "process")
value=`printf '%s\n' "${testmode[@]}" | jq -R . | jq -cs .`
echo "value: $value"
echo "matrix=$value" >> $GITHUB_OUTPUT
wtestmode=("pod" "pod-mount-share" "pod-provisioner")
value=`printf '%s\n' "${wtestmode[@]}" | jq -R . | jq -cs .`
echo "value without kubelet: $value"
echo "wmatrix=$value" >> $GITHUB_OUTPUT
outputs:
matrix: ${{ steps.set-matrix.outputs.matrix }}
wmatrix: ${{ steps.set-matrix.outputs.wmatrix }}
e2e-ce-without-kubelet-test:
runs-on: ubuntu-latest
needs: build-matrix
strategy:
fail-fast: false
matrix:
testmode: ${{ fromJson(needs.build-matrix.outputs.wmatrix) }}
steps:
- uses: actions/checkout@v2
- name: Build docker image nightly
env:
JUICEFS_CSI_REPO_REF: ${{ github.ref }}
run: |
make -C docker image-nightly
- name: Prepare microk8s environment
run: |
${GITHUB_WORKSPACE}/.github/scripts/k8s-deps.sh
docker image save -o juicefs-csi-driver-nightly.tar juicedata/juicefs-csi-driver:nightly
sudo microk8s.ctr image import juicefs-csi-driver-nightly.tar
rm -f juicefs-csi-driver-nightly.tar
- name: Deploy JuiceFS CSI
run: |
testmode=${{matrix.testmode}}
export dev_tag=nightly
.github/scripts/deploy-csi-in-k8s.sh ${testmode} withoutkubelet
- name: Run e2e test
env:
JUICEFS_STORAGE: s3
JUICEFS_BUCKET: "http://juicefs-bucket.minio.default.svc.cluster.local:9000"
JUICEFS_ACCESS_KEY: "minioadmin"
JUICEFS_SECRET_KEY: "minioadmin"
JUICEFS_NAME: "ce-secret"
JUICEFS_META_URL: "redis://redis.default.svc.cluster.local:6379/1"
JUICEFS_MODE: ce
TEST_MODE: ${{matrix.testmode}}
run: |
cd ${GITHUB_WORKSPACE}/.github/scripts/
python3 e2e-test.py
- name: Setup upterm session
if: ${{ failure() }}
timeout-minutes: 60
uses: lhotari/action-upterm@v1
e2e-ee-without-kubelet-test:
runs-on: ubuntu-latest
needs: build-matrix
strategy:
fail-fast: false
matrix:
testmode: ${{ fromJson(needs.build-matrix.outputs.wmatrix) }}
steps:
- uses: actions/checkout@v2
- name: Build docker image nightly
env:
JUICEFS_CSI_REPO_REF: ${{ github.ref }}
run: |
make -C docker image-nightly
- name: Prepare microk8s environment
run: |
${GITHUB_WORKSPACE}/.github/scripts/k8s-deps.sh
docker image save -o juicefs-csi-driver-nightly.tar juicedata/juicefs-csi-driver:nightly
sudo microk8s.ctr image import juicefs-csi-driver-nightly.tar
rm -f juicefs-csi-driver-nightly.tar
- name: Deploy JuiceFS CSI
run: |
testmode=${{matrix.testmode}}
cd ${GITHUB_WORKSPACE}
export dev_tag=nightly
.github/scripts/deploy-csi-in-k8s.sh ${testmode} withoutkubelet
- name: Run e2e test
env:
JUICEFS_TOKEN: ${{ secrets.JUICEFS_CI_VOLUME_TOKEN }}
JUICEFS_STORAGE: s3
JUICEFS_BUCKET: "http://juicefs-bucket.minio.default.svc.cluster.local:9000"
JUICEFS_ACCESS_KEY: "minioadmin"
JUICEFS_SECRET_KEY: "minioadmin"
JUICEFS_NAME: "csi-ci"
JUICEFS_META_URL: ""
JUICEFS_MODE: "ee"
TEST_MODE: ${{matrix.testmode}}
run: |
cd ${GITHUB_WORKSPACE}/.github/scripts/
python3 e2e-test.py
- name: Setup upterm session
if: ${{ failure() }}
timeout-minutes: 60
uses: lhotari/action-upterm@v1
e2e-ce-test:
runs-on: ubuntu-latest
needs: build-matrix
strategy:
fail-fast: false
matrix:
testmode: ${{ fromJson(needs.build-matrix.outputs.matrix) }}
steps:
- uses: actions/checkout@v2
- name: Build docker image nightly
env:
JUICEFS_CSI_REPO_REF: ${{ github.ref }}
run: |
make -C docker image-nightly
- name: Prepare microk8s environment
run: |
${GITHUB_WORKSPACE}/.github/scripts/k8s-deps.sh
docker image save -o juicefs-csi-driver-nightly.tar juicedata/juicefs-csi-driver:nightly
sudo microk8s.ctr image import juicefs-csi-driver-nightly.tar
rm -f juicefs-csi-driver-nightly.tar
- name: Deploy JuiceFS CSI
run: |
testmode=${{matrix.testmode}}
export dev_tag=nightly
.github/scripts/deploy-csi-in-k8s.sh ${testmode}
- name: Run e2e test
env:
JUICEFS_STORAGE: s3
JUICEFS_BUCKET: "http://juicefs-bucket.minio.default.svc.cluster.local:9000"
JUICEFS_ACCESS_KEY: "minioadmin"
JUICEFS_SECRET_KEY: "minioadmin"
JUICEFS_NAME: "ce-secret"
JUICEFS_META_URL: "redis://redis.default.svc.cluster.local:6379/1"
JUICEFS_MODE: ce
TEST_MODE: ${{matrix.testmode}}
run: |
cd ${GITHUB_WORKSPACE}/.github/scripts/
python3 e2e-test.py
- name: Setup upterm session
if: ${{ failure() }}
timeout-minutes: 60
uses: lhotari/action-upterm@v1
e2e-ee-test:
runs-on: ubuntu-latest
needs: build-matrix
strategy:
fail-fast: false
matrix:
testmode: ${{ fromJson(needs.build-matrix.outputs.matrix) }}
steps:
- uses: actions/checkout@v2
- name: Build docker image nightly
env:
JUICEFS_CSI_REPO_REF: ${{ github.ref }}
run: |
make -C docker image-nightly
- name: Prepare microk8s environment
run: |
${GITHUB_WORKSPACE}/.github/scripts/k8s-deps.sh
docker image save -o juicefs-csi-driver-nightly.tar juicedata/juicefs-csi-driver:nightly
sudo microk8s.ctr image import juicefs-csi-driver-nightly.tar
rm -f juicefs-csi-driver-nightly.tar
- name: Deploy JuiceFS CSI
run: |
testmode=${{matrix.testmode}}
export dev_tag=nightly
.github/scripts/deploy-csi-in-k8s.sh ${testmode}
- name: Run e2e test
env:
JUICEFS_TOKEN: ${{ secrets.JUICEFS_CI_VOLUME_TOKEN }}
JUICEFS_STORAGE: s3
JUICEFS_BUCKET: "http://juicefs-bucket.minio.default.svc.cluster.local:9000"
JUICEFS_ACCESS_KEY: "minioadmin"
JUICEFS_SECRET_KEY: "minioadmin"
JUICEFS_NAME: "csi-ci"
JUICEFS_META_URL: ""
JUICEFS_MODE: "ee"
TEST_MODE: ${{matrix.testmode}}
run: |
cd ${GITHUB_WORKSPACE}/.github/scripts/
python3 e2e-test.py
- name: Setup upterm session
if: ${{ failure() }}
timeout-minutes: 60
uses: lhotari/action-upterm@v1
success-all-test:
runs-on: ubuntu-latest
needs: [ e2e-ce-test, e2e-ee-test ]
if: always()
steps:
- uses: technote-space/workflow-conclusion-action@v3
- uses: actions/checkout@v3
- name: Check Failure
if: env.WORKFLOW_CONCLUSION == 'failure'
run: exit 1
- uses: pnpm/action-setup@v4
name: Install pnpm
with:
version: 9
run_install: |
cwd: dashboard-ui-v2
- name: Build dashboard
run: make dashboard-dist
- name: Buildx and Push docker image nightly
env:
PASSWORD: ${{ secrets.DOCKERHUB_FUSE_ACCESS_TOKEN }}
# JFSCHAN: beta
CEVERSION: ce-nightly
EEVERSION: ee-nightly
DASHBOARD_TAG: nightly
run: |
docker login --username chnliyong --password ${PASSWORD}
make -C docker image-nightly
make -C docker image-nightly-push
make -C docker ce-image
make -C docker ee-image
make -C docker dashboard-build
- name: sync image
env:
ACR_TOKEN: ${{ secrets.ACR_TOKEN }}
ACR_USERNAME: ${{ secrets.ACR_USERNAME }}
run: |
cd ${GITHUB_WORKSPACE}/.github/scripts/
./sync.sh csi-driver nightly
./sync.sh mount ee-nightly
./sync.sh mount ce-nightly
- name: Success
if: ${{ success() }}
run: echo "All Done"