diff --git a/.github/workflows/dev-release-docker-publish.yml b/.github/workflows/build-dev-release.yml similarity index 53% rename from .github/workflows/dev-release-docker-publish.yml rename to .github/workflows/build-dev-release.yml index 225099d..94dd8b6 100644 --- a/.github/workflows/dev-release-docker-publish.yml +++ b/.github/workflows/build-dev-release.yml @@ -1,16 +1,16 @@ -name: Build and publish Docker dev-release distributions to Github Container Registry ghcr.io +name: Build and publish dev release Docker image to Github Container Registry ghcr.io -on: - push: - tags: - - \d+.\d+.\d+-dev +on: workflow_dispatch jobs: - build-job: + build: uses: th2-net/.github/.github/workflows/compound-java.yml@main with: build-target: 'Docker' devRelease: true + createTag: true docker-username: ${{ github.actor }} + strict-scanner: false secrets: docker-password: ${{ secrets.GITHUB_TOKEN }} + nvd-api-key: ${{ secrets.NVD_APIKEY }} \ No newline at end of file diff --git a/.github/workflows/docker-publish.yml b/.github/workflows/build-release.yml similarity index 54% rename from .github/workflows/docker-publish.yml rename to .github/workflows/build-release.yml index 291d3ff..dcf70be 100644 --- a/.github/workflows/docker-publish.yml +++ b/.github/workflows/build-release.yml @@ -1,19 +1,15 @@ -name: Build and publish Docker distributions to Github Container Registry ghcr.io +name: Build and publish release Docker image to Github Container Registry ghcr.io -on: - push: - branches: - - master - - version-* - paths: - - gradle.properties -# - package_info.json +on: workflow_dispatch jobs: - build-job: + build: uses: th2-net/.github/.github/workflows/compound-java.yml@main with: build-target: 'Docker' + devRelease: false + createTag: true docker-username: ${{ github.actor }} secrets: docker-password: ${{ secrets.GITHUB_TOKEN }} + nvd-api-key: ${{ secrets.NVD_APIKEY }} \ No newline at end of file diff --git a/.github/workflows/dev-docker-publish.yml b/.github/workflows/build-sanpshot.yml similarity index 71% rename from .github/workflows/dev-docker-publish.yml rename to .github/workflows/build-sanpshot.yml index 6f77755..957be28 100644 --- a/.github/workflows/dev-docker-publish.yml +++ b/.github/workflows/build-sanpshot.yml @@ -1,4 +1,4 @@ -name: Dev build and publish Docker distributions to Github Container Registry ghcr.io +name: Build and publish Docker image to Github Container Registry ghcr.io on: push: @@ -15,5 +15,7 @@ jobs: with: build-target: 'Docker' docker-username: ${{ github.actor }} + strict-scanner: false secrets: docker-password: ${{ secrets.GITHUB_TOKEN }} + nvd-api-key: ${{ secrets.NVD_APIKEY }} \ No newline at end of file diff --git a/.github/workflows/ci-unwelcome-words.yml b/.github/workflows/ci-unwelcome-words.yml index a7e7f3a..b23bb56 100644 --- a/.github/workflows/ci-unwelcome-words.yml +++ b/.github/workflows/ci-unwelcome-words.yml @@ -7,17 +7,17 @@ jobs: test: runs-on: ubuntu-20.04 steps: - - uses: actions/checkout@v3 - with: - ref: ${{ github.sha }} - - name: Checkout tool - uses: actions/checkout@v2 - with: - repository: exactpro-th2/ci-github-action - ref: master - token: ${{ secrets.PAT_CI_ACTION }} - path: ci-github-action - - name: Run CI action - uses: ./ci-github-action - with: - ref: ${{ github.sha }} + - uses: actions/checkout@v4 + with: + ref: ${{ github.sha }} + - name: Checkout tool + uses: actions/checkout@v4 + with: + repository: exactpro-th2/ci-github-action + ref: master + token: ${{ secrets.PAT_CI_ACTION }} + path: ci-github-action + - name: Run CI action + uses: ./ci-github-action + with: + ref: ${{ github.sha }} \ No newline at end of file diff --git a/Dockerfile b/Dockerfile index 5e8af41..dba93f6 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM gradle:7.6-jdk11 AS build +FROM gradle:8.7-jdk11 AS build ARG release_version COPY ./ . RUN gradle --no-daemon clean build dockerPrepare -Prelease_version=${release_version} diff --git a/README.md b/README.md index 46e7b15..1370f7f 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# Connect (4.0.2) +# Connect (4.1.1) The "Connect" component is responsible for the communication with a target system. This component implements the logic of the interaction protocol, receiving and sending messages from and to the system, respectively. @@ -127,9 +127,20 @@ spec: ## Release notes -### 4.0.2 +### 4.1.1 + Fixed conn write sailfish service logs into last sailfish workspace layer problem -+ Updated `sailfish-core` version from `3.3.132` to `3.3.169` + +### 4.1.0 + ++ Migrate to th2 gradle plugin `0.1.1` + +#### Updated ++ sailfish-core: `3.3.241` ++ bom: `4.6.1` ++ common: `5.14.0-dev` ++ common-utils: `2.2.3-dev` ++ sailfish: `4.1.1-dev` ++ rxjava: `3.1.8` ### 4.0.1 @@ -148,6 +159,12 @@ spec: ### 3.12.0 + Added `maxMessageFlushTime` option +### 3.11.2 + ++ Sailfish updated from `3.3.132` to `3.3.144` ++ Added `maxMessageFlushTime` option ++ Use temporal directory for last layer in sailfish's workspace + ### 3.11.1 + Updated `sailfish-core` version from `3.3.54` to `3.3.132` @@ -158,9 +175,13 @@ spec: + Updated `kotlin` form `1.5.30` to `1.6.21` + Renamed project to `conn-sailfish` +### 3.10.2 + ++ Events are made more convenient. Added event names and error logs. Error message moved from the name to the body of the event. + ### 3.10.1 -+ Update `sailfish-core` version from `3.2.1674` to `3.2.1741` ++ Updated `sailfish-core` version from `3.2.1674` to `3.2.1741` + Add exception for checking the property in `IMetadata` + Added synchronization by processor to `ServiceListener.onMessage()` otherwise processor sometimes misses some sequences + Added log about missed sequences @@ -168,15 +189,15 @@ spec: ### 3.10.0 -+ Update `th2-common` version from `3.25.1` to `3.33.0` -+ Update `org.jetbrains.kotlin.jvm` version from `1.3.72` to `1.5.30` ++ Updated `th2-common` version from `3.25.1` to `3.33.0` ++ Updated `org.jetbrains.kotlin.jvm` version from `1.3.72` to `1.5.30` ### 3.9.0 -+ Update `sailfish-core` version from `3.2.1650` to `3.2.1674` ++ Updated `sailfish-core` version from `3.2.1650` to `3.2.1674` + Embedded Sailfish service based on MINA decodes the message as sender during sending. This approach is important for protocols in which a pair of messages have the same protocol message type and different structures depending on the direction. -+ Update `th2-common` version from `3.16.5` to `3.25.1` -+ Update `th2-sailfish-utils` version from `3.4.0` to `3.8.0` ++ Updated `th2-common` version from `3.16.5` to `3.25.1` ++ Updated `th2-sailfish-utils` version from `3.4.0` to `3.8.0` ### 3.8.1 @@ -188,11 +209,11 @@ spec: ### 3.7.2 -+ Update Sailfish version to 3.2.1603 ++ Updated Sailfish version to 3.2.1603 ### 3.7.1 -+ Update Sailfish version to 3.2.1572 (unwraps the EvolutionBatch when sending raw message) ++ Updated Sailfish version to 3.2.1572 (unwraps the EvolutionBatch when sending raw message) ### 3.7.0 @@ -220,7 +241,7 @@ spec: + reads dictionaries from the /var/th2/config/dictionary folder. + uses mq_router, grpc_router, cradle_manager optional JSON configs from the /var/th2/config folder + tries to load log4j.properties files from sources in order: '/var/th2/config', '/home/etc', configured path via cmd, default configuration -+ update Cradle version. Introduce async API for storing events ++ updated Cradle version. Introduce async API for storing events ### 3.4.1 diff --git a/build.gradle b/build.gradle index 339aeb6..dc538bc 100644 --- a/build.gradle +++ b/build.gradle @@ -1,31 +1,11 @@ -import com.github.jk1.license.filter.LicenseBundleNormalizer -import com.github.jk1.license.render.JsonReportRenderer -import org.jetbrains.kotlin.gradle.dsl.JvmTarget -import org.jetbrains.kotlin.gradle.tasks.KotlinCompile - plugins { - id 'com.palantir.docker' version '0.25.0' - id 'org.jetbrains.kotlin.jvm' version '1.8.22' - id 'application' - id "org.owasp.dependencycheck" version "8.3.1" - id "com.gorylenko.gradle-git-properties" version "2.4.1" - id 'com.github.jk1.dependency-license-report' version '2.5' - id "de.undercouch.download" version "5.4.0" -} - -dependencyCheck { - formats = ['SARIF', 'JSON', 'HTML'] - failBuildOnCVSS = 5 -// suppressionFile = file('suppressions.xml') - analyzers { - assemblyEnabled = false - nugetconfEnabled = false - nodeEnabled = false - } + id "application" + id "org.jetbrains.kotlin.jvm" version "1.8.22" + id "com.exactpro.th2.gradle.component" version "0.1.1" } ext { - sailfishVersion = '3.3.169' + sailfishVersion = '3.3.241' } ext.excludeSailfish = { rcd -> @@ -84,37 +64,16 @@ repositories { } } -jar { - manifest { - attributes( - 'Created-By': "${System.getProperty('java.version')} (${System.getProperty('java.vendor')})", - 'Specification-Title': '', - 'Specification-Vendor': 'Exactpro Systems LLC', - 'Implementation-Title': project.archivesBaseName, - 'Implementation-Vendor': 'Exactpro Systems LLC', - 'Implementation-Vendor-Id': 'com.exactpro', - 'Implementation-Version': project.version - ) - } -} - -sourceCompatibility = 11 -targetCompatibility = 11 - -tasks.withType(KotlinCompile).configureEach { - compilerOptions { - jvmTarget.set(JvmTarget.JVM_11) - } +kotlin { + jvmToolchain(11) } dependencies { - api platform('com.exactpro.th2:bom:4.5.0') + implementation 'com.exactpro.th2:common:5.14.0-dev' + implementation 'com.exactpro.th2:sailfish-utils:4.1.1-dev' + implementation 'com.exactpro.th2:common-utils:2.2.3-dev' - implementation 'com.exactpro.th2:common:5.4.0-dev' - implementation 'com.exactpro.th2:sailfish-utils:4.1.0-dev' - implementation 'com.exactpro.th2:common-utils:2.2.0-dev' - - implementation group: 'io.reactivex.rxjava3', name: 'rxjava', version: '3.0.4' + implementation group: 'io.reactivex.rxjava3', name: 'rxjava', version: '3.1.8' implementation 'org.slf4j:slf4j-api' @@ -125,7 +84,7 @@ dependencies { testImplementation('org.apache.logging.log4j:log4j-slf4j2-impl') { because('logging in testing') } - testImplementation 'org.junit.jupiter:junit-jupiter:5.10.0' + testImplementation 'org.junit.jupiter:junit-jupiter:5.10.3' } test { @@ -137,39 +96,4 @@ test { application { mainClass.set('com.exactpro.th2.conn.MicroserviceMain') -} - -applicationName = 'service' - -distTar { - archiveFileName.set("${applicationName}.tar") -} - -dockerPrepare { - dependsOn distTar -} - -docker { - copySpec.from(tarTree("$buildDir/distributions/${applicationName}.tar")) -} - -licenseReport { - def licenseNormalizerBundlePath = "$buildDir/license-normalizer-bundle.json" - - if (!file(licenseNormalizerBundlePath).exists()) { - download.run { - src 'https://raw.githubusercontent.com/th2-net/.github/main/license-compliance/gradle-license-report/license-normalizer-bundle.json' - dest "$buildDir/license-normalizer-bundle.json" - overwrite false - } - } - - filters = [ - new LicenseBundleNormalizer(licenseNormalizerBundlePath, false) - ] - renderers = [ - new JsonReportRenderer('licenses.json', false), - ] - excludeOwnGroup = false - allowedLicensesFile = new URL("https://raw.githubusercontent.com/th2-net/.github/main/license-compliance/gradle-license-report/allowed-licenses.json") } \ No newline at end of file diff --git a/gradle.properties b/gradle.properties index 7cfebe4..5113223 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1 +1 @@ -release_version = 4.0.2 +release_version = 4.1.1 \ No newline at end of file diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index bdf0ae0..02c9c37 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,21 +1,5 @@ -# -# Copyright 2020-2020 Exactpro (Exactpro Systems Limited) -# -# 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. -# - #Tue Jun 09 10:46:12 MSK 2020 -distributionUrl=https\://services.gradle.org/distributions/gradle-7.6-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-bin.zip distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStorePath=wrapper/dists