Skip to content

Commit 3073e9a

Browse files
wzshimingpacoxu
authored andcommitted
Fix ci
1 parent 57207e1 commit 3073e9a

File tree

6 files changed

+541
-32
lines changed

6 files changed

+541
-32
lines changed

.github/workflows/verify.yml

Lines changed: 12 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,6 @@ jobs:
2424
- name: Install dependent
2525
run: |
2626
make dependent
27-
- name: Verify releases
28-
run: |
29-
make verify-releases
3027
- name: Verify patch
3128
run: |
3229
make verify-patch
@@ -289,7 +286,7 @@ jobs:
289286
run: |
290287
make test-integration
291288
292-
Test-v1-20-16-lts-1:
289+
Test-v1-20-15-lts-1:
293290
needs: Patch
294291
runs-on: ubuntu-latest
295292
steps:
@@ -301,23 +298,23 @@ jobs:
301298
with:
302299
path: |
303300
src
304-
key: ${{ runner.os }}-build-${{ env.cache-name }}-v1-20-16-lts-1
301+
key: ${{ runner.os }}-build-${{ env.cache-name }}-v1-20-15-lts-1
305302
restore-keys: |
306303
${{ runner.os }}-build-${{ env.cache-name }}
307304
- name: Install dependent
308305
run: |
309306
make dependent
310-
- name: Checkout to v1.20.16-lts.1
307+
- name: Checkout to v1.20.15-lts.1
311308
run: |
312-
make v1.20.16-lts.1
309+
make v1.20.15-lts.1
313310
- name: Install etcd
314311
run: |
315312
make install-etcd
316313
- name: Test
317314
run: |
318315
make test
319316
320-
Test-Cmd-v1-20-16-lts-1:
317+
Test-Cmd-v1-20-15-lts-1:
321318
needs: Patch
322319
runs-on: ubuntu-latest
323320
steps:
@@ -329,23 +326,23 @@ jobs:
329326
with:
330327
path: |
331328
src
332-
key: ${{ runner.os }}-build-${{ env.cache-name }}-v1-20-16-lts-1
329+
key: ${{ runner.os }}-build-${{ env.cache-name }}-v1-20-15-lts-1
333330
restore-keys: |
334331
${{ runner.os }}-build-${{ env.cache-name }}
335332
- name: Install dependent
336333
run: |
337334
make dependent
338-
- name: Checkout to v1.20.16-lts.1
335+
- name: Checkout to v1.20.15-lts.1
339336
run: |
340-
make v1.20.16-lts.1
337+
make v1.20.15-lts.1
341338
- name: Install etcd
342339
run: |
343340
make install-etcd
344341
- name: Test cmd
345342
run: |
346343
make test-cmd
347344
348-
Test-Integration-v1-20-16-lts-1:
345+
Test-Integration-v1-20-15-lts-1:
349346
needs: Patch
350347
runs-on: ubuntu-latest
351348
steps:
@@ -358,15 +355,15 @@ jobs:
358355
path: |
359356
src
360357
/tmp/kubernetes-lts/
361-
key: ${{ runner.os }}-build-${{ env.cache-name }}-v1-20-16-lts-1
358+
key: ${{ runner.os }}-build-${{ env.cache-name }}-v1-20-15-lts-1
362359
restore-keys: |
363360
${{ runner.os }}-build-${{ env.cache-name }}
364361
- name: Install dependent
365362
run: |
366363
make dependent
367-
- name: Checkout to v1.20.16-lts.1
364+
- name: Checkout to v1.20.15-lts.1
368365
run: |
369-
make v1.20.16-lts.1
366+
make v1.20.15-lts.1
370367
- name: Install etcd
371368
run: |
372369
make install-etcd

hack/test_cmd.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@ set -o pipefail
77
source "kit/helper.sh"
88
cd "${WORKDIR}"
99

10+
# Kubeadm was added for testing in 1.19 and later
1011
for n in {1..5}; do
1112
echo "+++ Test retry ${n}"
12-
./build/run.sh make test-cmd 2>&1 | grep -v -E '^I\w+ ' && exit 0
13+
./build/shell.sh -c 'make generated_files kubeadm && mkdir -p _output/local/go/bin/ && cp _output/dockerized/bin/linux/amd64/kubeadm _output/local/go/bin/ && ./hack/install-etcd.sh && PATH=$(pwd)/third_party/etcd:${PATH} make test-cmd' 2>&1 | grep -v -E '^I\w+ ' && exit 0
1314
done

hack/test_integration.sh

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,12 @@ cd "${WORKDIR}"
99

1010
TMPFILE="${TMPDIR}/test-integration.log"
1111

12-
./build/run.sh make test-integration 2>&1 | tee "${TMPFILE}" | grep -v -E '^I\w+ ' && exit 0
12+
# Etcd was added for testing in 1.21 and later
13+
function test-integration() {
14+
./build/shell.sh -c './hack/install-etcd.sh && PATH=$(pwd)/third_party/etcd:${PATH} make test-integration'
15+
}
16+
17+
test-integration 2>&1 | tee "${TMPFILE}" | grep -v -E '^I\w+ ' && exit 0
1318

1419
RETRY_CASES=$(cat "${TMPFILE}" | grep -E '^FAIL\s+k8s.io/kubernetes' | awk '{print $2}' || echo "")
1520

@@ -35,7 +40,7 @@ for n in {1..5}; do
3540
echo "+++ Test retry ${n}, the case is as follows:"
3641
echo "${RETRY_CASES}"
3742
want=$(echo ${RETRY_CASES})
38-
./build/run.sh make test-integration WHAT="${want}" 2>&1 | tee "${TMPFILE}" | grep -v -E '^I\w+ ' && exit 0
43+
test-integration WHAT="${want}" 2>&1 | tee "${TMPFILE}" | grep -v -E '^I\w+ ' && exit 0
3944
RETRY_CASES=$(cat "${TMPFILE}" | grep -E '^FAIL\s+k8s.io/kubernetes' | awk '{print $2}' || echo "")
4045
done
4146

0 commit comments

Comments
 (0)