Skip to content

Commit d44edfc

Browse files
authored
Drop jdk8 build support + various improvements (#1638)
1 parent 013b920 commit d44edfc

File tree

10 files changed

+31
-95
lines changed

10 files changed

+31
-95
lines changed

.github/workflows/composites/matrix-bounds-on-test-times-cache-hit/action.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ runs:
1919
steps:
2020

2121
- name: restore test times cache
22-
uses: actions/cache/restore@v3
22+
uses: actions/cache/restore@v4
2323
with:
2424
path: /tmp/sorted.txt
2525
key: ${{ runner.os }}-spring-cloud-k8s-existing-test-times-cache-${{ github.run_id }}
@@ -117,13 +117,13 @@ runs:
117117
echo "AVERAGE_TIME_PER_INSTANCE=$(echo $average_time_per_instance_json)" >> $GITHUB_ENV
118118
119119
- name: upload test with times
120-
uses: actions/upload-artifact@v3
120+
uses: actions/upload-artifact@v4
121121
with:
122122
name: tests-with-times-sorted.txt
123123
path: /tmp/tests-with-times-sorted.txt
124124

125125
- name: upload test without times
126-
uses: actions/upload-artifact@v3
126+
uses: actions/upload-artifact@v4
127127
with:
128128
name: tests-without-times.txt
129129
path: /tmp/tests-without-times.txt

.github/workflows/composites/maven-build-with-dry-run-for-tests/action.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ runs:
3030
run: cat /tmp/tests.txt
3131

3232
- name: upload test
33-
uses: actions/upload-artifact@v3
33+
uses: actions/upload-artifact@v4
3434
with:
3535
name: tests.txt
3636
path: /tmp/tests.txt

.github/workflows/composites/pre-test-actions/action.yaml

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,6 @@ runs:
1515
uses: ./.github/workflows/composites/setup-jdk17
1616
if: env.BASE_BRANCH == 'main'
1717

18-
- name: setup project jdk-8
19-
uses: ./.github/workflows/composites/setup-jdk1.8
20-
if: env.BASE_BRANCH == '2.1.x'
21-
2218
- name: cache local maven repository
2319
uses: ./.github/workflows/composites/cache
2420

@@ -37,7 +33,7 @@ runs:
3733
uses: ./.github/workflows/composites/build-integration-tests-project
3834

3935
- name: download tests
40-
uses: actions/download-artifact@v3
36+
uses: actions/download-artifact@v4
4137
with:
4238
name: tests.txt
4339
path: /tmp

.github/workflows/composites/restore-docker-images/action.yaml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,12 +31,10 @@ runs:
3131
with:
3232
path: |
3333
/tmp/docker/images
34-
key: docker-images-github-cache-${{ hashFiles('**/current-images.txt') }}
3534
3635
- name: print images
3736
shell: bash
3837
run: |
3938
echo 'printing images'
4039
ls /tmp/docker/images
4140
42-

.github/workflows/composites/run-and-save-test-times-when-cache-missing/action.yaml

Lines changed: 12 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -37,39 +37,17 @@ runs:
3737
TEST_ARG=$(echo ${sliced_array[@]} | sed 's/ /,/g')
3838
echo "$TEST_ARG"
3939
40-
if [[ $baseBranch == "2.1.x" ]]; then
41-
42-
./mvnw -s .settings.xml -pl '-:kubernetes-leader-election-example' -pl '-:kubernetes-hello-world-example' \
43-
-pl '-:kubernetes-reload-example' -pl '-:kubernetes-loadbalancer-example' \
44-
-pl '-:spring-cloud-kubernetes-configserver' -pl '-:spring-cloud-kubernetes-configuration-watcher' \
45-
-pl '-:spring-cloud-kubernetes-discoveryserver' \
46-
-DtestsToRun=${TEST_ARG[@]} \
47-
-e clean install \
48-
-U -P sonar -nsu --batch-mode \
49-
-Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn \
50-
-Dhttp.keepAlive=false \
51-
-Dmaven.wagon.http.pool=false \
52-
-Dmaven.wagon.http.retryHandler.class=standard \
53-
-Dmaven.wagon.http.retryHandler.count=3 \
54-
-Dskip.build.image=true
55-
56-
else
57-
58-
version=$(java -version)
59-
echo "version of java: $version"
60-
61-
./mvnw -s .settings.xml \
62-
-DtestsToRun=${TEST_ARG[@]} \
63-
-DCURRENT_INSTANCE=${CURRENT_INDEX} \
64-
-e clean install \
65-
-P sonar -nsu --batch-mode \
66-
-Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn \
67-
-Dhttp.keepAlive=false \
68-
-Dmaven.wagon.http.pool=false \
69-
-Dmaven.wagon.http.retryHandler.class=standard \
70-
-Dmaven.wagon.http.retryHandler.count=3 \
71-
-Dskip.build.image=true
72-
fi
40+
./mvnw -s .settings.xml \
41+
-DtestsToRun=${TEST_ARG[@]} \
42+
-DCURRENT_INSTANCE=${CURRENT_INDEX} \
43+
-e clean install \
44+
-P sonar -nsu --batch-mode \
45+
-Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn \
46+
-Dhttp.keepAlive=false \
47+
-Dmaven.wagon.http.pool=false \
48+
-Dmaven.wagon.http.retryHandler.class=standard \
49+
-Dmaven.wagon.http.retryHandler.count=3 \
50+
-Dskip.build.image=true
7351
7452
touch /tmp/test_times_${{ env.CURRENT_INDEX }}.txt
7553
@@ -85,12 +63,10 @@ runs:
8563
8664
- name: show individual test times
8765
shell: bash
88-
if: env.BASE_BRANCH != '2.1.x'
8966
run: cat /tmp/test_times_${{ env.CURRENT_INDEX }}.txt
9067

9168
- name: upload individual tests
92-
if: env.BASE_BRANCH != '2.1.x'
93-
uses: actions/upload-artifact@v3
69+
uses: actions/upload-artifact@v4
9470
with:
9571
name: test_times_${{ env.CURRENT_INDEX }}.txt
9672
path: /tmp/test_times_${{ env.CURRENT_INDEX }}.txt

.github/workflows/composites/run-and-save-test-times-when-cache-present/action.yaml

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,13 @@ runs:
66
steps:
77

88
- name: download tests with times
9-
if: env.BASE_BRANCH != '2.1.x'
10-
uses: actions/download-artifact@v3
9+
uses: actions/download-artifact@v4
1110
with:
1211
name: tests-with-times-sorted.txt
1312
path: /tmp/
1413

1514
- name: download tests without times
16-
if: env.BASE_BRANCH != '2.1.x'
17-
uses: actions/download-artifact@v3
15+
uses: actions/download-artifact@v4
1816
with:
1917
name: tests-without-times.txt
2018
path: /tmp/
@@ -187,12 +185,10 @@ runs:
187185

188186
- name: show individual test times
189187
shell: bash
190-
if: env.BASE_BRANCH != '2.1.x'
191188
run: cat /tmp/test_times_${{ env.CURRENT_INDEX }}.txt
192189

193190
- name: upload individual tests
194-
if: env.BASE_BRANCH != '2.1.x'
195-
uses: actions/upload-artifact@v3
191+
uses: actions/upload-artifact@v4
196192
with:
197193
name: test_times_${{ env.CURRENT_INDEX }}.txt
198194
path: /tmp/test_times_${{ env.CURRENT_INDEX }}.txt

.github/workflows/composites/setup-jdk1.8/action.yaml

Lines changed: 0 additions & 9 deletions
This file was deleted.

.github/workflows/composites/setup-jdk17/action.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ description: setup project with jdk-17
33
runs:
44
using: "composite"
55
steps:
6-
- uses: actions/setup-java@v3
6+
- uses: actions/setup-java@v4
77
with:
88
distribution: 'temurin'
99
java-version: '17'

.github/workflows/composites/test-times/action.yaml

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,18 +15,15 @@ runs:
1515

1616
# we omit the name, as such all artifacts are downloaded
1717
- name: download all artifacts
18-
if: env.BASE_BRANCH != '2.1.x'
19-
uses: actions/download-artifact@v3
18+
uses: actions/download-artifact@v4
2019
with:
2120
path: /tmp/all-artifacts
2221

2322
- name: show all artifacts
24-
if: env.BASE_BRANCH != '2.1.x'
2523
shell: bash
2624
run: ls -l /tmp/all-artifacts
2725

2826
- name: merge all artifacts into a single file and sort by time
29-
if: env.BASE_BRANCH != '2.1.x'
3027
shell: bash
3128
run: |
3229
arr=($(find /tmp/all-artifacts/ -type f -name "test_times*"))
@@ -41,7 +38,6 @@ runs:
4138
cat /tmp/sorted.txt
4239
4340
- name: show all tests in a sorted manner
44-
if: env.BASE_BRANCH != '2.1.x'
4541
shell: bash
4642
run: cat /tmp/sorted.txt
4743

@@ -51,8 +47,7 @@ runs:
5147
# meaning there could be many of them already present and this is not an exact match
5248
# github in this case will pick up the latest one, exactly what we want.
5349
- name: save test times in cache
54-
uses: actions/cache/save@v3
55-
if: env.BASE_BRANCH != '2.1.x'
50+
uses: actions/cache/save@v4
5651
with:
5752
path: /tmp/sorted.txt
5853
key: ${{ runner.os }}-spring-cloud-k8s-existing-test-times-cache-${{ github.run_id }}

.github/workflows/maven.yaml

Lines changed: 8 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@ name: github-workflow
22

33
on:
44
push:
5-
branches: [ main, 2.1.x, 3.0.x ]
5+
branches: [ main, 3.0.x ]
66
pull_request:
7-
branches: [ main, 2.1.x, 3.0.x ]
7+
branches: [ main, 3.0.x ]
88

99
jobs:
1010
build:
@@ -27,7 +27,7 @@ jobs:
2727
steps:
2828

2929
- name: checkout project
30-
uses: actions/checkout@v2
30+
uses: actions/checkout@v4
3131

3232
- name: set env variables
3333
uses: ./.github/workflows/composites/env-variables
@@ -37,10 +37,6 @@ jobs:
3737
uses: ./.github/workflows/composites/setup-jdk17
3838
if: env.BASE_BRANCH == 'main' || env.BASE_BRANCH == '3.0.x'
3939

40-
- name: setup project jdk-8
41-
uses: ./.github/workflows/composites/setup-jdk1.8
42-
if: env.BASE_BRANCH == '2.1.x'
43-
4440
- name: cache local maven repository
4541
uses: ./.github/workflows/composites/cache
4642

@@ -61,8 +57,7 @@ jobs:
6157

6258
- name: restore test times cache if it exists
6359
id: restore_test_times_cache
64-
if: env.BASE_BRANCH != '2.1.x'
65-
uses: actions/cache/restore@v3
60+
uses: actions/cache/restore@v4
6661
with:
6762
path: /tmp/sorted.txt
6863
key: ${{ runner.os }}-spring-cloud-k8s-existing-test-times-cache-${{ github.run_id }}
@@ -110,7 +105,7 @@ jobs:
110105
steps:
111106

112107
- name: checkout project
113-
uses: actions/checkout@v2
108+
uses: actions/checkout@v4
114109

115110
- name: clean space
116111
uses: ./.github/workflows/composites/clean-space
@@ -122,10 +117,6 @@ jobs:
122117
uses: ./.github/workflows/composites/setup-jdk17
123118
if: env.BASE_BRANCH == 'main' || env.BASE_BRANCH == '3.0.x'
124119

125-
- name: setup project jdk-8
126-
uses: ./.github/workflows/composites/setup-jdk1.8
127-
if: env.BASE_BRANCH == '2.1.x'
128-
129120
- name: pre-test-actions
130121
uses: ./.github/workflows/composites/pre-test-actions
131122

@@ -158,7 +149,7 @@ jobs:
158149
steps:
159150

160151
- name: checkout project
161-
uses: actions/checkout@v2
152+
uses: actions/checkout@v4
162153

163154
- name: clean space
164155
uses: ./.github/workflows/composites/clean-space
@@ -170,10 +161,6 @@ jobs:
170161
uses: ./.github/workflows/composites/setup-jdk17
171162
if: env.BASE_BRANCH == 'main' || env.BASE_BRANCH == '3.0.x'
172163

173-
- name: setup project jdk-8
174-
uses: ./.github/workflows/composites/setup-jdk1.8
175-
if: env.BASE_BRANCH == '2.1.x'
176-
177164
- name: pre-test-actions
178165
uses: ./.github/workflows/composites/pre-test-actions
179166

@@ -190,7 +177,6 @@ jobs:
190177
- name: run and save individual test times
191178
env:
192179
CURRENT_INDEX: ${{ matrix.current_index }}
193-
if: env.BASE_BRANCH != '2.1.x'
194180
uses: ./.github/workflows/composites/run-and-save-test-times-when-cache-missing
195181

196182
save_test_times_when_cache_missing:
@@ -200,10 +186,9 @@ jobs:
200186
steps:
201187

202188
- name: checkout project
203-
uses: actions/checkout@v2
189+
uses: actions/checkout@v4
204190

205191
- name: compute and save running time of tests
206-
if: env.BASE_BRANCH != '2.1.x'
207192
uses: ./.github/workflows/composites/test-times
208193

209194
save_test_times_when_cache_present:
@@ -213,8 +198,7 @@ jobs:
213198
steps:
214199

215200
- name: checkout project
216-
uses: actions/checkout@v2
201+
uses: actions/checkout@v4
217202

218203
- name: compute and save running time of tests
219-
if: env.BASE_BRANCH != '2.1.x'
220204
uses: ./.github/workflows/composites/test-times

0 commit comments

Comments
 (0)