Skip to content

Commit

Permalink
Merge pull request #235 from kit-data-manager/development
Browse files Browse the repository at this point in the history
PR for v1.0.2
  • Loading branch information
VolkerHartmann authored Nov 22, 2024
2 parents f0edb31 + b1fb2f9 commit a5e2933
Show file tree
Hide file tree
Showing 11 changed files with 106 additions and 66 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/docker-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ jobs:
# It uses the `context` parameter to define the build's context as the set of files located in the specified path. For more information, see "[Usage](https://github.com/docker/build-push-action#usage)" in the README of the `docker/build-push-action` repository.
# It uses the `tags` and `labels` parameters to tag and label the image with the output from the "meta" step.
- name: Build and push Docker image
uses: docker/build-push-action@v5
uses: docker/build-push-action@v6
with:
context: .
push: true
Expand Down Expand Up @@ -109,7 +109,7 @@ jobs:
# It uses the `context` parameter to define the build's context as the set of files located in the specified path. For more information, see "[Usage](https://github.com/docker/build-push-action#usage)" in the README of the `docker/build-push-action` repository.
# It uses the `tags` and `labels` parameters to tag and label the image with the output from the "meta" step.
- name: Build and push Docker image
uses: docker/build-push-action@v5
uses: docker/build-push-action@v6
with:
context: .
push: true
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/gradle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@ name: build

on:
push:
branches: [ master, main ]
branches: [ main ]
pull_request:
branches: [ master, main, development ]
branches: [ main, development ]

env:
# JDK version used for building jar file
currentBuildVersion: 17
currentBuildVersion: 21
jobs:
build:
runs-on: ${{ matrix.operating-system }}
Expand All @@ -20,7 +20,7 @@ jobs:
# operating-system: [ubuntu-latest, macOS-latest, windows-latest]
operating-system: [ubuntu-latest]
# Use both LTS releases and latest one for tests
jdk: [ 17, 19 ]
jdk: [ 21, 23 ]
steps:
- name: Checkout repo
uses: actions/checkout@v4
Expand Down Expand Up @@ -76,6 +76,6 @@ jobs:
- name: Build with Gradle (JDK ${{ env.currentBuildVersion }})
run: ./gradlew clean check jacocoTestReport
- name: Codecov
uses: codecov/codecov-action@v3
uses: codecov/codecov-action@v5
with:
files: ./build/reports/jacoco/test/jacocoTestReport.xml #optional
30 changes: 29 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,33 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Changed

## [1.0.2] - date 2024-11-22
### Changed
- Update python Docker tag to v3.13
- Upgrade to Java 21.
- Update dependency gradle to v8.11.1

### Libs
- Bump com.github.jknack:handlebars from 4.3.1 to 4.4.0
- Bump com.gorylenko.gradle-git-properties from 2.4.1 to 2.4.2
- Bump commons-codec:commons-codec from 1.16.0 to 1.16.1
- Update dependency edu.kit.datamanager:service-base to v1.3.2
- Update plugin io.freefair.lombok to v8.11
- Update plugin io.freefair.maven-publish-java to v8.11
- Update javersVersion to v7.7.0
- Update dependency org.apache.tika:tika-core to v3
- Bump org.asciidoctor.jvm.convert from 4.0.1 to 4.0.2
- Bump org.json:json from 20231013 to 20240205
- Bump org.mockito:mockito-core from 5.8.0 to 5.10.0
- Bump org.owasp.dependencycheck from 9.0.8 to 9.0.9
- Bump org.postgresql:postgresql from 42.7.1 to 42.7.3
- Update plugin org.springframework.boot to v3.3.6
- Bump org.springframework.data:spring-data-elasticsearch from 5.2.2 to 5.2.3.
- Bump org.springframework:spring-messaging from 6.1.3 to 6.1.6

### Github Actions
- Bump codecov/codecov-action from 3 to 4

## [1.0.1] - date 2024-01-12
### Changed
- Use softlink to jar file in start script.
Expand Down Expand Up @@ -150,7 +177,8 @@ and mapping of metadata documents delivered by RabbitMQ
- Mapping of metadata documents with Gemma
- Ingest to elasticsearch

