-
Notifications
You must be signed in to change notification settings - Fork 202
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
GitHub-issue#253 : Implemented download maxmind test mmdb files to re… #3193
GitHub-issue#253 : Implemented download maxmind test mmdb files to re… #3193
Conversation
…source folder Signed-off-by: venkataraopasyavula <[email protected]>
…source folder Signed-off-by: venkataraopasyavula <[email protected]>
@@ -25,6 +31,73 @@ dependencies { | |||
testImplementation project(':data-prepper-test-common') | |||
} | |||
|
|||
task copyGeoLite2Files(type: Copy) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Rather than use a Copy
task, you can use a Download
task.
See this example:
data-prepper/release/archives/build.gradle
Lines 77 to 81 in 733e7bc
tasks.create("${downloadJDKTask}", Download, { | |
src jdkSources.get(platform + '_' + architecture) | |
dest "${buildDir}/${platform}${architecture}/openjdk/openjdk.tar.gz" | |
overwrite false | |
}) |
The download plugin will help:
id 'de.undercouch.download' version '4.1.2' apply false |
into(geoLite2Dir) | ||
|
||
doFirst { | ||
// Trust all certificates |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do you need to trust all? The GitHub certificate is valid.
For example, a simple download works just fine:
wget https://github.com/maxmind/MaxMind-DB/tree/main/test-data/GeoLite2-City-Test.mmdb
task copyGeoIP2File(type: Copy) { | ||
|
||
def urls = [ | ||
'https://github.com/maxmind/MaxMind-DB/tree/main/test-data/GeoIP2-Enterprise-Test.mmdb' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This file is still checked in. Let's remove this too.
Raised another PR - 3373 for downloading test mmdb's from maxmind to resources folder |
Description
Implemented downlaod maxmind test mmdb files to resource folder
Issues Resolved
GitHub-issue #253
Check List
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.