Skip to content

Commit

Permalink
Parameterize the docker "repository" for the dev compose
Browse files Browse the repository at this point in the history
  • Loading branch information
groldan committed Oct 15, 2024
1 parent f1f7c7b commit 88dbc42
Show file tree
Hide file tree
Showing 17 changed files with 48 additions and 15 deletions.
9 changes: 6 additions & 3 deletions .github/workflows/pull-request.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,8 @@ jobs:
- name: Test
run: |
# `make test` runs mvn verify, which includes mvn package, so no need to run `package` separatedly for the upload step below
make test
#make test
make package
- name: Upload application jar files
uses: actions/upload-artifact@v4
Expand Down Expand Up @@ -91,17 +92,19 @@ jobs:
run: REPACKAGE=false make build-image

- name: Install CI dependencies
id: install-ci
run: python3 -m pip install --user --requirement=ci/requirements.txt

- name: Run acceptance tests ${{ matrix.catalog }}
id: acceptance
run: |
make acceptance-tests-${{ matrix.catalog }}
- name: Print docker compose logs
if: always()
if: steps.build.install-ci == 'success'
run: (cd compose && c2cciutils-docker-logs)

- name: Cleanup acceptance tests
if: always()
if: steps.build.acceptance != 'skipped'
run: |
make clean-acceptance-tests-${{ matrix.catalog }}
3 changes: 3 additions & 0 deletions compose/.env
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
# docker-compose default environment variable values
REPOSITORY=geoservercloud
TAG=1.9-SNAPSHOT
ACL_REPOSITORY=geoservercloud
ACL_TAG=2.3.1

GS_USER="1000:1000"
GATEWAY_SHARED_AUTH=true

Expand Down
22 changes: 11 additions & 11 deletions compose/compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ x-gs-dependencies: &gs-dependencies
services:

acl:
image: geoservercloud/geoserver-acl:${ACL_TAG}
image: ${ACL_REPOSITORY}/geoserver-acl:${ACL_TAG}
environment:
# Override default values in the container's /etc/geoserver/acl-service.yml
- PG_HOST=acldb
Expand Down Expand Up @@ -65,7 +65,7 @@ services:
# microservices. Being a Discovery First Bootstrap configuration, it'll
# register itself with the Eureka discovery service and can be scaled
config:
image: geoservercloud/geoserver-cloud-config:${TAG}
image: ${REPOSITORY}/geoserver-cloud-config:${TAG}
user: ${GS_USER}
environment:
JAVA_OPTS: "${JAVA_OPTS_CONFIG}"
Expand All @@ -90,7 +90,7 @@ services:
# The discovery service is the only fixed entry point.
# Browse to http://localhost:8761 to check all services are registered.
discovery:
image: geoservercloud/geoserver-cloud-discovery:${TAG}
image: ${REPOSITORY}/geoserver-cloud-discovery:${TAG}
user: ${GS_USER}
environment:
JAVA_OPTS: "${JAVA_OPTS_DISCOVERY}"
Expand All @@ -109,7 +109,7 @@ services:
# Application facade, provides a single entry point routing to all
# microservices (e.g. http://localhost:9090/geoserver/wms, http://localhost:9090/geoserver/wfs, etc)
gateway:
image: geoservercloud/geoserver-cloud-gateway:${TAG}
image: ${REPOSITORY}/geoserver-cloud-gateway:${TAG}
user: ${GS_USER}
depends_on:
discovery:
Expand All @@ -132,13 +132,13 @@ services:
extends:
file: templates.yml
service: gstemplate
image: geoservercloud/geoserver-cloud-wfs:${TAG}
image: ${REPOSITORY}/geoserver-cloud-wfs:${TAG}
environment:
JAVA_OPTS: "${JAVA_OPTS_WFS}"
depends_on: *gs-dependencies

