diff --git a/.github/workflows/build-dev-release.yml b/.github/workflows/build-dev-release.yml index 59d4309..b438d11 100644 --- a/.github/workflows/build-dev-release.yml +++ b/.github/workflows/build-dev-release.yml @@ -11,4 +11,5 @@ jobs: createTag: true docker-username: ${{ github.actor }} secrets: - docker-password: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file + docker-password: ${{ secrets.GITHUB_TOKEN }} + nvd-api-key: ${{ secrets.NVD_APIKEY }} \ No newline at end of file diff --git a/.github/workflows/build-release.yml b/.github/workflows/build-release.yml index 8f35742..dcf70be 100644 --- a/.github/workflows/build-release.yml +++ b/.github/workflows/build-release.yml @@ -11,4 +11,5 @@ jobs: createTag: true docker-username: ${{ github.actor }} secrets: - docker-password: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file + docker-password: ${{ secrets.GITHUB_TOKEN }} + nvd-api-key: ${{ secrets.NVD_APIKEY }} \ No newline at end of file diff --git a/.github/workflows/build-sanpshot.yml b/.github/workflows/build-sanpshot.yml index 1618698..9366a44 100644 --- a/.github/workflows/build-sanpshot.yml +++ b/.github/workflows/build-sanpshot.yml @@ -16,4 +16,5 @@ jobs: build-target: 'Docker' docker-username: ${{ github.actor }} secrets: - docker-password: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file + 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 b8b2a91..319d819 100644 --- a/.github/workflows/ci-unwelcome-words.yml +++ b/.github/workflows/ci-unwelcome-words.yml @@ -7,11 +7,11 @@ jobs: test: runs-on: ubuntu-20.04 steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: ref: ${{ github.sha }} - name: Checkout tool - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: repository: exactpro-th2/ci-github-action ref: master diff --git a/README.md b/README.md index b0a3a94..d34270c 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# Overview (5.5.0) +# Overview (5.6.0) Message store (mstore) is an important th2 component responsible for storing raw messages into Cradle. Please refer to [Cradle repository] (https://github.com/th2-net/cradleapi/blob/master/README.md) for more details. This component has a pin for listening messages via MQ. @@ -115,6 +115,14 @@ spec: This is a list of supported features provided by libraries. Please see more details about this feature via [link](https://github.com/th2-net/th2-common-j#configuration-formats). +## 5.6.0 + +* Migrated to th2 gradle plugin `0.0.6` +* Updated bom: `4.6.1` +* Updated common: `5.11.0-dev` +* Updated common-utils: `2.2.3-dev` +* Updated cradle api: `5.3.0-dev` + ## 5.5.0 * Updated bom: `4.6.0` diff --git a/build.gradle b/build.gradle index 8460821..9ff3a35 100644 --- a/build.gradle +++ b/build.gradle @@ -1,23 +1,12 @@ -import com.github.jk1.license.filter.LicenseBundleNormalizer -import com.github.jk1.license.render.JsonReportRenderer - plugins { - id 'java' - id "io.github.gradle-nexus.publish-plugin" version "1.3.0" - id 'maven-publish' - id 'signing' - id 'java-library' - id 'application' - id 'com.palantir.docker' version '0.25.0' - id "org.owasp.dependencycheck" version "9.0.9" - id 'com.github.jk1.dependency-license-report' version '2.5' - id "de.undercouch.download" version "5.4.0" + id "application" + id "com.exactpro.th2.gradle.component" version "0.0.6" } ext { - cradleVersion = '5.2.0-dev' - commonVersion = '5.9.1-dev' - commonUtilsVersion = '2.2.2-dev' + cradleVersion = '5.3.0-dev' + commonVersion = '5.11.0-dev' + commonUtilsVersion = '2.2.0-dev' } group = 'com.exactpro.th2' @@ -46,119 +35,11 @@ repositories { } } -java { - withJavadocJar() - withSourcesJar() -} - javadoc { options.addStringOption('Xdoclint:none', '-quiet') } -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 - ) - } -} - -// conditionals for publications -tasks.withType(PublishToMavenRepository).configureEach { - onlyIf { - (repository == publishing.repositories.nexus && - project.hasProperty('nexus_user') && - project.hasProperty('nexus_password') && - project.hasProperty('nexus_url')) || - (repository == publishing.repositories.sonatype && - project.hasProperty('sonatypeUsername') && - project.hasProperty('sonatypePassword')) - } -} -tasks.withType(Sign).configureEach { - onlyIf { - project.hasProperty('signingKey') && - project.hasProperty('signingPassword') - } -} -// disable running task 'initializeSonatypeStagingRepository' on a gitlab -tasks.configureEach { task -> - if (task.name == 'initializeSonatypeStagingRepository' && - !(project.hasProperty('sonatypeUsername') && project.hasProperty('sonatypePassword')) - ) { - task.enabled = false - } -} - -publishing { - publications { - mavenJava(MavenPublication) { - from(components.java) - pom { - name = rootProject.name - packaging = 'jar' - description = rootProject.description - url = vcs_url - scm { - url = vcs_url - } - licenses { - license { - name = 'The Apache License, Version 2.0' - url = 'http://www.apache.org/licenses/LICENSE-2.0.txt' - } - } - developers { - developer { - id = 'developer' - name = 'developer' - email = 'developer@exactpro.com' - } - } - scm { - url = vcs_url - } - } - } - } - repositories { - //Nexus repo to publish from gitlab - maven { - name = 'nexus' - credentials { - username = project.findProperty('nexus_user') - password = project.findProperty('nexus_password') - } - url = project.findProperty('nexus_url') - } - } -} - -nexusPublishing { - repositories { - sonatype { - nexusUrl.set(uri("https://s01.oss.sonatype.org/service/local/")) - snapshotRepositoryUrl.set(uri("https://s01.oss.sonatype.org/content/repositories/snapshots/")) - } - } -} - -signing { - String signingKey = findProperty("signingKey") - String signingPassword = findProperty("signingPassword") - useInMemoryPgpKeys(signingKey, signingPassword) - sign publishing.publications.mavenJava -} - dependencies { - api platform('com.exactpro.th2:bom:4.6.0') - implementation "com.exactpro.th2:common:$commonVersion" implementation("com.exactpro.th2:common-utils:$commonUtilsVersion") { because("executor service utils is used") @@ -196,59 +77,6 @@ application { mainClassName = 'com.exactpro.th2.mstore.MessageStore' } -applicationName = 'service' - -distTar { - archiveName "${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") -} - -dependencyLocking { - lockAllConfigurations() -} - dependencyCheck { - formats = ['SARIF', 'JSON', 'HTML'] - failBuildOnCVSS = 5 suppressionFile = file('suppressions.xml') - analyzers { - assemblyEnabled = false - nugetconfEnabled = false - nodeEnabled = false - } -} - -configurations.configureEach { - resolutionStrategy { - force "com.exactpro.th2:cradle-core:$cradleVersion" - force "com.exactpro.th2:cradle-cassandra:$cradleVersion" - } -} +} \ No newline at end of file diff --git a/gradle.properties b/gradle.properties index c04463c..af4761c 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,3 +1,3 @@ -release_version=5.5.0 +release_version=5.6.0 description='th2 mstore component' vcs_url=https://github.com/th2-net/th2-mstore