[Unreleased]: https://github.com/kit-data-manager/indexing-service/compare/v1.0.1...HEAD
[Unreleased]: https://github.com/kit-data-manager/indexing-service/compare/v1.0.2...HEAD
[1.0.2]: https://github.com/kit-data-manager/indexing-service/compare/v1.0.1...v1.0.2
[1.0.1]: https://github.com/kit-data-manager/indexing-service/compare/v1.0.0...v1.0.1
[1.0.0]: https://github.com/kit-data-manager/indexing-service/compare/v0.9.0...v1.0.0
[0.9.0]: https://github.com/kit-data-manager/indexing-service/compare/v0.1.3...v0.9.0
Expand Down
4 changes: 2 additions & 2 deletions CITATION.cff
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ authors:
title: "Indexing and Mapping Service"
type: software
abstract: Indexing and Mapping Service is a software for (optional) mapping and indexing metadata documents for (elastic)search.
version: 0.9.0
date-released: 2023-07-25
version: 1.0.2
date-released: 2024-11-22
url: "https://github.com/kit-data-manager/indexing-service"
repository-code: "https://github.com/kit-data-manager/indexing-service"
license: Apache-2.0
10 changes: 6 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,16 @@ ARG SERVICE_ROOT_DIRECTORY_DEFAULT=/spring/
####################################################
# Building environment (java & git)
####################################################
FROM python:3.10 AS build-env-java
FROM python:3.13 AS build-env-java
LABEL [email protected]
LABEL stage=build-env

# Install git as additional requirement
RUN apt-get update && \
apt-get upgrade --no-install-recommends --assume-yes && \
apt-get install --no-install-recommends --assume-yes git && \
apt-get install --no-install-recommends --assume-yes openjdk-17-jdk && \
wget https://download.oracle.com/java/21/latest/jdk-21_linux-x64_bin.deb && \
dpkg -i jdk-21_linux-x64_bin.deb && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*

Expand Down Expand Up @@ -50,7 +51,7 @@ RUN bash ./build4docker.sh $SERVICE_DIRECTORY
####################################################
# Runtime environment 4 indexing-service
####################################################
FROM python:3.10 AS run-service-indexing
FROM python:3.13 AS run-service-indexing
LABEL [email protected]
LABEL stage=run

Expand All @@ -67,7 +68,8 @@ ENV REPO_PORT=${REPO_PORT_DEFAULT}
# Install JDK17
RUN apt-get update && \
apt-get upgrade --no-install-recommends --assume-yes && \
apt-get install --no-install-recommends --assume-yes openjdk-17-jdk && \
wget https://download.oracle.com/java/21/latest/jdk-21_linux-x64_bin.deb && \
dpkg -i jdk-21_linux-x64_bin.deb && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*

Expand Down
54 changes: 27 additions & 27 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
plugins {
id "org.springframework.boot" version "3.2.1"
id "io.spring.dependency-management" version "1.1.4"
id "io.freefair.lombok" version "8.4"
id "io.freefair.maven-publish-java" version "8.4"
id "org.owasp.dependencycheck" version "9.0.8"
id 'org.asciidoctor.jvm.convert' version '4.0.1'
id "org.springframework.boot" version "3.3.6"
id "io.spring.dependency-management" version "1.1.6"
id "io.freefair.lombok" version "8.11"
id "io.freefair.maven-publish-java" version "8.11"
id "org.owasp.dependencycheck" version "11.1.0"
id 'org.asciidoctor.jvm.convert' version '4.0.3'
id 'net.researchgate.release' version '3.0.2'
id "com.gorylenko.gradle-git-properties" version "2.4.1"
id "com.gorylenko.gradle-git-properties" version "2.4.2"
id 'java'
id 'jacoco'
}

ext {
// versions of dependencies
javersVersion = '7.3.7'
springDocVersion = '2.3.0'
javersVersion = '7.7.0'
springDocVersion = '2.6.0'
}

description = 'Generic indexing service supporting different mapping implementations.'
Expand All @@ -30,8 +30,8 @@ repositories {
}

java {
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
sourceCompatibility = JavaVersion.VERSION_21
targetCompatibility = JavaVersion.VERSION_21
}

