diff --git a/ci/lint_helm.sh b/ci/lint_helm.sh deleted file mode 100755 index b884033bd04c94ab96c4a5c5782f3b734b44c1b6..0000000000000000000000000000000000000000 --- a/ci/lint_helm.sh +++ /dev/null @@ -1,11 +0,0 @@ -#!/usr/bin/env bash -# Usage: lint_helm.sh -echo "Linting helm chart with no additional values" -set -e -helm lint geosphere-mapserver -# need to copy yaml files here so helm docker alias can find them (in PWD) -cp ../ci/*.yaml . -for fn in test-*.yaml; do - echo "Linting helm chart with ${fn}" - helm lint -f ${fn} geosphere-mapserver -done diff --git a/ci/test_mapserver_image.sh b/ci/test_mapserver_image.sh index f0a524f61e528510575a4f6b1e1ec835e4bf1583..d603c5d12d6bc603c4f2bb5bf7adaa4b4a849403 100755 --- a/ci/test_mapserver_image.sh +++ b/ci/test_mapserver_image.sh @@ -34,7 +34,16 @@ docker run --rm -d --name test -e POSTGRES_HOST=localhost -e POSTGRES_PASSWORD_F # just wait a bit to let the server start sleep 2 debug "Container started. Starting curl basic request..." -curl --max-time 5 "http://localhost:8888/" >/dev/null || exit_status=1 +curl --fail -sS --max-time 5 "http://localhost:8888/" >/dev/null || exit_status=1 + +debug "Creating fake shapefile directory for C01" +docker exec test mkdir -p /data/tiles/g16/abi/radf/C01 +debug "Creating fake shapefile file for C01" +docker exec test python3 -c "import fiona; fiona.open('/data/tiles/g16/abi/radf/C01/C01.shp', 'w', driver='ESRI Shapefile', schema={'geometry': 'Polygon', 'properties': {'location': 'str', 'time': 'str:19'}})" +debug "Starting curl basic mapfile request..." +# NOTE: The time doesn't actually exist and no image data is available. A blank image should be returned +curl --fail -sS --max-time 5 "http://localhost:8888/wms/g16/abi/radf/l1b?VERSION=1.1.1&REQUEST=GetMap&SERVICE=WMS&STYLES=&BBOX=-1330667.479176%2c-2773559.926648%2c2773559.926648%2c1330667.479176&WIDTH=256&HEIGHT=256&FORMAT=rgba&SRS=EPSG%3a930916&LAYERS=C01&TIME=2022-04-20T16:00:21Z" >/dev/null || exit_status=1 + debug "Curl complete. Killing docker container..." docker kill test debug "Done killing docker container." diff --git a/mapserver/Dockerfile b/mapserver/Dockerfile index da386a09df0380ea73755a610cb28c19d2113416..21679ee066dd677537baad51155e0896e2d04188 100644 --- a/mapserver/Dockerfile +++ b/mapserver/Dockerfile @@ -95,7 +95,7 @@ RUN cd /build_deps \ && git clone https://github.com/mapserver/mapserver.git && cd mapserver \ && git checkout rel-7-6-4 \ && mkdir -p build && cd build \ - && cmake .. -DWITH_GIF=OFF -DWITH_HARFBUZZ=OFF -DWITH_PROTOBUFC=OFF -DWITH_FRIBIDI=OFF -DWITH_POSTGIS=ON -DWITH_GEOS=OFF -DWITH_FCGI=OFF -DWITH_CAIRO=OFF \ + && cmake .. -DWITH_GIF=OFF -DWITH_HARFBUZZ=OFF -DWITH_PROTOBUFC=OFF -DWITH_FRIBIDI=OFF -DWITH_POSTGIS=ON -DWITH_GEOS=OFF -DWITH_FCGI=ON -DWITH_CAIRO=OFF \ && make -j$(nproc) \ && make install @@ -177,7 +177,7 @@ COPY html/ /var/www/html/ # GOES-16 ABI Full Disk = EPSG:930916 # GOES-17 ABI Full Disk = EPSG:930917 COPY sql/ /work/sql/ -RUN sqlite3 -init /work/sql/goesr_crs.sql /usr/local/share/proj/proj.db +RUN sqlite3 -bail /usr/local/share/proj/proj.db < /work/sql/goesr_crs.sql # Check the config before we finish RUN apache2ctl configtest diff --git a/mapserver/sql/goesr_crs.sql b/mapserver/sql/goesr_crs.sql index 0cbf495a70ae4aa8f38bd1da6fc4c3a9cd036e3e..e9df427a2c881bf22dc7d4684894a583311d4d38 100644 --- a/mapserver/sql/goesr_crs.sql +++ b/mapserver/sql/goesr_crs.sql @@ -1,2 +1,2 @@ -INSERT INTO projected_crs (auth_name, code, name, description, scope, coordinate_system_auth_name, coordinate_system_code, geodetic_crs_auth_name, geodetic_crs_code, conversion_auth_name, conversion_code, area_of_use_auth_name, area_of_use_code, text_definition, deprecated) VALUES ('EPSG', '930917', 'GOES-17 ABI Fixed Grid', 'GOES-17 (GOES-WEST) ABI Fixed Grid in the Geostationary projection', null, null, null, 'EPSG', '4269', null, null, null, null, 'PROJCRS["GOES-17 ABI Fixed Grid",BASEGEOGCRS["GOES-17 ABI Fixed Grid",DATUM["North American Datum 1983",ELLIPSOID["GRS 1980",6378137,298.257222101,LENGTHUNIT["metre",1]],ID["EPSG",6269]],PRIMEM["Greenwich",0,ANGLEUNIT["degree",0.0174532925199433],ID["EPSG",8901]]],CONVERSION["unknown",METHOD["Geostationary Satellite (Sweep X)"],PARAMETER["Longitude of natural origin",-137,ANGLEUNIT["degree",0.0174532925199433],ID["EPSG",8802]],PARAMETER["Satellite Height",35786023,LENGTHUNIT["metre",1,ID["EPSG",9001]]],PARAMETER["False easting",0,LENGTHUNIT["metre",1],ID["EPSG",8806]],PARAMETER["False northing",0,LENGTHUNIT["metre",1],ID["EPSG",8807]]],CS[Cartesian,2],AXIS["(E)",east,ORDER[1],LENGTHUNIT["metre",1,ID["EPSG",9001]]],AXIS["(N)",north,ORDER[2],LENGTHUNIT["metre",1,ID["EPSG",9001]]]]', 0); -INSERT INTO projected_crs (auth_name, code, name, description, scope, coordinate_system_auth_name, coordinate_system_code, geodetic_crs_auth_name, geodetic_crs_code, conversion_auth_name, conversion_code, area_of_use_auth_name, area_of_use_code, text_definition, deprecated) VALUES ('EPSG', '930916', 'GOES-16 ABI Fixed Grid', 'GOES-16 (GOES-WEST) ABI Fixed Grid in the Geostationary projection', null, null, null, 'EPSG', '4269', null, null, null, null, 'PROJCRS["GOES-16 ABI Fixed Grid",BASEGEOGCRS["GOES-16 ABI Fixed Grid",DATUM["North American Datum 1983",ELLIPSOID["GRS 1980",6378137,298.257222101,LENGTHUNIT["metre",1]],ID["EPSG",6269]],PRIMEM["Greenwich",0,ANGLEUNIT["degree",0.0174532925199433],ID["EPSG",8901]]],CONVERSION["unknown",METHOD["Geostationary Satellite (Sweep X)"],PARAMETER["Longitude of natural origin",-75,ANGLEUNIT["degree",0.0174532925199433],ID["EPSG",8802]],PARAMETER["Satellite Height",35786023,LENGTHUNIT["metre",1,ID["EPSG",9001]]],PARAMETER["False easting",0,LENGTHUNIT["metre",1],ID["EPSG",8806]],PARAMETER["False northing",0,LENGTHUNIT["metre",1],ID["EPSG",8807]]],CS[Cartesian,2],AXIS["(E)",east,ORDER[1],LENGTHUNIT["metre",1,ID["EPSG",9001]]],AXIS["(N)",north,ORDER[2],LENGTHUNIT["metre",1,ID["EPSG",9001]]]]', 0); \ No newline at end of file +INSERT INTO projected_crs (auth_name, code, name, description, coordinate_system_auth_name, coordinate_system_code, geodetic_crs_auth_name, geodetic_crs_code, conversion_auth_name, conversion_code, text_definition, deprecated) VALUES ('EPSG', '930917', 'GOES-17 ABI Fixed Grid', 'GOES-17 (GOES-WEST) ABI Fixed Grid in the Geostationary projection', null, null, 'EPSG', '4269', null, null, 'PROJCRS["GOES-17 ABI Fixed Grid",BASEGEOGCRS["GOES-17 ABI Fixed Grid",DATUM["North American Datum 1983",ELLIPSOID["GRS 1980",6378137,298.257222101,LENGTHUNIT["metre",1]],ID["EPSG",6269]],PRIMEM["Greenwich",0,ANGLEUNIT["degree",0.0174532925199433],ID["EPSG",8901]]],CONVERSION["unknown",METHOD["Geostationary Satellite (Sweep X)"],PARAMETER["Longitude of natural origin",-137,ANGLEUNIT["degree",0.0174532925199433],ID["EPSG",8802]],PARAMETER["Satellite Height",35786023,LENGTHUNIT["metre",1,ID["EPSG",9001]]],PARAMETER["False easting",0,LENGTHUNIT["metre",1],ID["EPSG",8806]],PARAMETER["False northing",0,LENGTHUNIT["metre",1],ID["EPSG",8807]]],CS[Cartesian,2],AXIS["(E)",east,ORDER[1],LENGTHUNIT["metre",1,ID["EPSG",9001]]],AXIS["(N)",north,ORDER[2],LENGTHUNIT["metre",1,ID["EPSG",9001]]]]', 0); +INSERT INTO projected_crs (auth_name, code, name, description, coordinate_system_auth_name, coordinate_system_code, geodetic_crs_auth_name, geodetic_crs_code, conversion_auth_name, conversion_code, text_definition, deprecated) VALUES ('EPSG', '930916', 'GOES-16 ABI Fixed Grid', 'GOES-16 (GOES-WEST) ABI Fixed Grid in the Geostationary projection', null, null, 'EPSG', '4269', null, null, 'PROJCRS["GOES-16 ABI Fixed Grid",BASEGEOGCRS["GOES-16 ABI Fixed Grid",DATUM["North American Datum 1983",ELLIPSOID["GRS 1980",6378137,298.257222101,LENGTHUNIT["metre",1]],ID["EPSG",6269]],PRIMEM["Greenwich",0,ANGLEUNIT["degree",0.0174532925199433],ID["EPSG",8901]]],CONVERSION["unknown",METHOD["Geostationary Satellite (Sweep X)"],PARAMETER["Longitude of natural origin",-75,ANGLEUNIT["degree",0.0174532925199433],ID["EPSG",8802]],PARAMETER["Satellite Height",35786023,LENGTHUNIT["metre",1,ID["EPSG",9001]]],PARAMETER["False easting",0,LENGTHUNIT["metre",1],ID["EPSG",8806]],PARAMETER["False northing",0,LENGTHUNIT["metre",1],ID["EPSG",8807]]],CS[Cartesian,2],AXIS["(E)",east,ORDER[1],LENGTHUNIT["metre",1,ID["EPSG",9001]]],AXIS["(N)",north,ORDER[2],LENGTHUNIT["metre",1,ID["EPSG",9001]]]]', 0); \ No newline at end of file