Open auzroz opened 4 years ago
Hi @auzroz Please let me know if I have misunderstood this request, but it sounds like you are trying to get code changes from the repository TO splunk. Unfortunately this is not possible with this git_for_splunk app as it is designed for one-way from Splunk TO the repository. This is primarily becuase merge conflicts can occur (becuase Splunk will change files itself) and the app provides no method to resolve these.
the KSconf app https://github.com/Kintyre/ksconf might be of interest to you All the best, Chris
Sorry, I was misunderstood. I am looking at committing changes from Splunk TO the repository, but don't want to commit those changes directly to the remote master branch in the event that introduces unauthorized or breaking changes.
Hmm, OK. As long as this doesn't require user input, then it should be possible. Unless there is wide demand for such a feature, then it's probably fastest to just fork your own version of this repository and change the code to do what you want. I expect the only file you will need to change is this one: https://github.com/ChrisYounger/git_for_splunk/blob/master/bin/input_module_gitforsplunk.py
That file should hopefully be easy enough to understand. It's just over 100 lines of code.
If you think this is something that many others would benefit from, then please let me know. All the best :)
In our environment, we would like to perform drift detection and ensure that configurations that are present, should be present, and cherry pick those that are. In order to do this, we push changes from the local system to a remote branch and then merge request them back into master branch.
Something along the lines of (pseudocode):