Skip to content
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

No jira updating for es 8.15.0 #45

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
*~
**/.DS_Store
**/.idea/*
**/.vscode/*
docker/bin/**
**/*.zip
*.iml
target/
pom.xml.tag
Expand Down
3 changes: 1 addition & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@ language: java
script: mvn -B install

jdk:
- openjdk8
- openjdk11
- openjdk17

services:
- docker
Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Fork, then clone the repo:

Set up your environment:

- Java 8
- Java 17
- Maven
- Get a [Rosette API key](https://developer.rosette.com/signup) if you don't have one
- export ROSETTE_API_KEY="\<your key\>"
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ There are two common ways to install the plugin into Elasticsearch. (Make sure t
#### Note on Versioning:
The plugin uses semantic versioning. The first three numbers describe which version of Elasticsearch this version of the plugin is compatible with, and the last number indicates the version of the plugin within that Elasticsearch version.

For instance, `5.3.0.1` is the second patch version of the plugin for Elasticsearch 5.3.0.
For instance, `8.15.0.1` is the second patch version of the plugin for Elasticsearch 8.15.0.

## How to Build
Building the plugin requires a Rosette API key. If you don’t already have a Rosette API developer account, head over to [developer.rosette.com](https://developer.rosette.com/signup) to get your free Rosette API key.
Expand Down
2 changes: 2 additions & 0 deletions docker/.gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
Dockerfile
plugins
*.zip
*.iml
11 changes: 2 additions & 9 deletions docker/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,13 @@ Testing the plugin
`mvn clean install` from the top level directory first, then:

```
cd docker
mvn docker:build
ROSETTE_API_KEY=<blah> mvn docker:run

<wait for it to fully start>
<look in the logs for the local port docker chose to map to (ie. 'Waiting on url http://localhost:32769')
<pass that port as an argument to the test script>

./test.sh <docker_port>
./test.sh localhost:<docker_port>
```
==================

There is a known issue where the docker container logs an error message for unknown reasons:
```
[ERROR] DOCKER> Cannot process chunk response: java.io.IOException: Bad file descriptor
```
This can be ignored.

171 changes: 64 additions & 107 deletions docker/pom.xml
Original file line number Diff line number Diff line change
@@ -1,28 +1,26 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright 2021 Basis Technology Corp.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~ This data and information is proprietary to, and a valuable trade secret
~ of, Basis Technology Corp. It is given in confidence by Basis Technology
~ and may only be used as permitted under the license agreement under which
~ it has been distributed, and in no other way.
~
~ Copyright (c) 2024 Basis Technology Corporation All rights reserved.
~
~ The technical data and information provided herein are provided with
~ `limited rights', and the computer software provided herein is provided
~ with `restricted rights' as those terms are defined in DAR and ASPR
~ 7-104.9(a).
~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.rosette.elasticsearch</groupId>
<artifactId>rosette-elasticsearch-docker</artifactId>
<packaging>pom</packaging>
<parent>
<artifactId>rosette-elasticsearch-parent</artifactId>
<groupId>com.rosette.elasticsearch</groupId>
<version>7.17.0.1-SNAPSHOT</version>
<version>8.15.0.0-SNAPSHOT</version>
<relativePath>..</relativePath>
</parent>
<dependencies>
Expand All @@ -35,11 +33,41 @@
</dependencies>
<properties>
<curl.output>${project.build.directory}/curl-output.txt</curl.output>
<docker-maven-plugin.version>0.36.0</docker-maven-plugin.version>
<docker-maven-plugin.version>0.45.0</docker-maven-plugin.version>
<build-helper-maven-plugin.version>3.6.0</build-helper-maven-plugin.version>
</properties>
<build>
<defaultGoal>verify</defaultGoal>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
<version>${build-helper-maven-plugin.version}</version>
<executions>
<execution>
<id>get-local-ip</id>
<phase>pre-integration-test</phase>
<goals>
<goal>local-ip</goal>
</goals>
<configuration>
<localIpProperty>elastic.ip</localIpProperty>
</configuration>
</execution>
<execution>
<id>get-random-port</id>
<phase>pre-integration-test</phase>
<goals>
<goal>reserve-network-port</goal>
</goals>
<configuration>
<portNames>
<portName>server.port</portName>
</portNames>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>io.fabric8</groupId>
<artifactId>docker-maven-plugin</artifactId>
Expand All @@ -53,8 +81,9 @@
<name>basistechnologycorporation/rosette-elasticsearch</name>
<build>
<from>docker.elastic.co/elasticsearch/elasticsearch:${elasticsearch.version}</from>
<noCache>true</noCache>
<runCmds>
<run>find /plugins -name "*.zip" -exec /usr/share/elasticsearch/bin/elasticsearch-plugin install --batch file://{} \;</run>
<run>find /plugins -name "*.zip" -exec /usr/share/elasticsearch/bin/elasticsearch-plugin install --batch file://{} \;</run>
</runCmds>
<!-- Grap the plugin zip via dependencies -->
<assembly>
Expand All @@ -74,21 +103,28 @@
<run>
<wait>
<http>
<url>http://${host.ip}:${docker.port}</url>
<url>http://localhost:${server.port}</url>
<method>GET</method>
<status>200..399</status>
</http>
<time>60000</time>
<time>90000</time>
</wait>
<ports>
<!--ports>
<port>${docker.port}:9200</port>
</ports>
</ports-->
<env>
<ROSETTE_API_KEY>${env.ROSETTE_API_KEY}</ROSETTE_API_KEY>
<network.host>_local_</network.host>
<http.host>0.0.0.0</http.host>
<discovery.type>single-node</discovery.type>
<ES_JAVA_OPTS>-Xms4g -Xmx4g</ES_JAVA_OPTS>
<xpack.security.enabled>false</xpack.security.enabled>
</env>
<ports>
<port>${server.port}:9200</port>
</ports>
<log>
<prefix>elasticsearch</prefix>
<color>red</color>
</log>
</run>
</image>
</images>
Expand Down Expand Up @@ -116,99 +152,20 @@
<artifactId>exec-maven-plugin</artifactId>
<executions>
<execution>
<id>run_IT</id>
<id>Run Integration Test</id>
<goals>
<goal>exec</goal>
</goals>
<phase>integration-test</phase>
<configuration>
<executable>./test.sh</executable>
<arguments>
<argument>${host.ip}</argument>
<argument>${docker.port}</argument>
</arguments>
<outputFile>${curl.output}</outputFile>
</configuration>
</execution>
<execution>
<id>verify_IT_success</id>
<goals>
<goal>exec</goal>
</goals>
<phase>verify</phase>
<configuration>
<executable>./verify.sh</executable>
<executable>${project.basedir}/test.sh</executable>
<arguments>
<argument>${curl.output}</argument>
<argument>http://${elastic.ip}:${server.port}</argument>
</arguments>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
<profiles>
<profile>
<id>set-url-localhost</id>
<activation>
<property>
<name>!env.DOCKER_HOST</name>
</property>
</activation>
<build>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
<version>${build-helper-maven-plugin.version}</version>
<executions>
<execution>
<id>get-local-ip</id>
<phase>initialize</phase>
<goals>
<goal>local-ip</goal>
</goals>
<configuration>
<localIpProperty>host.ip</localIpProperty>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
<profile>
<id>set-url-from-docker-host</id>
<activation>
<property>
<name>env.DOCKER_HOST</name>
</property>
</activation>
<build>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
<version>${build-helper-maven-plugin.version}</version>
<executions>
<execution>
<phase>validate</phase>
<id>regex-property</id>
<goals>
<goal>regex-property</goal>
</goals>
<configuration>
<name>host.ip</name>
<value>${env.DOCKER_HOST}</value>
<regex>^tcp://(\d{1,3})\.(\d{1,3})\.(\d{1,3})\.(\d{1,3}):\d{1,5}$</regex>
<replacement>$1.$2.$3.$4</replacement>
<failIfNoMatch>true</failIfNoMatch>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles>
</project>
Loading