Skip to content
Snippets Groups Projects
Commit fac166b9 authored by Martin Lowe's avatar Martin Lowe :flag_ca:
Browse files

Merge branch 'malowe/master/curl-build-fix' into 'master'

Remove wildcard flags not present in busybox that crash the MM import

See merge request !26
parents 746d9124 47581412
Branches main
No related tags found
1 merge request!26Remove wildcard flags not present in busybox that crash the MM import
Pipeline #4483 passed
......@@ -118,14 +118,13 @@
readTrusted 'pom.xml'
withCredentials([string(credentialsId: 'maxmind-license-key', variable: 'MAXMIND_LICENSE_KEY')]) {
sh 'mkdir -p /tmp/maxmind && ./bin/maxmind.sh /tmp/maxmind'
sh 'mkdir -p ./maxmind && ./bin/maxmind.sh $PWD/maxmind'
}
sh 'make production-build'
stash includes: 'target/', name: 'target'
dir('/tmp') {
stash includes: 'maxmind/', name: 'maxmind'
}
stash includes: 'maxmind/**/*', name: 'maxmind'
}
}
}
......
......@@ -5,7 +5,7 @@ install: clean;
yarn install --frozen-lockfile
sh ./bin/maxmind.sh maxmind/
package: install;
mvn compile package -Declipse.maxmind.root=${PWD}/maxmind
mvn compile package
dirty-package:;
mvn compile package -Declipse.maxmind.root=${PWD}/maxmind
production-build:;
......
......@@ -31,11 +31,14 @@ fi
mkdir -p "${1}/bin"
mkdir -p "${1}/db"
pushd "${1:-"."}" || exit 1
MM_OUTPUT_DIR=${1}
(
cd "$MM_OUTPUT_DIR"
echo "Current directory: $(pwd)"
echo "Getting data from MaxMind"
curl -sSL "https://download.maxmind.com/app/geoip_download?edition_id=GeoLite2-City&suffix=tar.gz&license_key=$MAXMIND_LICENSE_KEY" | tar zxv -C bin --wildcards '*.mmdb'
curl -sSL "https://download.maxmind.com/app/geoip_download?edition_id=GeoLite2-Country&suffix=tar.gz&license_key=$MAXMIND_LICENSE_KEY" | tar zxv -C bin --wildcards '*.mmdb'
curl -sSL "https://download.maxmind.com/app/geoip_download?edition_id=GeoLite2-City&suffix=tar.gz&license_key=$MAXMIND_LICENSE_KEY" | tar zxv -C bin
curl -sSL "https://download.maxmind.com/app/geoip_download?edition_id=GeoLite2-Country&suffix=tar.gz&license_key=$MAXMIND_LICENSE_KEY" | tar zxv -C bin
curl -sSL "https://download.maxmind.com/app/geoip_download?edition_id=GeoLite2-Country-CSV&suffix=zip&license_key=$MAXMIND_LICENSE_KEY" -o GeoLite2-Country-CSV.zip
unzip GeoLite2-Country-CSV.zip
rm -vf GeoLite2-Country-CSV.zip
......@@ -52,4 +55,7 @@ mv -vf bin/GeoLite2-**/GeoLite2-C*.mmdb bin/
rm -rvf bin/GeoLite2-City_*
rm -rvf bin/GeoLite2-Country_*
popd || exit 1
echo "Final output to $(pwd):\n$(ls)"
echo "Final output to $(pwd)/db:\n$(ls db)"
echo "Final output to $(pwd)/bin:\n$(ls bin)"
)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment