diff --git a/.github/workflows/build-dev-release.yml b/.github/workflows/build-dev-release.yml new file mode 100644 index 0000000..b438d11 --- /dev/null +++ b/.github/workflows/build-dev-release.yml @@ -0,0 +1,15 @@ +name: Build and publish dev release Docker image to Github Container Registry ghcr.io + +on: workflow_dispatch + +jobs: + build: + uses: th2-net/.github/.github/workflows/compound-java.yml@main + with: + build-target: 'Docker' + devRelease: true + 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/docker-publish.yml b/.github/workflows/build-release.yml similarity index 53% rename from .github/workflows/docker-publish.yml rename to .github/workflows/build-release.yml index cec50a6..dcf70be 100644 --- a/.github/workflows/docker-publish.yml +++ b/.github/workflows/build-release.yml @@ -1,20 +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 }} - \ No newline at end of file + 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 75% rename from .github/workflows/dev-docker-publish.yml rename to .github/workflows/build-sanpshot.yml index 430474c..9366a44 100644 --- a/.github/workflows/dev-docker-publish.yml +++ b/.github/workflows/build-sanpshot.yml @@ -1,11 +1,10 @@ -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: branches-ignore: - master - version-* - - dev-version-* - dependabot** paths-ignore: - README.md @@ -18,3 +17,4 @@ jobs: 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-release-java-publish-sonatype-and-docker.yml b/.github/workflows/dev-release-java-publish-sonatype-and-docker.yml deleted file mode 100644 index 9c3e5df..0000000 --- a/.github/workflows/dev-release-java-publish-sonatype-and-docker.yml +++ /dev/null @@ -1,22 +0,0 @@ -name: Build and release Java distributions to sonatype. - -on: - push: - tags: - - \d+.\d+.\d+-dev - -jobs: - build: - uses: th2-net/.github/.github/workflows/compound-java.yml@main - with: - build-target: 'Sonatype,Docker' - runsOn: ubuntu-latest - gradleVersion: '7' - docker-username: ${{ github.actor }} - devRelease: true - secrets: - sonatypeUsername: ${{ secrets.SONATYPE_NEXUS_USERNAME }} - sonatypePassword: ${{ secrets.SONATYPE_NEXUS_PASSWORD }} - sonatypeSigningKey: ${{ secrets.SONATYPE_GPG_ARMORED_KEY }} - sonatypeSigningPassword: ${{ secrets.SONATYPE_SIGNING_PASSWORD }} - docker-password: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file diff --git a/README.md b/README.md index 8a1fafa..2864e67 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# Csv Reader User Manual 2.3.0 +# Csv Reader User Manual 2.4.0 ## Document Information @@ -91,6 +91,15 @@ spec: ## Changes +### 2.4.0 + +#### Updated: ++ Migrate to th2 gradle plugin `0.0.6` ++ bom: `4.6.1` ++ common: `5.11.0-dev` ++ read-file-common-core: `3.3.0-dev` ++ jakarta.annotation-api: `3.0.0` + ### 2.3.0 #### Updated: diff --git a/build.gradle b/build.gradle index 80e736a..9a9f4a6 100644 --- a/build.gradle +++ b/build.gradle @@ -1,68 +1,18 @@ -/* - * Copyright 2020-2023 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. - */ - -import com.github.jk1.license.filter.LicenseBundleNormalizer -import com.github.jk1.license.render.JsonReportRenderer - plugins { - id 'java-library' id 'application' - id 'com.palantir.docker' version '0.25.0' id 'org.jetbrains.kotlin.jvm' version '1.8.22' - id "org.owasp.dependencycheck" version "8.4.0" - 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.5.0" -} - -dependencyCheck { - formats=['SARIF', 'JSON', 'HTML'] - failBuildOnCVSS=5 - suppressionFile = file('suppressions.xml') - - analyzers { - assemblyEnabled = false - nugetconfEnabled = false - nodeEnabled = false - } -} - -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") + id 'com.exactpro.th2.gradle.component' version '0.0.6' } group 'com.exactpro.th2' version release_version +kotlin { + jvmToolchain(11) +} + repositories { mavenCentral() - maven { name 'Sonatype_snapshots' url 'https://s01.oss.sonatype.org/content/repositories/snapshots/' @@ -71,7 +21,6 @@ repositories { name 'Sonatype_releases' url 'https://s01.oss.sonatype.org/content/repositories/releases/' } - mavenLocal() configurations.configureEach { @@ -81,18 +30,17 @@ repositories { } dependencies { - api platform("com.exactpro.th2:bom:4.5.0") - implementation ("com.exactpro.th2:common:5.7.1-dev") + implementation ("com.exactpro.th2:common:5.11.0-dev") implementation "org.slf4j:slf4j-api" - api "com.exactpro.th2:read-file-common-core:3.2.0-dev" + api "com.exactpro.th2:read-file-common-core:3.3.0-dev" implementation('com.exactpro.th2:netty-bytebuf-utils:0.2.0') { because("'asExpandable' method is used") } implementation "com.opencsv:opencsv:5.9" - implementation "javax.annotation:javax.annotation-api:1.3.2" + implementation 'jakarta.annotation:jakarta.annotation-api:3.0.0' implementation "org.jetbrains.kotlin:kotlin-reflect" implementation "com.fasterxml.jackson.core:jackson-databind" @@ -101,44 +49,18 @@ dependencies { } implementation "com.fasterxml.jackson.module:jackson-module-kotlin" - testImplementation "org.junit.jupiter:junit-jupiter:5.10.0" - testImplementation "org.mockito:mockito-core:3.6.0" + testImplementation "org.junit.jupiter:junit-jupiter:5.10.2" + testImplementation "org.mockito:mockito-core:5.12.0" } test { useJUnitPlatform() } -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 - ) - } -} - -description = 'CSV reader client' -sourceCompatibility = '11' -applicationName = 'service' - -distTar { - archiveName "${applicationName}.tar" -} - -dockerPrepare { - dependsOn distTar -} - -docker { - copySpec.from(tarTree("$buildDir/distributions/${applicationName}.tar")) -} - application { mainClassName = "com.exactpro.th2.readcsv.Main" +} + +dependencyCheck { + suppressionFile = file('suppressions.xml') } \ No newline at end of file diff --git a/gradle.properties b/gradle.properties index 06e1d60..95e5f3e 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1 +1 @@ -release_version=2.3.0 \ No newline at end of file +release_version = 2.4.0 \ No newline at end of file