configurations {
Expand All @@ -51,8 +51,8 @@ if (System.getProperty('profile') == 'minimal') {

dependencies {
// Spring
implementation 'org.springframework:spring-messaging:6.1.3'
implementation 'org.springframework.cloud:spring-cloud-gateway-mvc:4.1.1'
implementation 'org.springframework:spring-messaging:6.2.0'
implementation 'org.springframework.cloud:spring-cloud-gateway-mvc:4.1.5'

// Spring Boot
// boot starter
Expand All @@ -63,49 +63,49 @@ dependencies {
implementation "org.springframework.boot:spring-boot-starter-security"
implementation "org.springframework.boot:spring-boot-starter-actuator"
implementation "org.springframework.boot:spring-boot-starter-data-jpa"
implementation 'org.springframework.data:spring-data-elasticsearch:5.2.2'
implementation 'org.springframework.data:spring-data-elasticsearch:5.4.0'

// springdoc
implementation "org.springdoc:springdoc-openapi-starter-webmvc-ui:${springDocVersion}"
implementation "org.springdoc:springdoc-openapi-starter-common:${springDocVersion}"
implementation "org.springdoc:springdoc-openapi-starter-webmvc-api:${springDocVersion}"

// driver for postgres
implementation "org.postgresql:postgresql:42.7.1"
implementation "org.postgresql:postgresql:42.7.4"
//driver for h2
implementation "com.h2database:h2:2.2.224"
implementation "com.h2database:h2:2.3.232"

//apache
implementation "org.apache.tika:tika-core:2.9.1"
implementation "commons-codec:commons-codec:1.16.0"
implementation "org.apache.tika:tika-core:3.0.0"
implementation "commons-codec:commons-codec:1.17.1"

implementation "com.github.jknack:handlebars:4.3.1"
implementation "org.json:json:20231013"
implementation "com.github.jknack:handlebars:4.4.0"
implementation "org.json:json:20240303"

// javers
implementation "org.javers:javers-spring-boot-starter-sql:${javersVersion}"
implementation "org.javers:javers-core:${javersVersion}"

// datamanager
implementation "edu.kit.datamanager:generic-message-consumer:1.1.1"
implementation "edu.kit.datamanager:repo-core:1.2.1"
implementation "edu.kit.datamanager:service-base:1.2.0"
implementation "edu.kit.datamanager:repo-core:1.2.3"
implementation "edu.kit.datamanager:service-base:1.3.2"

// actuator
implementation 'de.codecentric:spring-boot-admin-starter-client:3.2.1'
implementation 'de.codecentric:spring-boot-admin-starter-client:3.3.6'

runtimeOnly 'org.apache.httpcomponents:httpclient:4.5.14'

// Additional libraries for tests
testImplementation "com.google.guava:guava:33.0.0-jre"
testImplementation "com.google.guava:guava:33.3.1-jre"

//Java 11 Support
testImplementation "org.mockito:mockito-core:5.8.0"
testImplementation "org.mockito:mockito-core:5.14.2"
testImplementation "junit:junit:4.13.2"

// boot starter
testImplementation "org.springframework.boot:spring-boot-starter-test"
testImplementation 'org.springframework.restdocs:spring-restdocs-mockmvc:3.0.1'
testImplementation 'org.springframework.restdocs:spring-restdocs-mockmvc:3.0.3'
testImplementation "org.springframework.security:spring-security-test"
testImplementation "org.springframework:spring-test"
}
Expand All @@ -132,7 +132,7 @@ bootJar {
}

jacoco {
toolVersion = "0.8.10"
toolVersion = "0.8.12"
}

// task for printing project name.
Expand Down
1 change: 0 additions & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,3 @@ action.custom-3=asciidoctor
action.custom-3.args=--configure-on-demand -w -x check asciidoctor
action.custom-4=buildBootableJar
action.custom-4.args=--configure-on-demand -w -x check -x test -Prelease build
netbeans.hint.jdkPlatform=JDK_17
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
3 changes: 2 additions & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.2.1-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.11.1-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
34 changes: 21 additions & 13 deletions gradlew
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
# SPDX-License-Identifier: Apache-2.0
#

##############################################################################
#
Expand Down Expand Up @@ -55,7 +57,7 @@
# Darwin, MinGW, and NonStop.
#
# (3) This script is generated from the Groovy template
# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
# https://github.com/gradle/gradle/blob/HEAD/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
# within the Gradle project.
#
# You can find Gradle at https://github.com/gradle/gradle/.
Expand Down Expand Up @@ -83,10 +85,9 @@ done
# This is normally unused
# shellcheck disable=SC2034
APP_BASE_NAME=${0##*/}
APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit

# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036)
APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s
' "$PWD" ) || exit

# Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD=maximum
Expand Down Expand Up @@ -133,26 +134,29 @@ location of your Java installation."
fi
else
JAVACMD=java
which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
if ! command -v java >/dev/null 2>&1
then
die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
Please set the JAVA_HOME variable in your environment to match the
location of your Java installation."
fi
fi

# Increase the maximum file descriptors if we can.
if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
case $MAX_FD in #(
max*)
# In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked.
# shellcheck disable=SC3045
# shellcheck disable=SC2039,SC3045
MAX_FD=$( ulimit -H -n ) ||
warn "Could not query maximum file descriptor limit"
esac
case $MAX_FD in #(
'' | soft) :;; #(
*)
# In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked.
# shellcheck disable=SC3045
# shellcheck disable=SC2039,SC3045
ulimit -n "$MAX_FD" ||
warn "Could not set maximum file descriptor limit to $MAX_FD"
esac
Expand Down Expand Up @@ -197,11 +201,15 @@ if "$cygwin" || "$msys" ; then
done
fi

# Collect all arguments for the java command;
# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of
# shell script including quotes and variable substitutions, so put them in
# double quotes to make sure that they get re-expanded; and
# * put everything else in single quotes, so that it's not re-expanded.

# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'

# Collect all arguments for the java command:
# * DEFAULT_JVM_OPTS, JAVA_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments,
# and any embedded shellness will be escaped.
# * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be
# treated as '${Hostname}' itself on the command line.

set -- \
"-Dorg.gradle.appname=$APP_BASE_NAME" \
Expand Down
Loading

0 comments on commit a5e2933

Please sign in to comment.