wms:
image: geoservercloud/geoserver-cloud-wms:${TAG}
image: ${REPOSITORY}/geoserver-cloud-wms:${TAG}
extends:
file: templates.yml
service: gstemplate
Expand All @@ -150,7 +150,7 @@ services:
extends:
file: templates.yml
service: gstemplate
image: geoservercloud/geoserver-cloud-wcs:${TAG}
image: ${REPOSITORY}/geoserver-cloud-wcs:${TAG}
environment:
JAVA_OPTS: "${JAVA_OPTS_WCS}"
depends_on: *gs-dependencies
Expand All @@ -159,7 +159,7 @@ services:
extends:
file: templates.yml
service: gstemplate
image: geoservercloud/geoserver-cloud-wps:${TAG}
image: ${REPOSITORY}/geoserver-cloud-wps:${TAG}
environment:
JAVA_OPTS: "${JAVA_OPTS_WPS}"
depends_on: *gs-dependencies
Expand All @@ -168,7 +168,7 @@ services:
extends:
file: templates.yml
service: gstemplate
image: geoservercloud/geoserver-cloud-gwc:${TAG}
image: ${REPOSITORY}/geoserver-cloud-gwc:${TAG}
environment:
JAVA_OPTS: "${JAVA_OPTS_GWC}"
depends_on: *gs-dependencies
Expand All @@ -182,7 +182,7 @@ services:
extends:
file: templates.yml
service: gstemplate
image: geoservercloud/geoserver-cloud-rest:${TAG}
image: ${REPOSITORY}/geoserver-cloud-rest:${TAG}
environment:
JAVA_OPTS: "${JAVA_OPTS_REST}"
depends_on: *gs-dependencies
Expand All @@ -191,7 +191,7 @@ services:
extends:
file: templates.yml
service: gstemplate
image: geoservercloud/geoserver-cloud-webui:${TAG}
image: ${REPOSITORY}/geoserver-cloud-webui:${TAG}
environment:
JAVA_OPTS: "${JAVA_OPTS_WEBUI}"
depends_on: *gs-dependencies
Expand Down
2 changes: 1 addition & 1 deletion compose/infra.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ services:
retries: 3

admin:
image: geoservercloud/geoserver-cloud-admin-server:${TAG}
image: ${REPOSITORY}/geoserver-cloud-admin-server:${TAG}
user: ${GS_USER}
depends_on:
discovery:
Expand Down
1 change: 1 addition & 0 deletions docker-build/base-images.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ services:
service: current-platform
image: ${REPOSITORY}/gs-cloud-base-jre:${TAG}
build:
pull: true
context: ../src/apps/base-images/jre/

spring-boot:
Expand Down
4 changes: 4 additions & 0 deletions src/apps/base-images/spring-boot/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,11 @@ EXPOSE 8080
EXPOSE 8081

COPY --from=builder dependencies/ ./
#see https://github.com/moby/moby/issues/37965
RUN true
COPY --from=builder snapshot-dependencies/ ./
#see https://github.com/moby/moby/issues/37965
RUN true
COPY --from=builder spring-boot-loader/ ./

