diff --git a/Dockerfile b/Dockerfile index 35ddc04..8d5aa75 100644 --- a/Dockerfile +++ b/Dockerfile @@ -22,7 +22,6 @@ RUN \ && [ -d "./geoserver" ] || (mkdir -p ./geoserver && unzip ./geoserver.war -d ./geoserver && rm ./geoserver.war) RUN apt-get update; apt-get upgrade --yes; apt-get install wget --yes -RUN wget https://downloads.sourceforge.net/project/libjpeg-turbo/1.5.3/libjpeg-turbo-official_1.5.3_amd64.deb && dpkg -i ./libjpeg*.deb && apt-get -f install WORKDIR /output/plugins ARG PLUG_IN_URLS="" diff --git a/custom_build.sh b/custom_build.sh index 3812fb4..ac3fdb6 100755 --- a/custom_build.sh +++ b/custom_build.sh @@ -156,9 +156,6 @@ function main { help ${ALL_PARAMETERS} download_geoserver "${GEOSERVER_VERSION}" clean_up_directory ${PLUGIN_ARTIFACT_DIRECTORY} - download_plugin ext monitor - download_plugin ext control-flow - download_plugin community sec-oauth2-geonode if [[ ${GEOSERVER_DATA_DIR_RELEASE} = "nodatadir" ]]; then build_without_data_dir "${TAG}" "${PULL}" diff --git a/docker-compose.test.yml b/docker-compose.test.yml new file mode 100644 index 0000000..a631f66 --- /dev/null +++ b/docker-compose.test.yml @@ -0,0 +1,9 @@ +version: "3.8" +services: + sut: + image: ${DOCKER_REPO}:$VERSION + command: /docker/tests/run_tests.sh + environment: + - SOURCE_BRANCH + ports: + - 8080:8080 diff --git a/hooks/build b/hooks/build index 312e0df..b6d52b1 100644 --- a/hooks/build +++ b/hooks/build @@ -1,6 +1,7 @@ #!/bin/bash -x -PLUG_IN_LIST="monitor control-flow libjpeg-turbo" +#PLUG_IN_LIST="monitor control-flow" +PLUG_IN_LIST="" NIGHTLY_MASTER_PLUG_IN_VERSION="2.$(expr $MIDDLE_STABLE + 1)-SNAPSHOT" NIGHTLY_STABLE_PLUG_IN_VERSION="2.$MIDDLE_STABLE-SNAPSHOT" NIGHTLY_MAINT_PLUG_IN_VERSION="2.$(expr $MIDDLE_STABLE - 1)-SNAPSHOT" @@ -51,5 +52,28 @@ for VERSION in $STABLE_VERSION $MAINT_VERSION; do --build-arg PLUG_IN_URLS="./resources/geoserver-plugins" \ -f "$DOCKERFILE_PATH" \ -t "${DOCKER_REPO}:$VERSION" . + if [ "$VERSION" == "$LATEST_VERSION" ]; then + docker tag "${DOCKER_REPO}:$VERSION" "${DOCKER_REPO}:latest" + fi rm -rf ./resources/geoserver-plugins/* done + +for VERSION in RC_VERSION; do + GEOSERVER_URL="https://netcologne.dl.sourceforge.net/project/geoserver/GeoServer/$VERSION/geoserver-$VERSION-war.zip" + mkdir -p ./resources/geoserver-plugins + for PLUG_IN_NAME in $PLUG_IN_LIST; do + echo $PLUG_IN_NAME + echo $VERSION + mkdir -p ./resources/geoserver-plugins + URL="https://netcologne.dl.sourceforge.net/project/geoserver/GeoServer/$VERSION/extensions/geoserver-$VERSION-$PLUG_IN_NAME-plugin.zip" + wget $URL -O ./resources/geoserver-plugins/geoserver-$PLUG_IN_VERSION-$PLUG_IN_NAME-plugin.zip + done + var=$(IFS=$'\ '; echo "${PLUG_IN_URLS[*]}" ) + docker build \ + --build-arg GEOSERVER_WEBAPP_SRC="$GEOSERVER_URL" \ + --build-arg PLUG_IN_URLS="./resources/geoserver-plugins" \ + -f "$DOCKERFILE_PATH" \ + -t "${DOCKER_REPO}:$VERSION" . + rm -rf ./resources/geoserver-plugins/* +done + diff --git a/hooks/push b/hooks/push index ba957ad..4334c3c 100644 --- a/hooks/push +++ b/hooks/push @@ -9,6 +9,15 @@ for NIGHTLY_VERSION in $NIGHTLY_MASTER_VERSION $NIGHTLY_STABLE_VERSION $NIGHTLY_ done for VERSION in $STABLE_VERSION $MAINT_VERSION; do + if [ "$(grep $VERSION /tmp/failed_versions)" == "" ]; then + docker push "${DOCKER_REPO}:$VERSION" + if [ "$VERSION" == "$LATEST_VERSION" ]; then + docker push "${DOCKER_REPO}:latest" + fi + fi +done + +for VERSION in $RC_VERSION; do if [ "$(grep $VERSION /tmp/failed_versions)" == "" ]; then docker push "${DOCKER_REPO}:$VERSION" fi diff --git a/hooks/test b/hooks/test old mode 100644 new mode 100755 index 60add2f..5a01433 --- a/hooks/test +++ b/hooks/test @@ -9,3 +9,7 @@ for VERSION in $STABLE_VERSION $MAINT_VERSION; do #export VERSION=$VERSION timeout 10m docker-compose -f docker-compose.test.yml run --rm sut || ( echo "test for docker image geoserver:$VERSION failed" && echo $VERSION >> /tmp/failed_versions ) done + +for VERSION in $RC_VERSION; do + timeout 10m docker-compose -f docker-compose.test.yml run --rm sut || ( echo "test for docker image geoserver:$VERSION failed" && echo $VERSION >> /tmp/failed_versions ) +done diff --git a/resources/geoserver-plugins/geoserver-2.18-SNAPSHOT-sec-oauth2-geonode-plugin.zip b/resources/geoserver-plugins/geoserver-2.18-SNAPSHOT-sec-oauth2-geonode-plugin.zip new file mode 100644 index 0000000..83c7735 Binary files /dev/null and b/resources/geoserver-plugins/geoserver-2.18-SNAPSHOT-sec-oauth2-geonode-plugin.zip differ diff --git a/resources/geoserver-plugins/geoserver-2.18.1-control-flow-plugin.zip b/resources/geoserver-plugins/geoserver-2.18.1-control-flow-plugin.zip new file mode 100644 index 0000000..2497270 Binary files /dev/null and b/resources/geoserver-plugins/geoserver-2.18.1-control-flow-plugin.zip differ diff --git a/resources/geoserver-plugins/geoserver-2.18.1-monitor-plugin.zip b/resources/geoserver-plugins/geoserver-2.18.1-monitor-plugin.zip new file mode 100644 index 0000000..c20bbe9 Binary files /dev/null and b/resources/geoserver-plugins/geoserver-2.18.1-monitor-plugin.zip differ