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-2806] Initial commit #1

Open
wants to merge 49 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
49 commits
Select commit Hold shift + click to select a range
28e091f
[TH2-2806] Initial commit
Dec 23, 2021
f7a5c78
[TH2-2806] Creating a special assembly
Dec 23, 2021
014a399
[TH2-2806] Creating a special assembly
Dec 24, 2021
2d9c752
[TH2-2806] Creating a special assembly
Dec 24, 2021
94b9dbd
[TH2-2806] Update build.gradle, Dockerfile, gradle.properties, fixes …
Dec 24, 2021
9a46dd9
[TH2-2806] Fixes build.gradle, PillarHandler, PillarHandlerFactory, P…
Dec 27, 2021
b1b0def
[TH2-2806] Fixes PillarHandler, PillarMessageDecoder, PillarMessageEn…
Dec 28, 2021
a66f17f
[TH2-2806] Changing project name
Dec 28, 2021
9cf14bf
[TH2-2806] Changing project name
Dec 28, 2021
37b28fc
Update build.gradle
tatianavvedenskaya Dec 29, 2021
e74d600
Update build.gradle
Dec 30, 2021
b4b8450
Update build.gradle
tatianavvedenskaya Jan 10, 2022
23c676d
Update PillarHandlerFactory.kt
tatianavvedenskaya Jan 10, 2022
0a9437c
[TH2-2806]Update build.gradle
tatianavvedenskaya Jan 10, 2022
ee991ef
[TH2-2806] Update build.gradle, PillarHandler.kt, PillarHandlerFacto…
Jan 10, 2022
3d2d143
[TH2-2806] Update PillarHandlerFactory.kt
Jan 10, 2022
917db07
[TH2-2806] fixed build.gradle, TestHandler.kt
Jan 13, 2022
50538bb
[TH2-2806] Fixed PillarHandler.kt
tatianavvedenskaya Jan 13, 2022
4800b3b
[TH2-2806] Fixed PillarHandler.kt
Jan 13, 2022
b53d358
[TH2-2806] Fixed PillarHandler.kt, TestHandler.kt
Jan 13, 2022
b7ca861
[TH2-2806] Fixed PillarHandler.kt, PillarMessageDecoder.kt, PillarMes…
Jan 14, 2022
6d3a33a
[TH2-2806] Add reconnect
Jan 14, 2022
04d981c
[TH2-2806] Fixed reconnect
Jan 14, 2022
30229cf
[TH2-2806] Fixed heartbeat
Jan 14, 2022
4b2637e
[TH2-2806] Fixed heartbeat, decoder
Jan 14, 2022
c138580
[TH2-2806] Fixed PillarHandler, TestHandler
Jan 16, 2022
4f3463c
[TH2-2806] Fixed PillarHandler
tatianavvedenskaya Jan 16, 2022
ce87b1e
[TH2-2806] Fixed PillarHandler, PillarMessageDecoder, TestHandler
Jan 17, 2022
664a853
[TH2-2806] Fixed State
Jan 17, 2022
829493b
[TH2-2806] Fixed PillarHandler
tatianavvedenskaya Jan 17, 2022
13536f3
[TH2-2806] Fixed PillarHandler
Jan 17, 2022
0de0d39
[TH2-2806] Fixed PillarHandler, TestHandler
Jan 17, 2022
6476151
[TH2-2806] Fixed PillarMessageEncoder
tatianavvedenskaya Jan 17, 2022
b672813
[TH2-2806] Fixed PillarHandler
Jan 17, 2022
30e390f
[TH2-2806] Fixed PillarHandler
tatianavvedenskaya Jan 17, 2022
a4b7199
[TH2-2806] Fixed PillarHandler, PillarMessageDecoder
Jan 17, 2022
34465f8
[TH2-2806] Fixed PillarHandler
tatianavvedenskaya Jan 17, 2022
a4025aa
[TH2-2806] Fixed PillarHandler
Jan 18, 2022
ea93355
[TH2-2806] Fixed PillarHandler, PillarMessageEncoder, TestHandler
Jan 18, 2022
ed59ab7
[TH2-2806] Plugin changes
Jan 27, 2022
9979c7b
[TH2-2806] Plugin changes, fixed onOutgoing and onIncoming in handler…
Jan 31, 2022
906c695
Fixed test
Jan 31, 2022
99240ea
[TH2-2806] Fixed open and close stream, encode and decode SeqMsg
Jan 31, 2022
e113646
[TH2-2806] Plugin changes
Jan 31, 2022
322b803
[TH2-2806] Fixed encoder
Jan 31, 2022
eb4252b
[TH2-2806] Fixed handler
Jan 31, 2022
fe2edab
[TH2-2806] Fixed open and close session
Feb 3, 2022
570867d
[TH2-2806] Fixed test
tatianavvedenskaya Feb 3, 2022
195a182
[TH2-2806] Fixed onReceive and seqNum
Feb 3, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions .github/workflows/ci-unwelcome-words.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: CI

on:
pull_request:

