mirror of
https://github.com/splunk/security_content
synced 2026-06-08 17:32:49 +00:00
moving logic to ci to copy analyticstories.conf
This commit is contained in:
@@ -83,6 +83,8 @@ jobs:
|
||||
cd security-content
|
||||
source venv/bin/activate
|
||||
python bin/generate.py --path . --output package --storiesv1 --use_case_lib -v
|
||||
# make a copy of use_case_lib in order to have ES work :-(
|
||||
cp package/default/use_case_library.conf package/default/analyticstories.conf
|
||||
- run:
|
||||
name: update version and build number
|
||||
command: |
|
||||
@@ -98,7 +100,6 @@ jobs:
|
||||
# update build number and version
|
||||
sed -i "s/build = .*$/build = $CIRCLE_BUILD_NUM/g" package/default/app.conf
|
||||
sed -i "s/^version = .*$/version = $CONTENT_VERSION/g" package/default/app.conf
|
||||
# sed -i "s/\"version\": .*$/ \"version\": \"$CONTENT_VERSION\"/g" package/app.manifest
|
||||
sed -i "s/version = .*$/version = $CONTENT_VERSION/g" package/default/content-version.conf
|
||||
tar -czf content-pack-build.tar.gz package/*
|
||||
- persist_to_workspace:
|
||||
|
||||
@@ -17,8 +17,6 @@ dist/
|
||||
downloads/
|
||||
eggs/
|
||||
.eggs/
|
||||
lib/
|
||||
lib64/
|
||||
parts/
|
||||
sdist/
|
||||
var/
|
||||
|
||||
+4
-4
@@ -735,7 +735,7 @@ def write_analytics_story_confv1(stories, detections, investigations, baselines,
|
||||
def write_use_case_lib_conf(stories, detections, investigations, baselines, OUTPUT_DIR):
|
||||
|
||||
# Create conf files from analytics stories files
|
||||
use_case_lib_path = OUTPUT_DIR + "/default/analyticstories.conf"
|
||||
use_case_lib_path = OUTPUT_DIR + "/default/use_case_library.conf"
|
||||
output_file = open(use_case_lib_path, 'w')
|
||||
output_file.write("#############\n")
|
||||
output_file.write("# Automatically generated by generator.py in splunk/security-content\n")
|
||||
@@ -1101,14 +1101,14 @@ if __name__ == "__main__":
|
||||
# grab arguments
|
||||
parser = argparse.ArgumentParser(description="generates splunk conf files out of security-content manifests", epilog="""
|
||||
This tool converts manifests to the source files to be used by products like Splunk Enterprise.
|
||||
It generates the savesearches.conf, analytic_stories.conf files for ES.""")
|
||||
It generates the savesearches.conf, analytics_stories.conf files for ES.""")
|
||||
parser.add_argument("-p", "--path", required=True, help="path to security-content repo")
|
||||
parser.add_argument("-o", "--output", required=True, help="path to the output directory")
|
||||
parser.add_argument("-v", "--verbose", required=False, default=False, action='store_true', help="prints verbose output")
|
||||
parser.add_argument("-sv1", "--storiesv1", required=False, default=True, action='store_true',
|
||||
help="generates analytic_stories.conf in v1 format")
|
||||
help="generates analytics_stories.conf in v1 format")
|
||||
parser.add_argument("-u", "--use_case_lib", required=False, default=True, action='store_true',
|
||||
help="generates analyticstories.conf for ES Use Case Library")
|
||||
help="generates use_case_library.conf for ES")
|
||||
|
||||
# parse them
|
||||
args = parser.parse_args()
|
||||
|
||||
Reference in New Issue
Block a user