-
Notifications
You must be signed in to change notification settings - Fork 1
add yaml #44
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
add yaml #44
Changes from 1 commit
Commits
Show all changes
19 commits
Select commit
Hold shift + click to select a range
bcc5e67
add yaml
shalper2 24ec14a
Merge branch 'main' into DVR-96-add-yaml
edro15 8634048
Merge branch 'main' into DVR-96-add-yaml
edro15 9863de1
Merge branch 'main' into DVR-96-add-yaml
edro15 1416b91
Apply suggestion from @edro15
shalper2 dfe1e31
Apply suggestion from @edro15
shalper2 6d5ce5c
Apply suggestion from @edro15
shalper2 5f6614e
Apply suggestion from @edro15
shalper2 c031921
Update reusable-test-ta-install.yml
shalper2 45ea901
Update reusable-test-ta-install.yml
shalper2 a384d81
Update reusable-test-ta-install.yml
shalper2 78de851
Update reusable-test-ta-install.yml
shalper2 3758114
Update reusable-test-ta-install.yml
shalper2 72679dd
Update reusable-test-ta-install.yml
shalper2 4577e3f
Update reusable-test-ta-install.yml
shalper2 94d9374
Update reusable-test-ta-install.yml
shalper2 f905cca
Update reusable-test-ta-install.yml
shalper2 ae53c10
Update reusable-test-ta-install.yml
shalper2 a7e054a
Merge branch 'main' into DVR-96-add-yaml
edro15 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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,56 @@ | ||
| name: Test Splunk TA Installs | ||
|
|
||
| on: | ||
| push: | ||
| workflow_dispatch: | ||
|
|
||
| env: | ||
| SPLUNK_PASSWORD: password | ||
| SPLUNK_USER: admin | ||
| # Set this to your actual TA folder/app name (must match the folder name under etc/apps) | ||
| TA_NAME: TA-your_addon_name | ||
|
shalper2 marked this conversation as resolved.
Outdated
|
||
|
|
||
| jobs: | ||
| test-ta-install: | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
|
shalper2 marked this conversation as resolved.
Outdated
|
||
|
|
||
| - name: Start Splunk (Docker) | ||
| run: | | ||
| docker run -d --name splunk \ | ||
| -e SPLUNK_START_ARGS="--accept-license" \ | ||
|
shalper2 marked this conversation as resolved.
Outdated
|
||
| -e SPLUNK_PASSWORD="${SPLUNK_PASSWORD}" \ | ||
| -p 8089:8089 -p 8000:8000 \ | ||
| splunk/splunk:latest | ||
|
|
||
| - name: Wait for Splunk API | ||
| run: | | ||
| for i in {1..60}; do | ||
| if curl -sk https://localhost:8089/services/server/info >/dev/null; then | ||
| echo "Splunk is up" | ||
| exit 0 | ||
| fi | ||
| sleep 5 | ||
| done | ||
| docker logs splunk | ||
| exit 1 | ||
|
|
||
| - name: Install TA into Splunk and restart | ||
| run: | | ||
| docker exec splunk mkdir -p /opt/splunk/etc/apps/"$TA_NAME" | ||
| docker cp . splunk:/opt/splunk/etc/apps/"$TA_NAME" | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Not sure this is going to work. Need to build the TA from package first to be able to copy it in the container. 🤔 |
||
| docker exec splunk bash -lc "chown -R splunk:splunk /opt/splunk/etc/apps/$TA_NAME" | ||
| docker exec splunk bash -lc "/opt/splunk/bin/splunk restart --accept-license --answer-yes --no-prompt" | ||
|
|
||
| - name: Verify app is registered | ||
| run: | | ||
| docker exec splunk bash -lc \ | ||
| "curl -sk -u ${SPLUNK_USER}:${SPLUNK_PASSWORD} \ | ||
| https://localhost:8089/services/apps/local?count=0 \ | ||
| | tr '\n' ' ' \ | ||
| | grep -q \"<title>${TA_NAME}</title>\"" | ||
|
|
||
| - name: Dump logs on failure | ||
| if: failure() | ||
| run: docker logs splunk | ||
|
github-advanced-security[bot] marked this conversation as resolved.
Fixed
|
||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.