Skip to content

Commit 463560f

Browse files
authored
Merge pull request #115 from splunk/DVPL-9114
WIP: Stabilize CI/CD
2 parents de1fb32 + 8552270 commit 463560f

File tree

458 files changed

+66783
-52758
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

458 files changed

+66783
-52758
lines changed

.env

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
SPLUNK_HOME="/opt/splunk"

.github/workflows/release.yml

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
name: Create Release
2+
3+
on:
4+
release:
5+
types: [published]
6+
7+
jobs:
8+
publish-npm:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: actions/checkout@v2
12+
- uses: actions/setup-node@v2
13+
with:
14+
node-version: 14
15+
registry-url: https://registry.npmjs.org/
16+
- run: npm publish
17+
env:
18+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

.github/workflows/test.yml

+57
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
name: Node.js CI
2+
3+
on: [push, pull_request]
4+
5+
jobs:
6+
build:
7+
runs-on: ${{ matrix.os }}
8+
9+
strategy:
10+
matrix:
11+
os:
12+
- ubuntu-latest
13+
node:
14+
- 14
15+
- 8.17.0
16+
splunk-version:
17+
- "8.0"
18+
- "latest"
19+
20+
services:
21+
splunk:
22+
image: splunk/splunk:${{matrix.splunk-version}}
23+
env:
24+
SPLUNK_START_ARGS: --accept-license
25+
SPLUNK_HEC_TOKEN: 11111111-1111-1111-1111-1111111111113
26+
SPLUNK_PASSWORD: changed!
27+
SPLUNK_APPS_URL: https://github.com/splunk/sdk-app-collection/releases/download/v1.0.0/sdk-app-collection.tgz
28+
ports:
29+
- 8000:8000
30+
- 8088:8088
31+
- 8089:8089
32+
33+
steps:
34+
- uses: actions/checkout@v2
35+
36+
- name: Use node ${{ matrix.node }}
37+
uses: actions/setup-node@v2
38+
with:
39+
node-version: ${{ matrix.node }}
40+
41+
- name: Create .splunkrc file
42+
run: |
43+
cd ~
44+
echo host=localhost > .splunkrc
45+
echo port=8089 >> .splunkrc
46+
echo username=admin >> .splunkrc
47+
echo password=changed! >> .splunkrc
48+
echo scheme=https >> .splunkrc
49+
echo version=${{ matrix.splunk }} >> .splunkrc
50+
51+
- name: Run npm install
52+
run: npm install
53+
54+
- name: Run make test
55+
run: make test
56+
env:
57+
SPLUNK_HOME: /opt/splunk

CREDITS.md

+4
Original file line numberDiff line numberDiff line change
@@ -14,3 +14,7 @@ Some of the components included in the Splunk Enterprise SDK for JavaScript are
1414
| [commander](https://github.com/visionmedia/commander.js/) | Node.js command-line interfaces | [MIT](https://github.com/splunk/splunk-sdk-javascript/blob/master/licenses/LICENSE-COMMANDER) |
1515
| [script.js](https://github.com/ded/script.js/) | Asyncronous JavaScript loader and dependency manager | [Apache](https://github.com/splunk/splunk-sdk-javascript/blob/master/licenses/LICENSE-SCRIPTJS) |
1616
| [base64.js](http://code.google.com/p/javascriptbase64/) | Fast base64 encoding/decoding | [MIT](https://github.com/splunk/splunk-sdk-javascript/blob/master/licenses/LICENSE-BASE64) |
17+
| [dotenv](https://github.com/motdotla/dotenv) | Loads environment varibles from .env file | [BSD 2-Clause](https://github.com/splunk/splunk-sdk-javascript/blob/master/licenses/LICENSE-DOTENV) |
18+
| [cookie](https://github.com/jshttp/cookie) | HTTP cookie parser and serializer for HTTP servers | [MIT](https://github.com/splunk/splunk-sdk-javascript/blob/master/licenses/LICENSE-COOKIE) |
19+
| [elementtree](https://github.com/racker/node-elementtree) | Node.js XML parserer and serializer | [Apache-2.0](https://github.com/splunk/splunk-sdk-javascript/blob/master/licenses/LICENSE-ELEMENTTREE) |
20+
| [needle](https://github.com/tomas/needle) | Node.js http client | [MIT](https://github.com/splunk/splunk-sdk-javascript/blob/master/licenses/LICENSE-NEEDLE) |

Makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ init:
2424
.PHONY: test
2525
test:
2626
@echo "$(ATTN_COLOR)==> test $(NO_COLOR)"
27-
@node sdkdo tests
27+
@node sdkdo tests ${arg}
2828

2929
.PHONY: test_specific
3030
test_specific:

README.md

+5-5
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,13 @@ For more information, see [Splunk Enterprise SDK for JavaScript](https://dev.spl
99

1010
## Requirements
1111

12-
* Node.js v 0.12, or v4 or later
12+
* Node.js v 8.17.0, or v14 or later
1313

14-
The Splunk Enterprise SDK for JavaScript was tested with Node.js v.0.12, v4.2, and v10.0.
14+
The Splunk Enterprise SDK for JavaScript was tested with Node.js v8.17.0, v14.
1515

16-
* Splunk Enterprise 6.3.0 or later, or Splunk Cloud
16+
* Splunk Enterprise 8.2.0 or later, or Splunk Cloud
1717

18-
The Splunk Enterprise SDK for JavaScript was tested with Splunk Enterprise 7.0 and 7.2.
18+
The Splunk Enterprise SDK for JavaScript was tested with Splunk Enterprise 8.0 or 8.2, or Splunk Cloud.
1919

2020
* Splunk Enterprise SDK for JavaScript
2121

@@ -129,7 +129,7 @@ To use this convenience file, create a text file with the following format:
129129
# Access scheme (default: https)
130130
scheme=https
131131
# Your version of Splunk Enterprise
132-
version=7.2
132+
version=8.2
133133

134134
Save the file as **.splunkrc** in the current user's home directory.
135135

0 commit comments

Comments
 (0)