jobs:
test:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
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 }}
47 changes: 47 additions & 0 deletions .github/workflows/dev-docker-publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: Dev build and publish Docker distributions to Github Container Registry ghcr.io

on:
push:
branches-ignore:
- master
- version-*
paths-ignore:
- README.md

jobs:
build:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
# Prepare custom build version
- name: Get branch name
id: branch
run: echo ::set-output name=branch_name::${GITHUB_REF#refs/*/}
- name: Get release_version
id: ver
uses: christian-draeger/[email protected]
with:
path: gradle.properties
property: release_version
- name: Build custom release version
id: release_ver
run: echo ::set-output name=value::"${{ steps.ver.outputs.value }}-${{ steps.branch.outputs.branch_name }}-${{ github.run_id }}"
- name: Show custom release version
run: echo ${{ steps.release_ver.outputs.value }}
# Build and publish image
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.CR_PAT }}
- run: echo "::set-output name=REPOSITORY_NAME::$(echo '${{ github.repository }}' | awk -F '/' '{print $2}')"
id: meta
- name: Build and push
id: docker_build
uses: docker/build-push-action@v2
with:
push: true
tags: ghcr.io/${{ github.repository }}:${{ steps.release_ver.outputs.value }}
labels: com.exactpro.th2.${{ steps.meta.outputs.REPOSITORY_NAME }}=${{ steps.ver.outputs.value }}
37 changes: 37 additions & 0 deletions .github/workflows/docker-publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Build and publish Docker distributions to Github Container Registry ghcr.io

on:
push:
branches:
- master
- version-*
paths:
- gradle.properties

jobs:
build:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.CR_PAT }}
- run: echo "::set-output name=REPOSITORY_NAME::$(echo '${{ github.repository }}' | awk -F '/' '{print $2}')"
id: meta
- name: Read version from gradle.properties
id: read_property
uses: christian-draeger/[email protected]
with:
path: ./gradle.properties
property: release_version
- name: Build and push
id: docker_build
uses: docker/build-push-action@v2
with:
push: true
tags: ghcr.io/${{ github.repository }}:${{ steps.read_property.outputs.value }}
labels: com.exactpro.th2.${{ steps.meta.outputs.REPOSITORY_NAME }}=${{ steps.read_property.outputs.value }}
7 changes: 7 additions & 0 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
variables:
APP_NAME: th2-codec-json

include:
- project: vivarium/th2/pipelines
ref: v2
file: /.gitlab-ci-java.yml
9 changes: 9 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
FROM gradle:7.1.0-jdk11 AS build
ARG release_version
COPY ./ .
RUN gradle --no-daemon clean build dockerPrepare -Prelease_version=${release_version}

FROM adoptopenjdk/openjdk11:alpine
WORKDIR /home
COPY --from=build /home/gradle/build/docker .
ENTRYPOINT ["/home/service/bin/service"]
106 changes: 106 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,106 @@
/*
* Copyright 2021-2021 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.
*/

plugins {
id 'java'
id 'org.jetbrains.kotlin.jvm' version '1.5.31'
id 'com.palantir.docker' version '0.25.0'

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Try to migrate to the 0.31.0 version

}

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

group 'com.exactpro.th2'
version release_version

repositories {
mavenCentral()

maven {
name 'Sonatype_snapshots'
url 'https://s01.oss.sonatype.org/content/repositories/snapshots/'
}

maven {
name 'Sonatype_releases'
url 'https://s01.oss.sonatype.org/content/repositories/releases/'
}

mavenLocal()

configurations.all {
resolutionStrategy.cacheChangingModulesFor 0, 'seconds'
resolutionStrategy.cacheDynamicVersionsFor 0, 'seconds'
}
}

dependencies {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add the api platform('com.exactpro.th2:bom:3.0.0') to take the common version of libraries

api platform('com.exactpro.th2:bom:3.1.0')
implementation 'com.google.auto.service:auto-service:1.0.1'

implementation 'com.exactpro.th2:common:3.32.0'
implementation 'com.exactpro.th2:conn-dirty-tcp-core:0.0.5'

implementation 'io.netty:netty-all:4.1.72.Final'

implementation 'io.github.microutils:kotlin-logging:2.1.21'

implementation 'org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.6.0'

testImplementation "com.nhaarman.mockitokotlin2:mockito-kotlin:2.2.0"

testImplementation 'org.junit.jupiter:junit-jupiter-api:5.8.2'
testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.8.2'

annotationProcessor 'com.google.auto.service:auto-service:1.0.1'
kapt 'com.google.auto.service:auto-service:1.0.1'
}

test {
useJUnitPlatform()
}

application {
mainClassName 'com.exactpro.th2.conn.dirty.tcp.core.Main'
}

applicationName = 'service'

distTar {
archiveName "${applicationName}.tar"
}

dockerPrepare {
dependsOn distTar
}

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

compileKotlin {
kotlinOptions {
jvmTarget = '11'
}
}

compileTestKotlin {
kotlinOptions {
jvmTarget = '11'
}
}

1 change: 1 addition & 0 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
release_version=0.0.1
Binary file added gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
5 changes: 5 additions & 0 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.1-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
Loading