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 d9549b9..26e67af 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# Connect (4.0.1) +# Connect (4.1.0) 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,6 +127,18 @@ spec: ## Release notes +### 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 #### Fixed: diff --git a/build.gradle b/build.gradle index 6e3bd37..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.132' + 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 3f3cf93..1a96eac 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1 +1 @@ -release_version = 4.0.1 +release_version = 4.1.0 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