-
Notifications
You must be signed in to change notification settings - Fork 121
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 #161 from splunk/DVPL-9687
Github Actions: Test & Release implemented.
- Loading branch information
Showing
5 changed files
with
108 additions
and
8 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,34 @@ | ||
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 | ||
server-id: splunk-artifactory | ||
- name: build | ||
run: mvn package --file pom.xml -DskipTests=true | ||
- 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 -DskipTests=true | ||
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,65 @@ | ||
name: Java SDK Test | ||
|
||
on: | ||
[push, pull_request] | ||
|
||
jobs: | ||
test: | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: | ||
- ubuntu-latest | ||
java-version: | ||
- 1.8 | ||
splunk-version: | ||
- "8.0" | ||
- "8.2.0" | ||
runs-on: ${{ matrix.os }} | ||
|
||
services: | ||
splunk: | ||
image: splunk/splunk:${{matrix.splunk-version}} | ||
env: | ||
SPLUNK_START_ARGS: --accept-license | ||
SPLUNK_PASSWORD: changed! | ||
TEST_TCP_PORT: 10667 | ||
TEST_UDP_PORT: 10668 | ||
SPLUNK_HOME: "/opt/splunk" | ||
ports: | ||
- 8000:8000 | ||
- 8089:8089 | ||
- 8088:8088 | ||
- 10667:10667 | ||
- 10668: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: Create .splunkrc file | ||
run: | | ||
cd ~ | ||
echo host=localhost >> .splunkrc | ||
echo port=8089 >> .splunkrc | ||
echo username=admin >> .splunkrc | ||
echo password=changed! >> .splunkrc | ||
echo scheme=https >> .splunkrc | ||
echo version=${{ matrix.splunk }} >> .splunkrc | ||
- name: Test using maven | ||
run: make test | ||
env: | ||
SPLUNK_HOME: "/opt/splunk" | ||
TEST_TCP_PORT: 10667 | ||
TEST_UDP_PORT: 10668 |
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