Skip to content

Commit

Permalink
[th2-5157] provided NOT_WILDCARD filter for mq routing (#288)
Browse files Browse the repository at this point in the history
  • Loading branch information
Nikita-Smirnov-Exactpro authored Jan 29, 2024
1 parent 681e43e commit 81304f0
Show file tree
Hide file tree
Showing 10 changed files with 112 additions and 181 deletions.
Original file line number Diff line number Diff line change
@@ -1,17 +1,14 @@
name: Build and publish dev-release Java distributions to sonatype.
name: Build and publish dev release jar to sonatype repository

on:
push:
tags:
- \d+.\d+.\d+-dev
on: workflow_dispatch

jobs:
build:
uses: th2-net/.github/.github/workflows/compound-java.yml@main
with:
build-target: 'Sonatype'
runsOn: ubuntu-latest
devRelease: true
createTag: true
secrets:
sonatypeUsername: ${{ secrets.SONATYPE_NEXUS_USERNAME }}
sonatypePassword: ${{ secrets.SONATYPE_NEXUS_PASSWORD }}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,21 +1,16 @@
name: Build and release Java distributions to sonatype.
name: Build and publish release jar to sonatype repository

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

jobs:
build:
uses: th2-net/.github/.github/workflows/compound-java.yml@main
with:
build-target: 'Sonatype'
runsOn: ubuntu-latest
devRelease: false
createTag: true
secrets:
sonatypeUsername: ${{ secrets.SONATYPE_NEXUS_USERNAME }}
sonatypePassword: ${{ secrets.SONATYPE_NEXUS_PASSWORD }}
sonatypeSigningKey: ${{ secrets.SONATYPE_GPG_ARMORED_KEY }}
sonatypeSigningPassword: ${{ secrets.SONATYPE_SIGNING_PASSWORD }}
sonatypeSigningPassword: ${{ secrets.SONATYPE_SIGNING_PASSWORD }}
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
name: Dev build and publish Java distributions to sonatype snapshot repository
name: Build and publish jar to sonatype snapshot repository

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

Expand All @@ -16,9 +14,8 @@ jobs:
uses: th2-net/.github/.github/workflows/compound-java-dev.yml@main
with:
build-target: 'Sonatype'
runsOn: ubuntu-latest
secrets:
sonatypeUsername: ${{ secrets.SONATYPE_NEXUS_USERNAME }}
sonatypePassword: ${{ secrets.SONATYPE_NEXUS_PASSWORD }}
sonatypeSigningKey: ${{ secrets.SONATYPE_GPG_ARMORED_KEY }}
sonatypeSigningPassword: ${{ secrets.SONATYPE_SIGNING_PASSWORD }}
sonatypeSigningPassword: ${{ secrets.SONATYPE_SIGNING_PASSWORD }}
4 changes: 2 additions & 2 deletions .github/workflows/ci-unwelcome-words.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@ jobs:
test:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
with:
ref: ${{ github.sha }}
- name: Checkout tool
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
repository: exactpro-th2/ci-github-action
ref: master
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/dependabot-java-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
# Build package
- name: Set up JDK 11
uses: actions/setup-java@v1
Expand Down
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# th2 common library (Java) (5.7.2)
# th2 common library (Java) (5.8.0)

## Usage

Expand Down Expand Up @@ -148,6 +148,7 @@ Filters format:
* `EMPTY` - the filter passes if the field is empty
* `NOT_EMPTY` - the filter passes if the field is not empty
* `WILDCARD` - filters the field by wildcard expression
* `NOT_WILDCARD` - filters the field which isn't matched by wildcard expression

```json
{
Expand Down Expand Up @@ -501,6 +502,9 @@ dependencies {

## Release notes

### 5.8.0-dev
+ Added `NOT_WILDCARD` filter operation, which filter a field which isn't matched by wildcard expression.

### 5.7.2-dev
+ Event builder checks is the book name from attached message match to the event book name

Expand Down
4 changes: 2 additions & 2 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# Copyright 2022-2023 Exactpro (Exactpro Systems Limited)
# Copyright 2022-2024 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.
Expand All @@ -13,7 +13,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
release_version=5.7.3
release_version=5.8.0
description='th2 common library (Java)'
vcs_url=https://github.com/th2-net/th2-common-j
kapt.include.compile.classpath=false
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2022 Exactpro (Exactpro Systems Limited)
* Copyright 2022-2024 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
Expand Down Expand Up @@ -27,4 +27,5 @@ fun FieldFilterConfiguration.checkFieldValue(value: String?) =
FieldFilterOperation.EMPTY -> value.isNullOrEmpty()
FieldFilterOperation.NOT_EMPTY -> !value.isNullOrEmpty()
FieldFilterOperation.WILDCARD -> FilenameUtils.wildcardMatch(value, expectedValue)
FieldFilterOperation.NOT_WILDCARD -> !FilenameUtils.wildcardMatch(value, expectedValue)
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2020-2021 Exactpro (Exactpro Systems Limited)
* Copyright 2020-2024 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
Expand Down Expand Up @@ -92,7 +92,8 @@ enum class FieldFilterOperation {
NOT_EQUAL,
EMPTY,
NOT_EMPTY,
WILDCARD
WILDCARD,
NOT_WILDCARD,
}

data class GlobalNotificationConfiguration(
Expand Down
Loading

0 comments on commit 81304f0

Please sign in to comment.