Skip to content

Commit c64a87b

Browse files
authored
feat: skip Spring Boot image building in workflows and set pullPolicy to IF_NOT_PRESENT in POM files (#3070)
- Added the `-Dspring-boot.build-image.skip=true` flag to Maven commands in pull request workflow to skip unnecessary image builds. - Configured `pullPolicy` to `IF_NOT_PRESENT` for Spring Boot Maven plugin in API, Executor, and Registry POM files.
1 parent b08db4a commit c64a87b

File tree

4 files changed

+5
-2
lines changed

4 files changed

+5
-2
lines changed

.github/workflows/pull_request.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,15 +33,15 @@ jobs:
3333
restore-keys: ${{ runner.os }}-m2
3434
- name: Build Terrakube
3535
if: ${{ github.event_name == 'push' || github.event.pull_request.head.repo.full_name == github.repository }}
36-
run: mvn -B verify --file pom.xml org.sonarsource.scanner.maven:sonar-maven-plugin:sonar -Dsonar.projectKey=AzBuilder_azb-server
36+
run: mvn -B verify --file pom.xml org.sonarsource.scanner.maven:sonar-maven-plugin:sonar -Dsonar.projectKey=AzBuilder_azb-server -Dspring-boot.build-image.skip=true
3737
env:
3838
USER_NAME: ${{ secrets.USER_NAME }}
3939
ACCESS_TOKEN: ${{ secrets.ACCESS_TOKEN }}
4040
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
4141
GITHUB_TOKEN: ${{ secrets.ACCESS_TOKEN }}
4242
- name: Build Terrakube from Fork
4343
if: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name != github.repository }}
44-
run: mvn clean install
44+
run: mvn clean install -Dspring-boot.build-image.skip=true
4545

4646
build-alpaquita:
4747
runs-on: ubuntu-latest

api/pom.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@
5252
<artifactId>spring-boot-maven-plugin</artifactId>
5353
<configuration>
5454
<image>
55+
<pullPolicy>IF_NOT_PRESENT</pullPolicy>
5556
<builder>${buildpack.builder}</builder>
5657
<buildpacks>
5758
<buildpack>${buildpack.java}</buildpack>

executor/pom.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -218,6 +218,7 @@
218218
</exclude>
219219
</excludes>
220220
<image>
221+
<pullPolicy>IF_NOT_PRESENT</pullPolicy>
221222
<builder>${buildpack.builder}</builder>
222223
<buildpacks>
223224
<buildpack>${buildpack.java}</buildpack>

registry/pom.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@
4242
<artifactId>spring-boot-maven-plugin</artifactId>
4343
<configuration>
4444
<image>
45+
<pullPolicy>IF_NOT_PRESENT</pullPolicy>
4546
<builder>${buildpack.builder}</builder>
4647
<buildpacks>
4748
<buildpack>${buildpack.java}</buildpack>

0 commit comments

Comments
 (0)