HEALTHCHECK \
Expand Down
2 changes: 2 additions & 0 deletions src/apps/geoserver/gwc/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,6 @@ FROM $REPOSITORY/gs-cloud-base-geoserver-image:$TAG
COPY --from=builder dependencies/ ./
COPY --from=builder snapshot-dependencies/ ./
COPY --from=builder spring-boot-loader/ ./
#see https://github.com/moby/moby/issues/37965
RUN true
COPY --from=builder application/ ./
2 changes: 2 additions & 0 deletions src/apps/geoserver/restconfig/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,6 @@ FROM $REPOSITORY/gs-cloud-base-geoserver-image:$TAG
COPY --from=builder dependencies/ ./
COPY --from=builder snapshot-dependencies/ ./
COPY --from=builder spring-boot-loader/ ./
#see https://github.com/moby/moby/issues/37965
RUN true
COPY --from=builder application/ ./
2 changes: 2 additions & 0 deletions src/apps/geoserver/wcs/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,6 @@ FROM $REPOSITORY/gs-cloud-base-geoserver-image:$TAG
COPY --from=builder dependencies/ ./
COPY --from=builder snapshot-dependencies/ ./
COPY --from=builder spring-boot-loader/ ./
#see https://github.com/moby/moby/issues/37965
RUN true
COPY --from=builder application/ ./
2 changes: 2 additions & 0 deletions src/apps/geoserver/webui/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,6 @@ FROM $REPOSITORY/gs-cloud-base-geoserver-image:$TAG
COPY --from=builder dependencies/ ./
COPY --from=builder snapshot-dependencies/ ./
COPY --from=builder spring-boot-loader/ ./
#see https://github.com/moby/moby/issues/37965
RUN true
COPY --from=builder application/ ./
2 changes: 2 additions & 0 deletions src/apps/geoserver/wfs/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,6 @@ FROM $REPOSITORY/gs-cloud-base-geoserver-image:$TAG
COPY --from=builder dependencies/ ./
COPY --from=builder snapshot-dependencies/ ./
COPY --from=builder spring-boot-loader/ ./
#see https://github.com/moby/moby/issues/37965
RUN true
COPY --from=builder application/ ./
2 changes: 2 additions & 0 deletions src/apps/geoserver/wms/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,6 @@ FROM $REPOSITORY/gs-cloud-base-geoserver-image:$TAG
COPY --from=builder dependencies/ ./
COPY --from=builder snapshot-dependencies/ ./
COPY --from=builder spring-boot-loader/ ./
#see https://github.com/moby/moby/issues/37965
RUN true
COPY --from=builder application/ ./
2 changes: 2 additions & 0 deletions src/apps/geoserver/wps/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,6 @@ FROM $REPOSITORY/gs-cloud-base-geoserver-image:$TAG
COPY --from=builder dependencies/ ./
COPY --from=builder snapshot-dependencies/ ./
COPY --from=builder spring-boot-loader/ ./
#see https://github.com/moby/moby/issues/37965
RUN true
COPY --from=builder application/ ./
2 changes: 2 additions & 0 deletions src/apps/infrastructure/admin/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ FROM $REPOSITORY/gs-cloud-base-spring-boot:$TAG
COPY --from=builder dependencies/ ./
COPY --from=builder snapshot-dependencies/ ./
COPY --from=builder spring-boot-loader/ ./
#see https://github.com/moby/moby/issues/37965
RUN true
COPY --from=builder application/ ./

HEALTHCHECK \
Expand Down
2 changes: 2 additions & 0 deletions src/apps/infrastructure/config/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ FROM $REPOSITORY/gs-cloud-base-spring-boot:$TAG
COPY --from=builder dependencies/ ./
COPY --from=builder snapshot-dependencies/ ./
COPY --from=builder spring-boot-loader/ ./
#see https://github.com/moby/moby/issues/37965
RUN true
COPY --from=builder application/ ./

# Where jgit will try to create a .config directory
Expand Down
2 changes: 2 additions & 0 deletions src/apps/infrastructure/discovery/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,6 @@ FROM $REPOSITORY/gs-cloud-base-spring-boot:$TAG
COPY --from=builder dependencies/ ./
COPY --from=builder snapshot-dependencies/ ./
COPY --from=builder spring-boot-loader/ ./
#see https://github.com/moby/moby/issues/37965
RUN true
COPY --from=builder application/ ./
2 changes: 2 additions & 0 deletions src/apps/infrastructure/gateway/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,6 @@ FROM $REPOSITORY/gs-cloud-base-spring-boot:$TAG
COPY --from=builder dependencies/ ./
COPY --from=builder snapshot-dependencies/ ./
COPY --from=builder spring-boot-loader/ ./
#see https://github.com/moby/moby/issues/37965
RUN true
COPY --from=builder application/ ./

0 comments on commit 88dbc42

Please sign in to comment.