diff --git a/.github/workflows/dev-docker-publish.yml b/.github/workflows/dev-docker-publish.yml index 22def07..6f77755 100644 --- a/.github/workflows/dev-docker-publish.yml +++ b/.github/workflows/dev-docker-publish.yml @@ -10,39 +10,10 @@ on: - README.md jobs: - build: - runs-on: ubuntu-20.04 - steps: - - uses: actions/checkout@v2 -# Prepare custom build version - - name: Get branch name - id: branch - run: echo ::set-output name=branch_name::${GITHUB_REF#refs/*/} - - name: Get release_version - id: ver - uses: christian-draeger/read-properties@1.0.1 - with: - path: gradle.properties - property: release_version - - name: Build custom release version - id: release_ver - run: echo ::set-output name=value::"${{ steps.ver.outputs.value }}-${{ steps.branch.outputs.branch_name }}-${{ github.run_id }}" - - name: Show custom release version - run: echo ${{ steps.release_ver.outputs.value }} -# Build and publish image - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v1 - - uses: docker/login-action@v1 - with: - registry: ghcr.io - username: ${{ github.repository_owner }} - password: ${{ secrets.CR_PAT }} - - run: echo "::set-output name=REPOSITORY_NAME::$(echo '${{ github.repository }}' | awk -F '/' '{print $2}')" - id: meta - - name: Build and push - id: docker_build - uses: docker/build-push-action@v2 - with: - push: true - tags: ghcr.io/${{ github.repository }}:${{ steps.release_ver.outputs.value }} - labels: com.exactpro.th2.${{ steps.meta.outputs.REPOSITORY_NAME }}=${{ steps.ver.outputs.value }} + build-job: + uses: th2-net/.github/.github/workflows/compound-java-dev.yml@main + with: + build-target: 'Docker' + docker-username: ${{ github.actor }} + secrets: + docker-password: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/docker-publish.yml b/.github/workflows/docker-publish.yml index 9274060..291d3ff 100644 --- a/.github/workflows/docker-publish.yml +++ b/.github/workflows/docker-publish.yml @@ -3,33 +3,17 @@ name: Build and publish Docker distributions to Github Container Registry ghcr.i on: push: branches: - - master - - version-* + - master + - version-* + paths: + - gradle.properties +# - package_info.json jobs: - build: - runs-on: ubuntu-20.04 - steps: - - uses: actions/checkout@v2 - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v1 - - uses: docker/login-action@v1 - with: - registry: ghcr.io - username: ${{ github.repository_owner }} - password: ${{ secrets.CR_PAT }} - - run: echo "::set-output name=REPOSITORY_NAME::$(echo '${{ github.repository }}' | awk -F '/' '{print $2}')" - id: meta - - name: Read version from gradle.properties - id: read_property - uses: christian-draeger/read-properties@1.0.1 - with: - path: ./gradle.properties - property: release_version - - name: Build and push - id: docker_build - uses: docker/build-push-action@v2 - with: - push: true - tags: ghcr.io/${{ github.repository }}:${{ steps.read_property.outputs.value }} - labels: com.exactpro.th2.${{ steps.meta.outputs.REPOSITORY_NAME }}=${{ steps.read_property.outputs.value }} + build-job: + uses: th2-net/.github/.github/workflows/compound-java.yml@main + with: + build-target: 'Docker' + docker-username: ${{ github.actor }} + secrets: + docker-password: ${{ secrets.GITHUB_TOKEN }} diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 93a6257..79f5f34 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,5 +1,5 @@ variables: - APP_NAME: "th2-conn" + APP_NAME: "th2-conn-sailfish" include: - project: "vivarium/th2/pipelines" diff --git a/Dockerfile b/Dockerfile index 84d6f55..5e8af41 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM gradle:6.6-jdk11 AS build +FROM gradle:7.6-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 28e6bed..63c45a0 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# Connect (3.11.0) +# Connect (3.11.2) 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. @@ -121,11 +121,21 @@ spec: ## Release notes +### 3.11.2 + ++ Sailfish updated from `3.3.132` to `3.3.144` + +### 3.11.1 ++ Updated `sailfish-core` version from `3.3.54` to `3.3.132` + ### 3.11.0 + Added `maxMessageFlushTime` option -+ Dependencies with vulnerabilities were updated: - + Sailfish updated from `3.2.1741` to `3.3.13` + ++ Updated `sailfish-core` version from `3.2.1741` to `3.3.54` ++ Updated `common` from `3.33.0` to `3.44.0` ++ Updated `kotlin` form `1.5.30` to `1.6.21` ++ Renamed project to `conn-sailfish` ### 3.10.2 @@ -134,7 +144,7 @@ spec: ### 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 @@ -142,15 +152,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 @@ -162,11 +172,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 @@ -194,7 +204,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 2fc87e9..5a358f4 100644 --- a/build.gradle +++ b/build.gradle @@ -2,11 +2,22 @@ plugins { id 'com.palantir.docker' version '0.25.0' id 'org.jetbrains.kotlin.jvm' version '1.6.21' id 'application' + id "org.owasp.dependencycheck" version "7.4.4" +} + +dependencyCheck { + format='HTML' } ext { - sharedDir = file("${project.rootDir}/shared") - sailfishVersion = '3.3.13' + sailfishVersion = '3.3.144' +} + +ext.excludeSailfish = { rcd -> + rcd.excludeModule("com.exactpro.sf", "sailfish-core") + rcd.excludeModule("com.exactpro.sf", "sailfish-common") + rcd.excludeModule("com.exactpro.sf", "sailfish-rest-api-client") + rcd.excludeModule("com.exactpro.sf", "service-http") } group = 'com.exactpro.th2' @@ -14,14 +25,16 @@ version = release_version repositories { maven { - name 'MavenLocal' - url sharedDir + name 'Sonatype_snapshots' + url 'https://s01.oss.sonatype.org/content/repositories/snapshots/' + content { + excludeSailfish(it) + } } - // ignoreGradleMetadataRedirection is used for sonatype because // Sailfish dependencies have constrains that interfere with our BOM - // so we exclude Gradle metadata for this repositories - + // so we exclude Gradle metadata for this repositories. + // We've checked these versions - they are compatible and safe to use maven { name 'Sonatype_snapshots' url 'https://s01.oss.sonatype.org/content/repositories/snapshots/' @@ -34,21 +47,23 @@ repositories { maven { name 'Sonatype_releases' url 'https://s01.oss.sonatype.org/content/repositories/releases/' - metadataSources { - mavenPom() - artifact() - ignoreGradleMetadataRedirection() + content { + excludeSailfish(it) } } - mavenCentral { + maven { + name 'Sonatype_releases' + url 'https://s01.oss.sonatype.org/content/repositories/releases/' metadataSources { mavenPom() artifact() + ignoreGradleMetadataRedirection() } } + mavenCentral() mavenLocal() - configurations.all { + configurations.configureEach { resolutionStrategy.cacheChangingModulesFor 0, 'seconds' resolutionStrategy.cacheDynamicVersionsFor 0, 'seconds' } @@ -80,12 +95,10 @@ compileTestKotlin { } dependencies { - api platform('com.exactpro.th2:bom:4.0.1') + api platform('com.exactpro.th2:bom:4.1.0') - implementation 'com.exactpro.th2:common:3.42.0-dev-3174619150-SNAPSHOT' - implementation 'com.exactpro.th2:sailfish-utils:3.13.0-dev-3204703314-SNAPSHOT' - - implementation "org.slf4j:slf4j-api" + implementation 'com.exactpro.th2:common:3.44.0' + implementation 'com.exactpro.th2:sailfish-utils:3.14.0' implementation group: 'io.reactivex.rxjava3', name: 'rxjava', version: '3.0.4' @@ -93,9 +106,6 @@ dependencies { implementation("com.exactpro.sf:sailfish-core:${sailfishVersion}") - testImplementation('org.apache.logging.log4j:log4j-slf4j-impl') { - because('logging in testing') - } testImplementation 'org.junit.jupiter:junit-jupiter:5.9.0' } diff --git a/gradle.properties b/gradle.properties index 0d3de53..f8a1209 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1 +1 @@ -release_version=3.11.0 +release_version = 3.11.2 \ No newline at end of file diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index d97373f..bdf0ae0 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -15,7 +15,7 @@ # #Tue Jun 09 10:46:12 MSK 2020 -distributionUrl=https\://services.gradle.org/distributions/gradle-6.6-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-7.6-all.zip distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStorePath=wrapper/dists diff --git a/settings.gradle b/settings.gradle index 44dcd88..1db886a 100644 --- a/settings.gradle +++ b/settings.gradle @@ -1 +1 @@ -rootProject.name = 'conn' \ No newline at end of file +rootProject.name = 'conn-sailfish' \ No newline at end of file