Skip to content

Commit

Permalink
[RM-84612] support of th2 transport, embedded mode (#52)
Browse files Browse the repository at this point in the history
  • Loading branch information
Nikita-Smirnov-Exactpro authored Apr 10, 2024
1 parent 6e80ff7 commit a34dde5
Show file tree
Hide file tree
Showing 35 changed files with 1,206 additions and 541 deletions.
18 changes: 18 additions & 0 deletions .github/workflows/build-dev-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: Build and publish dev release jar to sonatype repository

on: workflow_dispatch

jobs:
build:
uses: th2-net/.github/.github/workflows/compound-java.yml@main
with:
build-target: 'Sonatype,Docker'
devRelease: true
createTag: true
docker-username: ${{ github.actor }}
secrets:
docker-password: ${{ secrets.GITHUB_TOKEN }}
sonatypeUsername: ${{ secrets.SONATYPE_NEXUS_USERNAME }}
sonatypePassword: ${{ secrets.SONATYPE_NEXUS_PASSWORD }}
sonatypeSigningKey: ${{ secrets.SONATYPE_GPG_ARMORED_KEY }}
sonatypeSigningPassword: ${{ secrets.SONATYPE_SIGNING_PASSWORD }}
18 changes: 18 additions & 0 deletions .github/workflows/build-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: Build and publish release jar to sonatype repository

on: workflow_dispatch

jobs:
build:
uses: th2-net/.github/.github/workflows/compound-java.yml@main
with:
build-target: 'Sonatype,Docker'
devRelease: false
createTag: true
docker-username: ${{ github.actor }}
secrets:
docker-password: ${{ secrets.GITHUB_TOKEN }}
sonatypeUsername: ${{ secrets.SONATYPE_NEXUS_USERNAME }}
sonatypePassword: ${{ secrets.SONATYPE_NEXUS_PASSWORD }}
sonatypeSigningKey: ${{ secrets.SONATYPE_GPG_ARMORED_KEY }}
sonatypeSigningPassword: ${{ secrets.SONATYPE_SIGNING_PASSWORD }}
23 changes: 23 additions & 0 deletions .github/workflows/build-sanpshot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Build and publish jar to sonatype snapshot repository

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

jobs:
build-job:
uses: th2-net/.github/.github/workflows/compound-java-dev.yml@main
with:
build-target: 'Sonatype,Docker'
docker-username: ${{ github.actor }}
secrets:
docker-password: ${{ secrets.GITHUB_TOKEN }}
sonatypeUsername: ${{ secrets.SONATYPE_NEXUS_USERNAME }}
sonatypePassword: ${{ secrets.SONATYPE_NEXUS_PASSWORD }}
sonatypeSigningKey: ${{ secrets.SONATYPE_GPG_ARMORED_KEY }}
sonatypeSigningPassword: ${{ secrets.SONATYPE_SIGNING_PASSWORD }}
54 changes: 0 additions & 54 deletions .github/workflows/dev-docker-publish.yml

This file was deleted.

39 changes: 0 additions & 39 deletions .github/workflows/docker-publish.yml

This file was deleted.

4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ RUN apk add --no-cache make git gcc musl-dev swig \
-I../src -L../src libwebp_java_wrap.c -lwebp -o libwebp.so

FROM gradle:7.6-jdk11 AS build
ARG app_version=0.0.0
ARG release_version=0.0.0
COPY ./ .
RUN gradle dockerPrepare -Prelease_version=${app_version}
RUN gradle dockerPrepare -Prelease_version=${release_version}

FROM adoptopenjdk/openjdk11:alpine
WORKDIR /home
Expand Down
36 changes: 31 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# th2 hand (4.0.0)
# th2 hand (5.0.0)

th2-hand is used to interpret and transmit commands from th2-act to Selenium or Windows Application Driver and vice versa.
All incoming and outgoing data is stored in Cradle as messages.
Expand Down Expand Up @@ -28,7 +28,15 @@ This project uses the Schema API to get its settings.
For local run it needs `custom.json`, `grpc.json`, `rabbitMQ.json` and `mq.json` files.

The `custom.json` file contains RemoteHand URLs map and has the following format:
- **session-alias == "th2-hand" by default**

- **session-alias / sessionAlias == "th2-hand" by default** - hand publishes messages related to UI command under this session alias
- **screenshot-session-alias / screenshotSessionAlias = "th2-hand-screenshot" by default** - hand publishes messages with a screenshot under this session alias
- **session-group / sessionGroup = "th2-hand-group" by default** - hand publishes all messages under this session group.
- **message-batch-limit / messageBatchLimit = 1048576 by default** - limit size for batching messages.
- **drivers-mapping / driversMapping** - UI drivers settings.
- **rh-options / rhOptions** - remote hand options settings.
- **response-timeout-sec / responseTimeoutSec = 120 by default** - timeout for waiting result form remote hand.
- **use-transport / useTransport = true by default** - if true, hand used th2 transport protocol to publish messages via MQ.
```
{
"session-alias": "aliasName",
Expand Down Expand Up @@ -92,6 +100,24 @@ Example of `rabbitMQ.json`:

## Release Notes

### 5.0.0

+ Added th2 transport support

#### Updated lib:
+ bom: `4.5.0`
+ common: `5.8.0-dev`
+ grpc-hand: `3.0.0-dev`

#### Added lib:
+ common-utils: `2.2.2-dev`

#### Added plugin:
+ org.owasp.dependencycheck: `9.0.9`
+ com.gorylenko.gradle-git-properties: `2.4.1`
+ com.github.jk1.dependency-license-report: `2.5`
+ de.undercouch.download: `5.4.0`

### 4.0.0

+ Migrated to Books & Pages concept
Expand All @@ -106,9 +132,9 @@ Example of `rabbitMQ.json`:

### 3.1.0

+ reads dictionaries from the /var/th2/config/dictionary folder
+ uses mq_router, grpc_router, cradle_manager optional JSON configs from the /var/th2/config folder
+ tries to load log4j.properties files from sources in order: '/var/th2/config', '/home/etc', configured path via cmd, default configuration
+ reads dictionaries from the /var/th2/context/dictionary folder
+ uses mq_router, grpc_router, cradle_manager optional JSON configs from the /var/th2/context folder
+ tries to load log4j.properties files from sources in order: '/var/th2/context', '/home/etc', configured path via cmd, default configuration
+ update Cradle version. Introduce async API for storing events
+ removed gRPC event loop handling
+ fixed dictionary reading
Loading

0 comments on commit a34dde5

Please sign in to comment.