[FR] Generate Historical Rule Files in Build Release Packages (#2715)
* adding solution for historical rules in release package * addressing flake errors * format changes * REVERT CHANGES - testing release-fleet workflow * REVERTING CHANGES * added historical flag for packaging to account for older branches * addressing flake errors * updated build for CI * REMOVE: This is temporary to run a workflow from this branch * updates to address requirements for contents * reverting packages.yml * Update detection_rules/integrations.py Co-authored-by: Mika Ayenson <Mikaayenson@users.noreply.github.com> * Update detection_rules/integrations.py Co-authored-by: Mika Ayenson <Mikaayenson@users.noreply.github.com> * addressed feedback and added click echo comments * addressed flake errors and added some comments --------- Co-authored-by: Mika Ayenson <Mikaayenson@users.noreply.github.com>
This commit is contained in:
@@ -41,7 +41,7 @@ jobs:
|
||||
# only generate the navigator files on push events to main
|
||||
GENERATE_NAVIGATOR_FILES: "${{ github.event_name == 'push' && github.ref == 'refs/heads/main' && '--generate-navigator' || ' ' }}"
|
||||
run: |
|
||||
python -m detection_rules dev build-release $GENERATE_NAVIGATOR_FILES
|
||||
python -m detection_rules dev build-release $GENERATE_NAVIGATOR_FILES --add-historical 'no'
|
||||
|
||||
- name: Archive production artifacts for branch builds
|
||||
uses: actions/upload-artifact@v2
|
||||
|
||||
@@ -15,8 +15,8 @@ on:
|
||||
description: 'Create a PR as draft'
|
||||
required: false
|
||||
options:
|
||||
- "y"
|
||||
- "n"
|
||||
- "yes"
|
||||
- "no"
|
||||
package_maturity:
|
||||
type: choice
|
||||
description: 'Package Maturity'
|
||||
@@ -31,6 +31,13 @@ on:
|
||||
options:
|
||||
- "true"
|
||||
- "false"
|
||||
add_historical:
|
||||
type: choice
|
||||
description: 'Add Historical Rules'
|
||||
required: true
|
||||
options:
|
||||
- "yes"
|
||||
- "no"
|
||||
commit_hash:
|
||||
description: 'Commit hash'
|
||||
required: true
|
||||
@@ -136,9 +143,11 @@ jobs:
|
||||
git push origin $RELEASE_TAG
|
||||
|
||||
- name: Build release package
|
||||
env:
|
||||
HISTORICAL: "${{github.event.inputs.add_historical}}"
|
||||
run: |
|
||||
cd detection-rules
|
||||
python -m detection_rules dev build-release
|
||||
python -m detection_rules dev build-release --add-historical $HISTORICAL
|
||||
|
||||
- name: Set github config
|
||||
run: |
|
||||
|
||||
Reference in New Issue
Block a user