Skip to content

Commit

Permalink
Fix ci build images script
Browse files Browse the repository at this point in the history
  • Loading branch information
groldan committed Jul 7, 2022
1 parent 245d438 commit 559b81e
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 11 deletions.
14 changes: 10 additions & 4 deletions .github/workflows/build-and-push.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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: |
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/config-service-native-image.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,15 @@ on:
- '*'
paths:
- ".github/workflows/config-service-native-image.yaml"
- "Makefile"
- "pom.xml"
- "src/pom.xml"
- "src/apps/infrastructure/pom.xml"
- "src/apps/infrastructure/config/**"
pull_request:
paths:
- ".github/workflows/config-service-native-image.yaml"
- "Makefile"
- "pom.xml"
- "src/pom.xml"
- "src/apps/infrastructure/pom.xml"
Expand Down
14 changes: 7 additions & 7 deletions Makefile
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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

0 comments on commit 559b81e

Please sign in to comment.