diff --git a/.github/workflows/cite.yml b/.github/workflows/cite.yml index 761091b1778..60bb1bde9c2 100644 --- a/.github/workflows/cite.yml +++ b/.github/workflows/cite.yml @@ -69,20 +69,25 @@ jobs: name: geoserver-war path: build/cite/geoserver/ - - name: Build ogccite/geoserver:${{ matrix.suite }} docker image - working-directory: build/cite - run: make build suite=${{ matrix.suite }} - - name: Print services and images used for the ${{ matrix.suite }} test run # in case there's a jq syntax error continue-on-error: true working-directory: build/cite - run: make print-docker-compose-services suite=${{ matrix.suite }} + run: make print-services suite=${{ matrix.suite }} - name: Pull teamengine and other required images working-directory: build/cite + continue-on-error: true run: make pull suite=${{ matrix.suite }} + - name: Build ogccite/geoserver:${{ matrix.suite }} docker image + working-directory: build/cite + run: make build-geoserver-image suite=${{ matrix.suite }} + + - name: Build the ETS docker image + working-directory: build/cite + run: make build-ets-image suite=${{ matrix.suite }} + # optional, used to print out a human readable summary of test failures from the testng results xml - name: Install the optional xmlstarlet utility run: | diff --git a/build/cite/Makefile b/build/cite/Makefile index 3dd751cf79c..59989ddf23e 100644 --- a/build/cite/Makefile +++ b/build/cite/Makefile @@ -32,17 +32,42 @@ war: ## Build the geoserver.war file to use for testing and place it in ./g @$(MAKE) build-war @$(MAKE) copy-war +# calls build-ets-image and build-geoserver-image +# the CI job may call them independently for the sake of using separate job steps .PHONY: build build: ## suite= Build the GeoServer Docker Image for the Environment. ifndef suite @echo "Error: suite is not specified. Please specify the suite to build the GeoServer Docker image for." @$(MAKE) help @exit 1 +endif + @$(MAKE) build-ets-image + @$(MAKE) build-geoserver-image + +# preparing the geoserver image is performed with docker-compose build including $suite/compose-override.yml +.PHONY: build-geoserver-image +build-geoserver-image: +ifndef suite + @echo "Error: suite is not specified. Please specify the suite to build the GeoServer Docker image for." + @exit 1 endif @echo Building the GeoServer Docker Image for the $(suite) test suite @docker compose -f compose.yml -f ./$(suite)/compose.override.yml \ build --no-cache --build-arg SOURCE_FILE=${war_url} geoserver +# If there's a $suite/build-ets.sh file calls it, otherwise exists silently +.PHONY: build-ets-image +build-ets-image: +ifndef suite + @echo "Error: suite is not specified. Please specify the suite to build the GeoServer Docker image for." + @exit 1 +endif + @if [ -f "$(suite)/build-ets.sh" ]; then \ + (cd $(suite) && ./build-ets.sh); \ + else \ + echo "$(suite) has no special script to build the ETS docker image."; \ + fi + .PHONY: test test: ## suite= Run the Test Suite with teamengine and GeoServer on docker compose. ifndef suite @@ -282,7 +307,7 @@ print-logs: # Used in CI/CD to print which services and images are going to be run # Requires `jq`, comes pre-installed in github actions `ubuntu-latest` -.PHONY: print-docker-compose-services +.PHONY: print-services print-services: ### suite= Print the service names and docker images used for a given suite ifndef suite @echo "Error: suite is not specified." diff --git a/build/cite/ogcapi-features10/.gitignore b/build/cite/ogcapi-features10/.gitignore new file mode 100644 index 00000000000..00aec50086b --- /dev/null +++ b/build/cite/ogcapi-features10/.gitignore @@ -0,0 +1 @@ +ets-ogcapi-features10 diff --git a/build/cite/ogcapi-features10/build-ets.sh b/build/cite/ogcapi-features10/build-ets.sh new file mode 100755 index 00000000000..788f8682be1 --- /dev/null +++ b/build/cite/ogcapi-features10/build-ets.sh @@ -0,0 +1,13 @@ +#!/bin/sh + +# build the ets-ogcapi-features10 Docker image from the +# (at the time of writing, ogccite/ets-ogcapi-features10:1.8-SNAPSHOT-teamengine-5.4.1) +# from the geoserver's fork `geoserver/integration` branch, which applies +# patches to the ets that have not yet being released upstream + +echo "Building the ogccite/ets-ogcapi-features10 docker image from the geoserver/integration branch" +rm -rf ets-ogcapi-features10 +git clone https://github.com/geoserver/ets-ogcapi-features10.git +cd ets-ogcapi-features10 +git checkout geoserver/integration && mvn clean install -Pdocker -DskipTests -ntp +cd .. diff --git a/build/cite/ogcapi-features10/compose.override.yml b/build/cite/ogcapi-features10/compose.override.yml index 47780d79d1b..4ae3e5e3792 100644 --- a/build/cite/ogcapi-features10/compose.override.yml +++ b/build/cite/ogcapi-features10/compose.override.yml @@ -12,7 +12,8 @@ services: # see https://github.com/opengeospatial/teamengine-docker # there's ogccite/teamengine-production and ogccite/teamengine-beta # that we could use to migrate the other OWS tests to newer teamengine images - image: ogccite/ets-ogcapi-features10:1.7.1-teamengine-5.4.1 + # image: ogccite/ets-ogcapi-features10:1.7.1-teamengine-5.4.1 + image: ogccite/ets-ogcapi-features10:1.8-SNAPSHOT-teamengine-5.4.1 healthcheck: test: "curl -f http://localhost:8080/teamengine/ || exit 1" interval: 15s