-
Notifications
You must be signed in to change notification settings - Fork 79
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
12 changed files
with
177 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,144 @@ | ||
name: Build and Push multi-platform Docker images | ||
on: | ||
push: | ||
branches: | ||
- main | ||
- "release/**" | ||
- "docker/**" | ||
paths: | ||
- "Makefile" | ||
- "pom.xml" | ||
- ".github/workflows/build-and-push-images.yaml" | ||
- "config" | ||
- "src/**" | ||
tags: | ||
- '*' | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
base-jre: | ||
name: JRE 21 base image | ||
runs-on: ubuntu-latest | ||
if: | | ||
github.repository == 'geoserver/geoserver-cloud' | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
submodules: recursive | ||
- uses: actions/setup-java@v4 | ||
with: | ||
distribution: 'temurin' | ||
java-version: '21' | ||
cache: 'maven' | ||
- uses: docker/login-action@v3 | ||
with: | ||
username: ${{ secrets.DOCKER_HUB_USERNAME }} | ||
password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }} | ||
- uses: docker/setup-qemu-action@v3 | ||
- uses: docker/setup-buildx-action@v3 | ||
with: | ||
platforms: linux/amd64,linux/arm64 | ||
install: true # make buildx an alias for build | ||
- name: Build and push | ||
uses: docker/build-push-action@v6 | ||
with: | ||
platforms: linux/amd64,linux/arm64 | ||
push: true | ||
context: ./src/apps/base-images/jre | ||
tags: geoservercloud/jre:21 | ||
|
||
jre-gdal: | ||
name: GDAL-JNI base image | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 120 | ||
needs: base-jre | ||
if: | | ||
github.repository == 'geoserver/geoserver-cloud' | ||
&& (needs.base-jre.result == 'success' || needs.base-jre.result == 'skipped') | ||
&& false | ||
steps: | ||
- run: echo "TBD" | ||
|
||
infra: | ||
name: Infrastructure services | ||
runs-on: ubuntu-latest | ||
needs: base-jre | ||
if: | | ||
github.repository == 'geoserver/geoserver-cloud' | ||
&& (needs.base-jre.result == 'success' || needs.base-jre.result == 'skipped') | ||
&& false | ||
steps: | ||
- run: echo "TBD" | ||
|
||
geoserver: | ||
name: GeoServer services | ||
runs-on: ubuntu-latest | ||
needs: jre-gdal | ||
if: | | ||
github.repository == 'geoserver/geoserver-cloud' | ||
&& always() | ||
&& (needs.jre-gdal.result == 'success' || needs.jre-gdal.result == 'skipped') | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
include: | ||
- context: ./src/apps/base-images/geoserver | ||
image: geoservercloud/gs-cloud-base-geoserver-image | ||
- context: ./src/apps/geoserver/wms | ||
image: geoservercloud/geoserver-cloud-wms | ||
- context: ./src/apps/geoserver/wfs | ||
image: geoservercloud/geoserver-cloud-wfs | ||
- context: ./src/apps/geoserver/wcs | ||
image: geoservercloud/geoserver-cloud-wcs | ||
- context: ./src/apps/geoserver/wps | ||
image: geoservercloud/geoserver-cloud-wps | ||
- context: ./src/apps/geoserver/gwc | ||
image: geoservercloud/geoserver-cloud-gwc | ||
- context: ./src/apps/geoserver/restconfig | ||
image: geoservercloud/geoserver-cloud-rest | ||
- context: ./src/apps/geoserver/webui | ||
image: geoservercloud/geoserver-cloud-webui | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
with: | ||
submodules: recursive | ||
- name: Setup Java | ||
uses: actions/setup-java@v4 | ||
with: | ||
distribution: 'temurin' | ||
java-version: '21' | ||
cache: 'maven' | ||
- name: Login to Docker Hub | ||
uses: docker/login-action@v3 | ||
with: | ||
username: ${{ secrets.DOCKER_HUB_USERNAME }} | ||
password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }} | ||
- name: Set up QEMU | ||
uses: docker/setup-qemu-action@v3 | ||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v3 | ||
with: | ||
platforms: linux/amd64,linux/arm64 | ||
install: true # make buildx an alias for build | ||
|
||
- name: Create packaged applications | ||
run: | | ||
./mvnw clean package -DskipTests -U -ntp -T1C -am \ | ||
-pl :gs-cloud-base-geoserver-image,:gs-cloud-gwc,:gs-cloud-restconfig-v1,:gs-cloud-wcs,:gs-cloud-wfs,:gs-cloud-wms,:gs-cloud-wps,:gs-cloud-webui | ||
- name: Resolve tag for docker images | ||
run: echo "TAG=$(./mvnw help:evaluate -q -DforceStdout -Dexpression=project.version)" >> $GITHUB_ENV | ||
|
||
- name: Build and push GeoServer Docker image | ||
uses: docker/build-push-action@v6 | ||
with: | ||
platforms: linux/amd64,linux/arm64 | ||
context: ${{ matrix.context }} | ||
#file: | ||
push: true | ||
tags: ${{ matrix.image }}:${{ env.TAG }} | ||
#labels: ${{ steps.meta.outputs.labels }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters