-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
55 changed files
with
8,610 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
name: CI | ||
|
||
on: push | ||
|
||
jobs: | ||
verify: | ||
name: Verify Code | ||
runs-on: ubuntu-latest | ||
|
||
env: | ||
COVERITY: coverity_tool | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Setup Maven Central | ||
uses: actions/setup-java@v2 | ||
with: | ||
java-version: 8.0.292+10 | ||
distribution: 'adopt' | ||
|
||
- name: Cache Local Maven Repository | ||
uses: actions/cache@v2 | ||
with: | ||
path: ~/.m2/repository | ||
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} | ||
|
||
- name: Compile Test and Verify | ||
run: mvn --batch-mode clean verify | ||
|
||
- name: Cache Coverity | ||
id: cache_coverity | ||
uses: actions/cache@v2 | ||
with: | ||
path: ${{ env.COVERITY }} | ||
key: coverity | ||
|
||
- name: Download Coverity | ||
if: steps.cache_coverity.outputs.cache-hit != 'true' | ||
run: | | ||
wget --quiet https://scan.coverity.com/download/linux64 --post-data "token=${{ secrets.COVERITY_TOKEN }}&project=rlo_11" -O ${{ env.COVERITY }}.tgz | ||
mkdir -p ${{ env.COVERITY }} | ||
tar zxvf ${{ env.COVERITY }}.tgz -C ${{ env.COVERITY }} --strip-components 1 | ||
- name: Compile Coverity | ||
run: | | ||
${{ env.COVERITY }}/bin/cov-build --dir cov-int mvn -DskipTests=true --batch-mode clean compile | ||
tar czvf rlo_11.tgz cov-int | ||
- name: Upload to Coverity | ||
run: curl --silent --form token=${{ secrets.COVERITY_TOKEN }} --form email=${{ secrets.COVERITY_EMAIL }} --form file=@rlo_11.tgz --form version="${GITHUB_REF##*/}" --form description="automated upload" https://scan.coverity.com/builds?project=rlo_11 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
name: Upload Release | ||
|
||
on: | ||
release: | ||
types: published | ||
|
||
jobs: | ||
upload: | ||
name: Upload | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Cache Local Maven Repository | ||
uses: actions/cache@v2 | ||
with: | ||
path: ~/.m2/repository | ||
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} | ||
|
||
- name: Setup Maven Central | ||
uses: actions/setup-java@v2 | ||
with: | ||
java-version: 8.0.292+10 | ||
distribution: 'adopt' | ||
|
||
server-id: ossrh | ||
server-username: MAVEN_CENTRAL_USERNAME | ||
server-password: MAVEN_CENTRAL_TOKEN | ||
|
||
gpg-private-key: ${{ secrets.MAVEN_GPG_PRIVATE_KEY }} | ||
gpg-passphrase: MAVEN_GPG_PASSPHRASE | ||
|
||
- name: Publish to Maven Central | ||
run: mvn --batch-mode -Drevision=${{ github.event.release.tag_name }} -Dsha1= -Dchangelist= clean deploy -Ppublish-maven-central | ||
env: | ||
MAVEN_CENTRAL_USERNAME: ${{ secrets.MAVEN_CENTRAL_USERNAME }} | ||
MAVEN_CENTRAL_TOKEN: ${{ secrets.MAVEN_CENTRAL_TOKEN }} | ||
|
||
MAVEN_GPG_PASSPHRASE: ${{ secrets.MAVEN_GPG_PASSPHRASE }} | ||
|
||
- name: Setup GitHub Packages | ||
uses: actions/setup-java@v2 | ||
with: | ||
java-version: 8.0.292+10 | ||
distribution: 'adopt' | ||
|
||
- name: Publish to GitHub Packages | ||
run: mvn --batch-mode -Drevision=${{ github.event.release.tag_name }} -Dsha1= -Dchangelist= clean deploy -Ppublish-github-packages | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
target/* | ||
/target/ | ||
.settings/* | ||
.vscode/* | ||
.classpath | ||
.factorypath | ||
.project | ||
/dependency-reduced-pom.xml | ||
.idea/** | ||
*.iml | ||
.flattened-pom.xml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,47 +1,64 @@ | ||
// Before publishing your new repository: | ||
// 1. Write the readme file | ||
// 2. Update the issues link in Contributing section in the readme file | ||
// 3. Update the discussion link in config.yml file in .github/ISSUE_TEMPLATE directory | ||
|
||
= repo-template | ||
|
||
// Add a short description of your project. Tell what your project does and what it's used for. | ||
|
||
This is a template repository for Teragrep organization. | ||
= Java Record Routing Library | ||
|
||
== Features | ||
|
||
// List your project's features | ||
- Host+Tag based routing: CFE07Routing | ||
- Host+Tag based index and sourcetype enrichment: CFE12Routing | ||
- Authentication Token based Host+Tag information enrichment: CFE16Routing | ||
- Account ID + LogGroup based Host+Tag information enrichment: KIN02Routing | ||
|
||
== Examples | ||
|
||
== Documentation | ||
=== CFE07Routing | ||
|
||
See the official documentation on https://docs.teragrep.com[docs.teragrep.com]. | ||
[source, java] | ||
-- | ||
CFE07Routing cfe07Routing = new CFE07Routing("src/test/resources/cfe_07"); | ||
|
||
== Limitations | ||
RoutingKey key = new RoutingKey("group-one-host-one", "group-one-tag-two"); | ||
|
||
// If your project has limitations, please list them. Otherwise remove this section. | ||
for (String target : cfe07Routing.getTargets(key)) { | ||
// spool target | ||
if ("spool".equals(target)) { | ||
// do spool stuff | ||
} | ||
} | ||
|
||
== How to [compile/use/implement] | ||
-- | ||
|
||
// add instructions how people can start to use your project | ||
=== CFE12Routing | ||
|
||
== Contributing | ||
[source, java] | ||
-- | ||
CFE12Routing cfe12Routing = new CFE12Routing("src/test/resources/cfe_12"); | ||
|
||
// Change the repository name in the issues link to match with your project's name | ||
RoutingKey key = new RoutingKey("example-host", "124f76f0-net"); | ||
|
||
You can involve yourself with our project by https://github.com/teragrep/repo-template/issues/new/choose[opening an issue] or submitting a pull request. | ||
for (String index : cfe12Routing.getIndexes(key)) { | ||
for (String sourcetype : cfe12Routing.getSourcetypes(key)) { | ||
// do stuff for each index and for each sourcetype | ||
} | ||
} | ||
-- | ||
|
||
Contribution requirements: | ||
=== CFE16Routing | ||
|
||
. *All changes must be accompanied by a new or changed test.* If you think testing is not required in your pull request, include a sufficient explanation as why you think so. | ||
. Security checks must pass | ||
. Pull requests must align with the principles and http://www.extremeprogramming.org/values.html[values] of extreme programming. | ||
. Pull requests must follow the principles of Object Thinking and Elegant Objects (EO). | ||
[source, java] | ||
-- | ||
CFE16Routing cfe16Routing = new CFE16Routing("src/test/resources/cfe_16"); | ||
RoutingKey key = cfe16Routing.getRoutingKey("My RoutingKey having token"); | ||
|
||
Read more in our https://github.com/teragrep/teragrep/blob/main/contributing.adoc[Contributing Guideline]. | ||
String hostname = key.getHostname(); | ||
String appName = key.getAppName(); | ||
-- | ||
|
||
=== Contributor License Agreement | ||
=== KIN02Routing | ||
|
||
Contributors must sign https://github.com/teragrep/teragrep/blob/main/cla.adoc[Teragrep Contributor License Agreement] before a pull request is accepted to organization's repositories. | ||
[source, java] | ||
-- | ||
KIN02Routing kin02Routing = new KIN02Routing("src/test/resources/kin_02"); | ||
RoutingKey key = kin02Routing.getRoutingKey("1234567890","/example/logGroupName/ThatExists"); | ||
|
||
You need to submit the CLA only once. After submitting the CLA you can contribute to all Teragrep's repositories. | ||
String hostname key.getHostname(); | ||
String appName = key.getAppName(); | ||
-- |
Oops, something went wrong.