Continuous Delivery and Testing¶
You can use a continuous integration tool to automate testing and deploying your Splunk apps. This will allow you to:
- Test your app on several platforms and versions of Splunk automatically (or with a click of a button)
- Easily build clean and consistent copies of your app (avoids the possible corrupt builds made on Developer hosts)
- Deploy the app to your test and production hosts with a single click
To use a created package (spl or tar.gz), make sure to:
- Make a fetch artifact step
- Set the fetch as a file, not a directory (https://groups.google.com/forum/#!searchin/go-cd/gocd$20fetch$20zip$20artifact$20%7Csort:relevance/go-cd/Ja5lBT6bpRA/A0ojaSRqBwAJ)
- Have build targets clean the working directory so that old contents don't carry over
- restart_splunkd (to restart Splunk)
- web_debug (to bump Splunk)
You might need to add the user "go" to the "splunk" group:
sudo usermod -G splunk goShould this be done using:
- The build script?
- Pros: Could hide password using secure variable; can be done in a single line; password can be globally in environment variables
- Cons: requires the build script as a material; requires ant on all agents
- Direct commands?
- Straight copying?
- Could hide password using secure variable
- Can be done in a single line
- Password can be globally in environment variables
- Could bump Splunk too
- Requires downloading the build script as a material
- Requires ant on the agents