Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #173 from splunk/develop
Release 1.9
- Loading branch information
Showing
23 changed files
with
623 additions
and
183 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,33 @@ | ||
on: | ||
release: | ||
types: [published] | ||
|
||
name: Create Release | ||
|
||
jobs: | ||
build: | ||
name: Create Release | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Set up JDK 1.8 | ||
uses: actions/setup-java@v1 | ||
with: | ||
java-version: 1.8 | ||
server-username: MAVEN_USERNAME | ||
server-password: MAVEN_PASSWORD | ||
- name: build | ||
run: mvn -B package --file pom.xml | ||
- name: Create GitHub Release | ||
uses: softprops/action-gh-release@v1 | ||
with: | ||
# body_path: ${{ github.workflow }}-CHANGELOG.txt | ||
files: ./target/*.jar | ||
draft: true | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
- name: Deploy to Artifactory | ||
run: mvn --batch-mode deploy | ||
env: | ||
MAVEN_USERNAME: ${{ secrets.ARTIFACTORY_USERNAME }} | ||
MAVEN_PASSWORD: ${{ secrets.ARTIFACTORY_PASSWORD }} |
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,75 @@ | ||
name: Java CI with Maven | ||
|
||
on: | ||
[push, pull_request] | ||
|
||
jobs: | ||
unit-test: | ||
strategy: | ||
matrix: | ||
java-version: | ||
- 1.8 | ||
- 11 | ||
os: | ||
- ubuntu-latest | ||
- windows-latest | ||
- macos-latest | ||
runs-on: ${{ matrix.os }} | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Set up JDK | ||
uses: actions/setup-java@v1 | ||
with: | ||
java-version: ${{ matrix.java-version }} | ||
- name: Cache local Maven repository | ||
uses: actions/cache@v2 | ||
with: | ||
path: ~/.m2/repository | ||
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} | ||
restore-keys: | | ||
${{ runner.os }}-maven- | ||
- name: Unit Test | ||
run: mvn -P Unittest -B verify --file pom.xml | ||
|
||
acceptance-test: | ||
needs: unit-test | ||
strategy: | ||
matrix: | ||
splunk-version: | ||
- 8.1 | ||
- 7.3 | ||
runs-on: ubuntu-latest | ||
container: maven:3-jdk-8 | ||
|
||
services: | ||
splunk: | ||
image: splunk/splunk:${{matrix.splunk-version}} | ||
env: | ||
SPLUNK_START_ARGS: --accept-license | ||
SPLUNK_PASSWORD: test_password | ||
ports: | ||
- 8089 | ||
- 8088 | ||
- 5555 | ||
- 15000 | ||
- 10667 | ||
- 10668/udp | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Set up JDK | ||
uses: actions/setup-java@v1 | ||
with: | ||
java-version: 1.8 | ||
- name: Cache local Maven repository | ||
uses: actions/cache@v2 | ||
with: | ||
path: ~/.m2/repository | ||
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} | ||
restore-keys: | | ||
${{ runner.os }}-maven- | ||
- name: Acceptance Test | ||
run: mvn -P AcceptanceTest -B verify --file pom.xml | ||
env: | ||
SPLUNK_PASSWORD: test_password | ||
SPLUNK_HOST: splunk |
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
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
17 changes: 17 additions & 0 deletions
17
src/main/java/com/splunk/logging/EventHeaderSerializer.java
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,17 @@ | ||
package com.splunk.logging; | ||
|
||
import java.util.Map; | ||
|
||
/** | ||
* | ||
* Define the interface to allow users to define their own event header serializer for HTTP event adapter: | ||
* Simply create a class implementing this interface, and add the full class name as a property (`eventHeaderSerializer`) to the adapter. | ||
* | ||
*/ | ||
public interface EventHeaderSerializer { | ||
|
||
Map<String, Object> serializeEventHeader( | ||
final HttpEventCollectorEventInfo eventInfo, | ||
final Map<String, Object> metadata | ||
); | ||
} |
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
Oops, something went wrong.