Skip to content

Commit 870ae5a

Browse files
committed
Merge branch 'refactor_skip_build_image_fabric8_tests' into refactor_k8s_client_configuration_watcher
2 parents 7bc17c7 + 38037c7 commit 870ae5a

File tree

11 files changed

+20
-51
lines changed
  • .github/workflows/composites
  • spring-cloud-kubernetes-controllers
  • spring-cloud-kubernetes-fabric8-leader/src/test/java/org/springframework/cloud/kubernetes/fabric8/leader
  • spring-cloud-kubernetes-integration-tests
    • spring-cloud-kubernetes-fabric8-client-catalog-watcher
    • spring-cloud-kubernetes-fabric8-client-discovery
    • spring-cloud-kubernetes-k8s-client-catalog-watcher

11 files changed

+20
-51
lines changed

.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
@@ -8,7 +8,7 @@ runs:
88
shell: bash
99
run: |
1010
./mvnw install -B \
11-
-Dskip.build.image=true \
11+
-Dspring-boot.build-image.skip=true \
1212
-DskipTests -DskipITs \
1313
-T 1C -U -q
1414

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ runs:
2424
- name: build project
2525
shell: bash
2626
run: |
27-
./mvnw clean install -Dskip.build.image=true -DskipITs -DskipTests -T1C -U -B -q
27+
./mvnw clean install -Dspring-boot.build-image.skip=true -DskipITs -DskipTests -T1C -U -B -q
2828
2929
- name: build controllers project
3030
uses: ./.github/workflows/composites/build-controllers-project

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ runs:
4747
-Dmaven.wagon.http.pool=false \
4848
-Dmaven.wagon.http.retryHandler.class=standard \
4949
-Dmaven.wagon.http.retryHandler.count=3 \
50-
-Dskip.build.image=true
50+
-Dspring-boot.build-image.skip=true
5151
5252
touch /tmp/test_times_${{ env.CURRENT_INDEX }}.txt
5353

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ runs:
156156
-Dmaven.wagon.http.pool=false \
157157
-Dmaven.wagon.http.retryHandler.class=standard \
158158
-Dmaven.wagon.http.retryHandler.count=3 \
159-
-Dskip.build.image=true
159+
-Dspring-boot.build-image.skip=true
160160

161161
touch /tmp/test_times_${{ env.CURRENT_INDEX }}.txt
162162

spring-cloud-kubernetes-controllers/pom.xml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,6 @@
3333
<executions>
3434
<execution>
3535
<id>build-image</id>
36-
<configuration>
37-
<skip>${skip.build.image}</skip>
38-
</configuration>
3936
<phase>package</phase>
4037
<goals>
4138
<goal>build-image-no-fork</goal>

spring-cloud-kubernetes-fabric8-leader/src/test/java/org/springframework/cloud/kubernetes/fabric8/leader/Fabric8LeaderInitiatorTest.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ void beforeEach() {
6060
@AfterEach
6161
void afterEach() {
6262
leaderInitiator.stop();
63+
Mockito.reset(mockFabric8LeadershipController, mockFabric8LeaderRecordWatcher, mockFabric8PodReadinessWatcher);
6364
}
6465

6566
@Test

spring-cloud-kubernetes-integration-tests/README

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,6 @@ you must name the image with the same name as the module. For example:
1313
<executions>
1414
<execution>
1515
<id>build-image</id>
16-
<configuration>
17-
<skip>${skip.build.image}</skip>
18-
</configuration>
1916
<phase>package</phase>
2017
<goals>
2118
<goal>build-image-no-fork</goal>
@@ -36,7 +33,3 @@ Notice this line:
3633
<imageName>docker.io/springcloud/${project.artifactId}:${project.version}</imageName>
3734

3835
You must follow the same convention.
39-
40-
One more important part in this configuration is : "<skip>${skip.build.image}</skip>".
41-
We use this setting in the build pipeline where in some stages we skip the image build,
42-
only to have it build in some latter ones.

spring-cloud-kubernetes-integration-tests/pom.xml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,6 @@
3838
<executions>
3939
<execution>
4040
<id>build-image</id>
41-
<configuration>
42-
<skip>${skip.build.image}</skip>
43-
</configuration>
4441
<phase>package</phase>
4542
<goals>
4643
<goal>build-image-no-fork</goal>

spring-cloud-kubernetes-integration-tests/spring-cloud-kubernetes-fabric8-client-catalog-watcher/pom.xml

Lines changed: 5 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,11 @@
1111

1212
<artifactId>spring-cloud-kubernetes-fabric8-client-catalog-watcher</artifactId>
1313

14+
<properties>
15+
<spring-boot.repackage.skip>true</spring-boot.repackage.skip>
16+
<spring-boot.build-image.skip>true</spring-boot.build-image.skip>
17+
</properties>
18+
1419
<dependencies>
1520
<dependency>
1621
<groupId>org.springframework.cloud</groupId>
@@ -42,22 +47,5 @@
4247
<filtering>true</filtering>
4348
</resource>
4449
</resources>
45-
46-
<plugins>
47-
<plugin>
48-
<groupId>org.springframework.boot</groupId>
49-
<artifactId>spring-boot-maven-plugin</artifactId>
50-
<executions>
51-
<execution>
52-
<id>build-image</id>
53-
<configuration>
54-
<skip>true</skip>
55-
</configuration>
56-
</execution>
57-
</executions>
58-
</plugin>
59-
</plugins>
60-
6150
</build>
62-
6351
</project>

spring-cloud-kubernetes-integration-tests/spring-cloud-kubernetes-fabric8-client-discovery/pom.xml

Lines changed: 5 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,11 @@
1111

1212
<artifactId>spring-cloud-kubernetes-fabric8-client-discovery</artifactId>
1313

14+
<properties>
15+
<spring-boot.repackage.skip>true</spring-boot.repackage.skip>
16+
<spring-boot.build-image.skip>true</spring-boot.build-image.skip>
17+
</properties>
18+
1419
<dependencies>
1520
<dependency>
1621
<groupId>org.springframework.cloud</groupId>
@@ -50,21 +55,6 @@
5055
<filtering>true</filtering>
5156
</resource>
5257
</resources>
53-
54-
<plugins>
55-
<plugin>
56-
<groupId>org.springframework.boot</groupId>
57-
<artifactId>spring-boot-maven-plugin</artifactId>
58-
<executions>
59-
<execution>
60-
<id>build-image</id>
61-
<configuration>
62-
<skip>true</skip>
63-
</configuration>
64-
</execution>
65-
</executions>
66-
</plugin>
67-
</plugins>
6858
</build>
6959

7060
</project>

0 commit comments

Comments
 (0)