Skip to content

Commit a1fa28f

Browse files
committed
Merge remote-tracking branch 'upstream/master'
2 parents da0fcdd + 42e3e85 commit a1fa28f

3 files changed

Lines changed: 18 additions & 13 deletions

File tree

debian/ala-sensitive-data-service.postinst

Lines changed: 16 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -33,20 +33,26 @@ case "$1" in
3333
SPATIAL_URL_ESCAPED=$(printf '%s\n' "$SPATIAL_URL" | sed -e 's/[\/&]/\\&/g')
3434
sed -i "s/https\:\/\/spatial\.ala\.org\.au/$SPATIAL_URL_ESCAPED/" "$CONF"
3535

36-
echo "Downloading SDS configs..."
36+
echo "Downloading SDS configs..." >&2
3737
for DEST in sensitive-species-data.xml sensitivity-zones.xml sensitivity-categories.xml
3838
do
39-
curl -sL -o "/data/sds/$DEST" "$SDS_URL/$DEST"
39+
curl -sL -o "/data/sds/$DEST" "$SDS_URL/$DEST" || echo "Warning: Failed to download $SDS_URL/$DEST"
4040
done
41-
curl -sf -o /data/sds/layers.json -L "$SDS_URL/ws/layers"
4241

43-
echo "Downloading SDS layers..."
44-
curl -sf -o /data/biocache/layers/sds-layers.tgz -L $LAYERS_URL
42+
echo "Downloading SDS layers.json..." >&2
43+
curl -sf -o /data/sds/layers.json -L "$SDS_URL/ws/layers" || echo "Warning: Failed to download layers.json"
4544

46-
echo "Extracting SDS layers..."
47-
# SDS def ALA tgz is created with a MacOS tar
48-
# https://github.com/yarnpkg/yarn/issues/770
49-
tar --no-same-owner --warning=no-unknown-keyword -zxf /data/biocache/layers/sds-layers.tgz -C /data/biocache/layers/
45+
echo "Downloading SDS layers.tgz..." >&2
46+
curl -sf -o /data/biocache/layers/sds-layers.tgz -L "$LAYERS_URL" || echo "Warning: Failed to download SDS layers tgz"
47+
48+
if [ -f /data/biocache/layers/sds-layers.tgz ]; then
49+
echo "Extracting SDS layers.tgz..." >&2
50+
# SDS def ALA tgz is created with a MacOS tar
51+
# https://github.com/yarnpkg/yarn/issues/770
52+
tar --no-same-owner --warning=no-unknown-keyword -zxf /data/biocache/layers/sds-layers.tgz -C /data/biocache/layers/
53+
else
54+
echo "Warning: SDS layers tgz not found, skipping extraction"
55+
fi
5056

5157
chown -R sds-data:sds-data /opt/atlas/ala-sensitive-data-service
5258

@@ -58,4 +64,4 @@ case "$1" in
5864
;;
5965
esac
6066

61-
echo ala-sensitive-data-service installed
67+
echo ala-sensitive-data-service installed >&2

debian/control

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,7 @@ Vcs-Git: https://github.com/AtlasOfLivingAustralia/ala-sensitive-data-service.gi
1414

1515
Package: ala-sensitive-data-service
1616
Architecture: all
17-
Depends: ${misc:Depends}, openjdk-8-jdk, ca-certificates, tar (>= 1.0), curl,
18-
ala-namematching-service
17+
Depends: ${misc:Depends}, openjdk-8-jdk, ca-certificates, tar (>= 1.0), curl
1918
Suggests:
2019
Description: The ALA Sensitive Data Service application
2120
This package contains the ala-sensitive-data-service package from

debian/rules

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ override_dh_auto_build:
2020
ifeq ($(filter nobuildjar,$(DEB_BUILD_PROFILES)),)
2121
# This allows to skip the maven jar build (for instance, if its builded by another jenkins job)
2222
# for instance with debuild -us -uc -b --build-profiles=nobuildjar
23-
mvn -Dmaven.repo.local=$(M2_REPO) clean install -DskipTests=true
23+
mvn -pl ala-sensitive-data-server -am -Dmaven.repo.local=$(M2_REPO) clean install -DskipTests=true
2424
endif
2525

2626
override_dh_auto_install:

0 commit comments

Comments
 (0)