diff --git a/.github/workflows/build-and-push.yaml b/.github/workflows/build-and-push.yaml index 5995f586c..400df6883 100644 --- a/.github/workflows/build-and-push.yaml +++ b/.github/workflows/build-and-push.yaml @@ -6,8 +6,9 @@ on: branches: - main paths: - - ".github/workflows/build-and-push.yaml" + - "Makefile" - "pom.xml" + - ".github/workflows/build-and-push.yaml" - "geoserver_submodule/**" - "src/**" tags: @@ -42,10 +43,15 @@ jobs: - name: Build GeoServer 2.21.0-CLOUD run: | - make install + make deps - - name: Build and push Hotspot and OpenJ9 docker images - run: ./mvnw install -f src/ -Ddockerfile.push.skip=false -ntp -Dfmt.skip -T1 -DskipTests + - name: Build without tests + run: | + make install + + - name: Build and push Hotspot docker images + run: | + make build-image SKIP_PUSH=false - name: Remove project jars from cached repository run: | diff --git a/.github/workflows/config-service-native-image.yaml b/.github/workflows/config-service-native-image.yaml index 37294aa87..3f1afeadb 100644 --- a/.github/workflows/config-service-native-image.yaml +++ b/.github/workflows/config-service-native-image.yaml @@ -8,6 +8,7 @@ on: - '*' paths: - ".github/workflows/config-service-native-image.yaml" + - "Makefile" - "pom.xml" - "src/pom.xml" - "src/apps/infrastructure/pom.xml" @@ -15,6 +16,7 @@ on: pull_request: paths: - ".github/workflows/config-service-native-image.yaml" + - "Makefile" - "pom.xml" - "src/pom.xml" - "src/apps/infrastructure/pom.xml" diff --git a/Makefile b/Makefile index 09b66b0fb..7b5c4712d 100644 --- a/Makefile +++ b/Makefile @@ -1,7 +1,7 @@ all: deps install test docker -# run `make build-image[-*] PUSH=true` to push the images to dockerhub -PUSH?="false" +# run `make build-image[-*] SKIP_PUSH=false` to push the images to dockerhub +SKIP_PUSH?="true" check: ./mvnw -f src/ -P-geoserver fmt:check -DskipTests -ntp -T4 @@ -21,21 +21,21 @@ build-image-openj9: build-image-infrastructure-openj9 build-image-geoserver-open build-image-infrastructure: ./mvnw clean package -f src/apps/infrastructure \ - -Ddocker -P-geoserver -Ddockerfile.push.skip=$(PUSH) -ntp -Dfmt.skip -DskipTests + -Ddocker -P-geoserver -Ddockerfile.push.skip=$(SKIP_PUSH) -ntp -Dfmt.skip -DskipTests build-image-infrastructure-openj9: ./mvnw clean package -f src/apps/infrastructure \ - -Dopenj9 -P-geoserver -Ddockerfile.push.skip=$(PUSH) -ntp -Dfmt.skip -DskipTests + -Dopenj9 -P-geoserver -Ddockerfile.push.skip=$(SKIP_PUSH) -ntp -Dfmt.skip -DskipTests build-image-geoserver: ./mvnw clean package -f src/apps/geoserver \ - -Ddocker -P-geoserver -Ddockerfile.push.skip=$(PUSH) -ntp -Dfmt.skip -DskipTests + -Ddocker -P-geoserver -Ddockerfile.push.skip=$(SKIP_PUSH) -ntp -Dfmt.skip -DskipTests build-image-geoserver-openj9: ./mvnw clean package -f src/apps/geoserver \ - -Dopenj9 -P-geoserver -Ddockerfile.push.skip=$(PUSH) -ntp -Dfmt.skip -DskipTests + -Dopenj9 -P-geoserver -Ddockerfile.push.skip=$(SKIP_PUSH) -ntp -Dfmt.skip -DskipTests build-config-native-image: - ./mvnw -pl :gs-cloud-config-service package -am -Dfmt.action=check -ntp -P-geoserver + ./mvnw -pl :gs-cloud-config-service install -am -Dfmt.action=check -ntp -P-geoserver ./mvnw -pl :gs-cloud-config-service spring-boot:build-image -Pnative,-geoserver -ntp -DskipTests -Dfmt.skip