Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[TH2-4991] Optional book per session configuration #51

Merged
merged 12 commits into from
Jun 20, 2024
15 changes: 15 additions & 0 deletions .github/workflows/build-dev-release.yml
Original file line number Diff line number Diff line change
@@ -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 }}
Original file line number Diff line number Diff line change
@@ -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 }}

nvd-api-key: ${{ secrets.NVD_APIKEY }}
Original file line number Diff line number Diff line change
@@ -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:
Expand All @@ -9,7 +9,6 @@ on:
paths-ignore:
- README.md


jobs:
build-job:
uses: th2-net/.github/.github/workflows/compound-java-dev.yml@main
Expand All @@ -18,3 +17,4 @@ jobs:
docker-username: ${{ github.actor }}
secrets:
docker-password: ${{ secrets.GITHUB_TOKEN }}
nvd-api-key: ${{ secrets.NVD_APIKEY }}
28 changes: 14 additions & 14 deletions .github/workflows/ci-unwelcome-words.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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@v3
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 }}
17 changes: 0 additions & 17 deletions .github/workflows/dev-release-docker-publish.yml

This file was deleted.

10 changes: 9 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# th2-conn-dirty-fix (1.6.1)
# th2-conn-dirty-fix (1.7.0)

This microservice allows sending and receiving messages via FIX protocol

Expand Down Expand Up @@ -335,6 +335,14 @@ spec:

# Changelog

## 1.7.0
* Added support for th2 transport protocol
* Added configuration option for non-default book per session.
* Migrated to th2 gradle plugin `0.0.8`
* Updated:
* common: `5.13.1-dev`
* conn-dirty-tcp-core: `3.6.0-dev`

## 1.6.1

* Channel subscriptions recovery on failure
Expand Down
82 changes: 9 additions & 73 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,27 +1,18 @@
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
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 "application"
id "com.exactpro.th2.gradle.component" version "0.0.8"
id 'org.jetbrains.kotlin.jvm' version '1.8.22'
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.6.0"
id "org.jetbrains.kotlin.kapt" version "1.8.22"
}

apply plugin: 'application'
apply plugin: 'com.palantir.docker'
apply plugin: 'kotlin-kapt'

group 'com.exactpro.th2'
version release_version

sourceCompatibility = 11
targetCompatibility = 11
kotlin {
jvmToolchain(11)
}

repositories {
mavenCentral()
Expand All @@ -45,14 +36,12 @@ repositories {
}

dependencies {
api platform('com.exactpro.th2:bom:4.6.1')

implementation("com.exactpro.th2:common:5.10.0-dev") {
implementation("com.exactpro.th2:common:5.13.1-dev") {
exclude group: 'com.exactpro.th2', module: 'task-utils'
}
implementation "com.exactpro.th2:common-utils:2.2.3-dev"
implementation 'com.exactpro.th2:netty-bytebuf-utils:0.0.1'
implementation 'com.exactpro.th2:conn-dirty-tcp-core:3.5.0-dev'
implementation'com.exactpro.th2:conn-dirty-tcp-core:3.6.0-TH2-4991-+'
Nikita-Smirnov-Exactpro marked this conversation as resolved.
Show resolved Hide resolved
implementation 'com.exactpro.th2:grpc-lw-data-provider:2.3.1-dev'

implementation 'org.slf4j:slf4j-api'
Expand All @@ -66,7 +55,7 @@ dependencies {
implementation 'com.fasterxml.jackson.core:jackson-databind'
implementation 'com.fasterxml.jackson.module:jackson-module-kotlin'

testImplementation 'org.mockito:mockito-all:1.10.19'
testImplementation 'org.mockito:mockito-core:5.12.0'
testImplementation 'org.jetbrains.kotlin:kotlin-test-junit5:1.8.22'

annotationProcessor 'com.google.auto.service:auto-service:1.1.1'
Expand All @@ -81,61 +70,8 @@ application {
mainClass.set('com.exactpro.th2.conn.dirty.tcp.core.Main')
}

applicationName = 'service'

distTar {
archiveFileName.set("${applicationName}.tar")
}

dockerPrepare {
dependsOn distTar
}

docker {
copySpec.from(tarTree("$buildDir/distributions/${applicationName}.tar"))
}

tasks.withType(KotlinCompile).configureEach {
compilerOptions {
jvmTarget.set(JvmTarget.JVM_11)
}
}

dependencyCheck {
formats=['SARIF', 'JSON', 'HTML']
failBuildOnCVSS=5
suppressionFile="suppressions.xml"

//FIXME: we should check all used dependencies
skipConfigurations = ['kapt', 'kaptClasspath_kaptKotlin', 'kaptTest', 'kaptTestFixtures', 'annotationProcessor']
analyzers {
assemblyEnabled = false
nugetconfEnabled = false
nodeEnabled = false
}
}

dependencyLocking {
lockAllConfigurations()
}

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")
}
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
release_version=1.6.1
release_version=1.7.0
description='Dirty-TCP client'
vcs_url=https://github.com/th2-net/th2-conn-dirty-fix
1 change: 1 addition & 0 deletions src/main/java/com/exactpro/th2/FixHandler.java
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
package com.exactpro.th2;

import com.exactpro.th2.common.event.Event;
import com.exactpro.th2.common.grpc.Direction;
import com.exactpro.th2.common.grpc.EventID;
import com.exactpro.th2.common.grpc.Direction;
import com.exactpro.th2.common.grpc.MessageID;
Expand Down
Loading