Skip to content

Commit

Permalink
OpenSearch 2.8.0 + workflow to push image to Dockerhub
Browse files Browse the repository at this point in the history
Signed-off-by: Julien Nioche <julien.nioche@telicent.io>
  • Loading branch information
Julien Nioche committed Jul 5, 2023
1 parent aff1d51 commit 9aa8417
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 8 deletions.
15 changes: 13 additions & 2 deletions .github/workflows/dockerhub.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,9 @@
name: Publish Docker image

on:
release:
types: [published]
push:
tags:
- "*"

jobs:
push_to_registry:
Expand All @@ -21,6 +22,16 @@ jobs:
- name: Check out the repo
uses: actions/checkout@v3

- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'temurin'
cache: maven

- name: Build with Maven
run: mvn -B package --file pom.xml

- name: Log in to Docker Hub
uses: docker/login-action@f4ef78c080cd8ba55a85445d5b36e214a81df20a
with:
Expand Down
6 changes: 3 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
FROM opensearchproject/opensearch:latest
COPY target/releases/SynonymsPlugin-2.6.0.0.zip /tmp
RUN /usr/share/opensearch/bin/opensearch-plugin install --batch file:///tmp/SynonymsPlugin-2.6.0.0.zip
FROM opensearchproject/opensearch:2.8.0
COPY target/releases/SynonymsPlugin-2.8.0.0.zip /tmp
RUN /usr/share/opensearch/bin/opensearch-plugin install --batch file:///tmp/SynonymsPlugin-2.8.0.0.zip
4 changes: 2 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@
<modelVersion>4.0.0</modelVersion>
<groupId>io.telicent.opensearch</groupId>
<artifactId>SynonymsPlugin</artifactId>
<version>2.6.0.0</version>
<version>2.8.0.0</version>
<description>A plugin for OpenSearch providing an index-backed synonym
handler</description>
<properties>
<jdk.version>17</jdk.version>
<testcontainer.version>1.17.6</testcontainer.version>
<git-code-format-maven-plugin.version>4.2</git-code-format-maven-plugin.version>
<jackson.version>2.14.2</jackson.version>
<opensearch.version>2.6.0</opensearch.version>
<opensearch.version>2.8.0</opensearch.version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<build>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ private void setup(boolean security) throws Exception {
// https://github.com/opensearch-project/opensearch-testcontainers

String version = System.getProperty("opensearch-version");
if (version == null) version = "2.6.0";
if (version == null) version = "2.8.0";
LOG.info("Starting docker instance of OpenSearch {}...", version);

container = new OpensearchContainer("opensearchproject/opensearch:" + version);
Expand Down

0 comments on commit 9aa8417

Please sign in to comment.