diff --git a/.github/workflows/build-dev-release.yml b/.github/workflows/build-dev-release.yml index 59d4309c..b438d11f 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 8f357426..dcf70be4 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 1618698e..9366a44e 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/README.md b/README.md index 4db00367..eb788498 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# Report data provider (5.10.0) +# Report data provider (5.11.0) # Overview This component serves as a backend for rpt-viewer. It will connect to the cassandra database via cradle api and expose the data stored in there as REST resources. @@ -295,6 +295,14 @@ spec: # Release notes +## 5.11.0 ++ Migrate 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` ++ Updated grpc-data-provider: `0.2.0-dev` + ## 5.10.0 + Updated cradle api: `5.2.0-dev` + Updated common: `5.8.0-dev` diff --git a/build.gradle b/build.gradle index 17dcb9ed..bb80663e 100644 --- a/build.gradle +++ b/build.gradle @@ -1,26 +1,23 @@ import org.jetbrains.kotlin.gradle.tasks.KotlinCompile -import com.github.jk1.license.filter.LicenseBundleNormalizer -import com.github.jk1.license.render.JsonReportRenderer plugins { - id 'java' id 'org.jetbrains.kotlin.jvm' version '1.8.22' + id "com.exactpro.th2.gradle.component" version "0.0.6" id 'application' - id 'com.palantir.docker' version '0.25.0' - id "org.owasp.dependencycheck" version "9.0.9" - 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" } ext { dockerImageVersion = release_version - cradleVersion = '5.2.0-dev' + cradleVersion = '5.3.0-dev' } group 'com.exactpro.th2' version release_version +kotlin { + jvmToolchain(11) +} + repositories { mavenCentral() maven { @@ -33,10 +30,12 @@ repositories { } } +configurations.configureEach { + resolutionStrategy.cacheChangingModulesFor 0, 'seconds' + resolutionStrategy.cacheDynamicVersionsFor 0, 'seconds' +} dependencies { - api platform('com.exactpro.th2:bom:4.5.0') - implementation 'org.slf4j:slf4j-api' implementation 'com.fasterxml.jackson.core:jackson-core' @@ -47,19 +46,19 @@ dependencies { implementation 'org.apache.commons:commons-lang3' - implementation('com.exactpro.th2:common:5.8.0-dev') { + implementation('com.exactpro.th2:common:5.11.0-dev') { exclude group: 'com.exactpro.th2', module: 'cradle-core' exclude group: 'com.exactpro.th2', module: 'cradle-cassandra' } - implementation 'com.exactpro.th2:common-utils:2.2.2-dev' + implementation 'com.exactpro.th2:common-utils:2.2.3-dev' implementation "com.exactpro.th2:cradle-core:${cradleVersion}" implementation "com.exactpro.th2:cradle-cassandra:${cradleVersion}" - implementation 'com.exactpro.th2:grpc-data-provider:0.1.8' + implementation 'com.exactpro.th2:grpc-data-provider:0.2.0-dev' - implementation 'io.github.microutils:kotlin-logging:3.0.0' // The last version bases on kotlin 1.6.0 + implementation 'io.github.microutils:kotlin-logging:3.0.5' implementation 'io.prometheus:simpleclient' @@ -85,25 +84,10 @@ tasks.withType(KotlinCompile).configureEach { } } -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 - ) - } +application { + mainClassName = "com.exactpro.th2.rptdataprovider.MainKt" } -applicationName = 'service' - -distTar { - archiveName "${applicationName}.tar" -} test { // FIXME: the tests were temporary disabled since they're not compatible with new api @@ -111,61 +95,6 @@ test { // useJUnitPlatform() } -dockerPrepare { - dependsOn distTar -} - -docker { - copySpec.from(tarTree("$buildDir/distributions/${applicationName}.tar")) -} - - -compileKotlin { - kotlinOptions.jvmTarget = "11" -} - -compileTestKotlin { - kotlinOptions.jvmTarget = "11" -} - -application { - mainClassName = "com.exactpro.th2.rptdataprovider.MainKt" -} - -configurations.configureEach { - resolutionStrategy.cacheChangingModulesFor 0, 'seconds' - resolutionStrategy.cacheDynamicVersionsFor 0, 'seconds' -} - dependencyCheck { - formats=['SARIF', 'JSON', 'HTML'] suppressionFile='supressions.xml' - failBuildOnCVSS=5 - - 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") -} +} \ No newline at end of file diff --git a/gradle.properties b/gradle.properties index c6d83db7..fd1da648 100644 --- a/gradle.properties +++ b/gradle.properties @@ -16,6 +16,6 @@ kotlin.code.style=official -release_version=5.10.0 +release_version=5.11.0 docker_image_name= diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index a0afa4f9..518af947 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -15,7 +15,7 @@ ################################################################################ #Tue Apr 14 11:21:33 MSK 2020 -distributionUrl=https\://services.gradle.org/distributions/gradle-7.6-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-7.6-bin.zip distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStorePath=wrapper/dists