Skip to content

Commit 1c221da

Browse files
authored
[RORDEV-962][RORDEV-964] ES 8.9.0 & 7.17.12 support (#927)
1 parent a1c7e31 commit 1c221da

File tree

179 files changed

+14199
-11
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

179 files changed

+14199
-11
lines changed

azure-pipelines.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,8 @@ stages:
121121
strategy:
122122
maxParallel: 99
123123
matrix:
124+
IT_es89x:
125+
ROR_TASK: integration_es89x
124126
IT_es88x:
125127
ROR_TASK: integration_es88x
126128
IT_es87x:
@@ -165,8 +167,8 @@ stages:
165167
strategy:
166168
maxParallel: 99
167169
matrix:
168-
IT_es88x:
169-
ROR_TASK: integration_es88x
170+
IT_es89x:
171+
ROR_TASK: integration_es89x
170172
IT_es80x:
171173
ROR_TASK: integration_es80x
172174
- job:

bin/build.sh

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,11 @@ if [[ -z $TRAVIS ]] || [[ $ROR_TASK == "core_tests" ]]; then
4040
./gradlew --stacktrace core:test
4141
fi
4242

43+
if [[ -z $TRAVIS ]] || [[ $ROR_TASK == "integration_es89x" ]]; then
44+
echo ">>> es89x => Running testcontainers.."
45+
./gradlew integration-tests:test '-PesModule=es89x' || ( find . |grep hs_err |xargs cat && exit 1 )
46+
fi
47+
4348
if [[ -z $TRAVIS ]] || [[ $ROR_TASK == "integration_es88x" ]]; then
4449
echo ">>> es88x => Running testcontainers.."
4550
./gradlew integration-tests:test '-PesModule=es88x' || ( find . |grep hs_err |xargs cat && exit 1 )
@@ -179,6 +184,9 @@ if [[ -z $TRAVIS ]] || [[ $ROR_TASK == "package_es8xx" ]]; then
179184

180185
echo ">>> ($0) additional builds of ES module for specified ES version"
181186

187+
#es89
188+
./gradlew --stacktrace es89x:ror '-PesVersion=8.9.0'
189+
182190
#es88
183191
./gradlew --stacktrace es88x:ror '-PesVersion=8.8.2'
184192
./gradlew --stacktrace es88x:ror '-PesVersion=8.8.1'
@@ -232,6 +240,7 @@ if [[ -z $TRAVIS ]] || [[ $ROR_TASK == "package_es7xx" ]]; then
232240
echo ">>> ($0) additional builds of ES module for specified ES version"
233241

234242
#es716x
243+
./gradlew --stacktrace es716x:ror '-PesVersion=7.17.12'
235244
./gradlew --stacktrace es716x:ror '-PesVersion=7.17.11'
236245
./gradlew --stacktrace es716x:ror '-PesVersion=7.17.10'
237246
./gradlew --stacktrace es716x:ror '-PesVersion=7.17.9'

bin/upload_es_artifacts.sh

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,10 @@ set -xe
44

55
echo ">>> ($0) UPLOADING ES ARTIFACTS ..."
66

7-
./gradlew --stacktrace --info clean ror-tools:uploadArtifactsFromEsBinaries -PesVersion=8.8.2
8-
./gradlew --stacktrace --info clean ror-tools:uploadArtifactsFromEsBinaries -PesVersion=8.8.1
9-
./gradlew --stacktrace --info clean ror-tools:uploadArtifactsFromEsBinaries -PesVersion=8.8.0
7+
./gradlew --stacktrace --info clean ror-tools:uploadArtifactsFromEsBinaries -PesVersion=8.9.0
8+
#./gradlew --stacktrace --info clean ror-tools:uploadArtifactsFromEsBinaries -PesVersion=8.8.2
9+
#./gradlew --stacktrace --info clean ror-tools:uploadArtifactsFromEsBinaries -PesVersion=8.8.1
10+
#./gradlew --stacktrace --info clean ror-tools:uploadArtifactsFromEsBinaries -PesVersion=8.8.0
1011
#./gradlew --stacktrace --info clean ror-tools:uploadArtifactsFromEsBinaries -PesVersion=8.7.1
1112
#./gradlew --stacktrace --info clean ror-tools:uploadArtifactsFromEsBinaries -PesVersion=8.7.0
1213
#./gradlew --stacktrace --info clean ror-tools:uploadArtifactsFromEsBinaries -PesVersion=8.6.2

es716x/gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
esVersion=7.17.11
1+
esVersion=7.17.12

es89x/build.gradle

Lines changed: 92 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,92 @@
1+
/*
2+
* This file is part of ReadonlyREST.
3+
*
4+
* ReadonlyREST is free software: you can redistribute it and/or modify
5+
* it under the terms of the GNU General Public License as published by
6+
* the Free Software Foundation, either version 3 of the License, or
7+
* (at your option) any later version.
8+
*
9+
* ReadonlyREST is distributed in the hope that it will be useful,
10+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
11+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12+
* GNU General Public License for more details.
13+
*
14+
* You should have received a copy of the GNU General Public License
15+
* along with ReadonlyREST. If not, see http://www.gnu.org/licenses/
16+
*/
17+
18+
plugins {
19+
id "readonlyrest.plugin-common-conventions"
20+
}
21+
22+
def pluginFullName = pluginName + '-' + version
23+
24+
compileScala {
25+
sourceCompatibility = 17
26+
targetCompatibility = 17
27+
}
28+
29+
dependencies {
30+
implementation project(path: ':core')
31+
implementation project(path: ':ror-tools', configuration: 'shadow')
32+
implementation project(path: ':ror-tools-core')
33+
implementation group: 'org.elasticsearch', name: 'elasticsearch' , version: esVersion
34+
implementation group: 'org.elasticsearch.client', name: 'elasticsearch-rest-client', version: esVersion
35+
implementation group: 'org.apache.httpcomponents', name: 'httpclient', version: '4.5.13'
36+
implementation group: 'org.apache.logging.log4j', name: 'log4j-core', version: '2.11.1'
37+
compileOnly group: 'org.locationtech.spatial4j', name: 'spatial4j', version: '0.7'
38+
// if you don't have this dependency in local maven, please run publishToMavenLocal task first
39+
compileOnly group: 'org.elasticsearch.plugin', name: 'transport-netty4', version: esVersion
40+
}
41+
42+
configurations {
43+
wagon
44+
distJars {
45+
exclude group: 'org.elasticsearch'
46+
exclude group: 'lucene-core'
47+
exclude module: 'log4j-api'
48+
exclude module: 'log4j-core'
49+
exclude group: 'lucene-analyzers-common'
50+
exclude group: 'org.apache.commons'
51+
exclude group: 'org.yaml'
52+
exclude group: 'com.fasterxml.jackson.core', module: 'jackson-core'
53+
}
54+
}
55+
56+
tasks.register('cleanOldData') {
57+
doLast {
58+
delete 'build/tmp/' + pluginFullName
59+
}
60+
}
61+
62+
tasks.register('jarHellCheck', JavaExec) {
63+
outputs.upToDateWhen { false }
64+
mainClass.set("org.elasticsearch.jdk.JarHell")
65+
classpath = project.sourceSets.main.compileClasspath.filter { it.exists() }
66+
}
67+
68+
tasks.register('resolvePluginDescriptorTemplate', Copy) {
69+
dependsOn configureEsVersion
70+
outputs.upToDateWhen { false }
71+
from './plugin-metadata'
72+
into 'build/tmp/' + pluginFullName
73+
expand([
74+
'descriptor': [
75+
'name' : pluginName,
76+
'pluginVersion': project.properties['pluginVersion'],
77+
'esVersion' : project.properties['esVersion']
78+
]
79+
])
80+
}
81+
82+
tasks.register('ror', Zip) {
83+
dependsOn(cleanOldData, jarHellCheck, toJar, resolvePluginDescriptorTemplate)
84+
outputs.upToDateWhen { false }
85+
archivesBaseName = pluginName
86+
into('.')
87+
{
88+
from configurations.distJars.filter { x -> !x.name.contains('spatial4j') && !x.name.contains('jts') }
89+
from 'build/libs/' + pluginFullName + '.jar'
90+
from 'build/tmp/' + pluginFullName
91+
}
92+
}

es89x/gradle.properties

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
esVersion=8.9.0
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
#
2+
# This file is part of ReadonlyREST.
3+
#
4+
# ReadonlyREST is free software: you can redistribute it and/or modify
5+
# it under the terms of the GNU General Public License as published by
6+
# the Free Software Foundation, either version 3 of the License, or
7+
# (at your option) any later version.
8+
#
9+
# ReadonlyREST is distributed in the hope that it will be useful,
10+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
11+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12+
# GNU General Public License for more details.
13+
#
14+
# You should have received a copy of the GNU General Public License
15+
# along with ReadonlyREST. If not, see http://www.gnu.org/licenses/
16+
#
17+
#
18+
# Elasticsearch plugin descriptor file
19+
# This file must exist as 'plugin-descriptor.properties' in a folder named `elasticsearch`
20+
# inside all plugins.
21+
#
22+
name=${descriptor.name}
23+
version=${descriptor.pluginVersion}
24+
description=Safely expose Elasticsearch REST API
25+
classname=tech.beshu.ror.es.ReadonlyRestPlugin
26+
java.version=1.8
27+
elasticsearch.version=${descriptor.esVersion}
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
grant {
2+
permission java.io.FilePermission "/usr/share/elasticsearch", "read";
3+
permission java.lang.reflect.ReflectPermission "suppressAccessChecks";
4+
permission java.lang.RuntimePermission "accessClassInPackage.sun.misc";
5+
permission java.lang.RuntimePermission "accessClassInPackage.sun.misc.*";
6+
permission java.lang.RuntimePermission "accessDeclaredMembers";
7+
permission java.lang.RuntimePermission "getClassLoader";
8+
permission java.lang.RuntimePermission "setContextClassLoader";
9+
permission java.net.SocketPermission "*", "accept, resolve, connect";
10+
permission java.security.SecurityPermission "insertProvider";
11+
permission java.security.SecurityPermission "putProviderProperty.BCFIPS";
12+
permission java.security.SecurityPermission "putProviderProperty.BCJSSE";
13+
permission java.util.PropertyPermission "*", "read,write";
14+
};

0 commit comments

Comments
 (0)