Skip to content

Commit f8a551c

Browse files
siddharth-khatsuriyamgrandys-splunkdvarasani-crestdkvashninsplunkkdoroszko-splunk
authored
chore(release): merge develop to main (#398)
### Description Changes in the PR: --- - Update in AppInspect CLI action version Ref: #394 - Added conditions skip tests, build, app-inspect and publish if the changes in PR are only related to documentation Ref: #389 - Changes in the runbok for appinspect update Ref: #395 - Run appinspect api job for release/ branches in build-test-release pipeline Ref: #376 - Bumps the k8s-manifests-branch version from v3.3.2 to v3.4.1 Ref: #393 - k8s-manifests-branch changes references - Fix for the issue with the scripted input where the tests were failing with invalid HEC token error. Ref: splunk/ta-automation-k8s-manifests#120 - Added support for the new unified modinput tests framework in upgrade tests. Ref: splunk/ta-automation-k8s-manifests#118 - This PR fixes deployments for TAs using vendor products. It's required change to succesfully run ucc modinput tests ref: splunk/ta-automation-k8s-manifests#123 - Enabled JMX authentication in Tomcat Docker by adding jmxremote.access and jmxremote.password files. Updated CATALINA_OPTS to support authentication for automation purposes. ref: splunk/ta-automation-k8s-manifests#124 ### Checklist - [ ] `README.md` has been updated or is not required - [ ] push trigger tests - [ ] manual release test - [ ] automated releases test - [ ] pull request trigger tests - [ ] schedule trigger tests - [ ] workflow errors/warnings reviewed and addressed ### Testing done FDR: https://github.com/splunk/splunk-add-on-for-crowdstrike-fdr/actions/runs/15320727045 --------- Co-authored-by: mgrandys-splunk <153620320+mgrandys-splunk@users.noreply.github.com> Co-authored-by: dvarasani-crest <151819886+dvarasani-crest@users.noreply.github.com> Co-authored-by: Dmytro Kvashnin <dkvashnin@splunk.com> Co-authored-by: kdoroszko-splunk <kdoroszko@splunk.com> Co-authored-by: mkolasinski-splunk <mkolasinski@splunk.com> Co-authored-by: mkolasinski-splunk <105011638+mkolasinski-splunk@users.noreply.github.com> Co-authored-by: Dmytro Kvashnin <139753462+dkvashninsplunk@users.noreply.github.com> Co-authored-by: harshilgajera-crest <69803385+harshilgajera-crest@users.noreply.github.com>
1 parent 5d99d24 commit f8a551c

File tree

2 files changed

+44
-12
lines changed

2 files changed

+44
-12
lines changed

.github/workflows/reusable-build-test-release.yml

Lines changed: 43 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -39,13 +39,13 @@ on:
3939
required: false
4040
description: "branch for k8s manifests to run the tests on"
4141
type: string
42-
default: "v3.3.4"
42+
default: "v3.5.0"
4343
scripted-inputs-os-list:
4444
required: false
4545
description: "list of OS used for scripted input tests"
4646
type: string
4747
default: >-
48-
["ubuntu:14.04", "ubuntu:16.04","ubuntu:18.04","ubuntu:22.04", "ubuntu:24.04", "redhat:8.4", "redhat:8.5", "redhat:8.6", "redhat:8.8"]
48+
["ubuntu:16.04", "ubuntu:18.04", "ubuntu:20.04", "ubuntu:22.04", "ubuntu:24.04", "redhat:8.4", "redhat:8.5", "redhat:8.6", "redhat:8.8", "redhat:9.5"]
4949
upgrade-tests-ta-versions:
5050
required: false
5151
description: "List with TA versions (in 'X.X.X' format) that should be used as starting points for upgrade tests. Example: ['7.6.0', '7.7.0']"
@@ -122,8 +122,36 @@ jobs:
122122
exit 1
123123
fi
124124
125+
check-docs-changes:
126+
runs-on: ubuntu-latest
127+
outputs:
128+
docs-only: ${{ steps.check.outputs.docs-only }}
129+
steps:
130+
- name: Checkout code
131+
uses: actions/checkout@v4
132+
133+
- name: Fetch all refs
134+
run: git fetch --prune --unshallow
135+
136+
- name: Check if the changes are only in docs/*, mkdocs.yml, or .github/workflows/docs.yml
137+
id: check
138+
run: |
139+
set -o xtrace
140+
# List all files modified in the commit or PR
141+
changed_files=$(git diff --name-only --diff-filter=ACMRT ${{ github.event.pull_request.base.sha }} ${{ github.sha }})
142+
143+
# Check if any of the changed files are not in docs/*, mkdocs.yml, or .github/workflows/docs.yml
144+
if echo "$changed_files" | grep -vqE '^(docs/|mkdocs.yml|.github/workflows/docs.yml)'; then
145+
echo "docs-only=false" >> "$GITHUB_OUTPUT"
146+
else
147+
echo "Only documentation changes found."
148+
echo "docs-only=true" >> "$GITHUB_OUTPUT"
149+
fi
150+
125151
setup-workflow:
126152
runs-on: ubuntu-latest
153+
needs:
154+
- check-docs-changes
127155
outputs:
128156
execute-knowledge-labeled: ${{ steps.configure-tests-on-labels.outputs.execute_knowledge_labeled }}
129157
execute-spl2-labeled: ${{ steps.configure-tests-on-labels.outputs.execute_spl2_labeled }}
@@ -381,6 +409,8 @@ jobs:
381409

382410
test-inventory:
383411
runs-on: ubuntu-latest
412+
needs:
413+
- check-docs-changes
384414
# Map a step output to a job output
385415
outputs:
386416
spl2: ${{ steps.testset.outputs.spl2 }}
@@ -396,8 +426,8 @@ jobs:
396426
- id: testset
397427
name: Check available test types
398428
run: |
399-
find tests -type d -maxdepth 1 -mindepth 1 | sed 's|^tests/||g' | while read -r TESTSET; do echo "$TESTSET=true" >> "$GITHUB_OUTPUT"; echo "$TESTSET::true"; done
400-
find package/default/data -type d -name "spl2" -maxdepth 1 -mindepth 1 | sed 's|^package/default/data/||g' | while read -r TESTSET; do echo "$TESTSET=true" >> "$GITHUB_OUTPUT"; echo "$TESTSET::true"; done
429+
find tests -type d -maxdepth 1 -mindepth 1 | sed 's|^tests/||g' | while read -r TESTSET; do echo "$TESTSET=${{ needs.check-docs-changes.outputs.docs-only == 'false' && 'true' || 'false' }}" >> "$GITHUB_OUTPUT"; echo "$TESTSET::${{ needs.check-docs-changes.outputs.docs-only == 'false' && 'true' || 'false' }}"; done
430+
find package/default/data -type d -name "spl2" -maxdepth 1 -mindepth 1 | sed 's|^package/default/data/||g' | while read -r TESTSET; do echo "$TESTSET=${{ needs.check-docs-changes.outputs.docs-only == 'false' && 'true' || 'false' }}" >> "$GITHUB_OUTPUT"; echo "$TESTSET::${{ needs.check-docs-changes.outputs.docs-only == 'false' && 'true' || 'false' }}"; done
401431
402432
run-unit-tests:
403433
name: test-unit-python3-${{ matrix.python-version }}
@@ -540,6 +570,7 @@ jobs:
540570
build:
541571
runs-on: ubuntu-22.04
542572
needs:
573+
- check-docs-changes
543574
- validate-custom-version
544575
- setup-workflow
545576
- test-inventory
@@ -550,7 +581,7 @@ jobs:
550581
- semgrep
551582
- run-unit-tests
552583
- fossa-scan
553-
if: ${{ !cancelled() && (needs.run-unit-tests.result == 'success' || needs.run-unit-tests.result == 'skipped') && (needs.validate-custom-version.result == 'success' || needs.validate-custom-version.result == 'skipped') }}
584+
if: ${{ !cancelled() && (needs.run-unit-tests.result == 'success' || needs.run-unit-tests.result == 'skipped') && (needs.validate-custom-version.result == 'success' || needs.validate-custom-version.result == 'skipped') && (needs.check-docs-changes.outputs.docs-only == 'false') }}
554585
outputs:
555586
buildname: ${{ steps.buildupload.outputs.name }}
556587
permissions:
@@ -728,6 +759,7 @@ jobs:
728759
build-3_9:
729760
runs-on: ubuntu-latest
730761
needs:
762+
- check-docs-changes
731763
- validate-custom-version
732764
- setup-workflow
733765
- test-inventory
@@ -741,7 +773,8 @@ jobs:
741773
if: |
742774
always() &&
743775
(needs.run-unit-tests-3_9.result == 'success' || needs.run-unit-tests-3_9.result == 'skipped') &&
744-
(needs.validate-custom-version.result == 'success' || needs.validate-custom-version.result == 'skipped')
776+
(needs.validate-custom-version.result == 'success' || needs.validate-custom-version.result == 'skipped') &&
777+
(needs.check-docs-changes.outputs.docs-only == 'false')
745778
permissions:
746779
contents: write
747780
packages: read
@@ -856,7 +889,7 @@ jobs:
856889
name: package-splunkbase
857890
path: build/package/
858891
- name: Scan
859-
uses: splunk/appinspect-cli-action@v2.9
892+
uses: splunk/appinspect-cli-action@v2.10
860893
with:
861894
app_path: build/package/
862895
included_tags: ${{ matrix.tags }}
@@ -881,7 +914,7 @@ jobs:
881914
if: |
882915
!cancelled() &&
883916
needs.build.result == 'success' &&
884-
( github.base_ref == 'main' || github.ref_name == 'main' )
917+
( github.base_ref == 'main' || github.ref_name == 'main' || startsWith(github.base_ref, 'release/') || startsWith(github.ref_name, 'release/') )
885918
runs-on: ubuntu-latest
886919
strategy:
887920
fail-fast: false
@@ -2903,6 +2936,7 @@ jobs:
29032936
outputs:
29042937
run-publish: ${{ steps.check.outputs.run-publish }}
29052938
needs:
2939+
- check-docs-changes
29062940
- validate-custom-version
29072941
- meta
29082942
- compliance-copyrights
@@ -2928,7 +2962,7 @@ jobs:
29282962
shell: bash
29292963
run: |
29302964
RUN_PUBLISH=$(echo "$NEEDS" | jq ".[] | select( ( .result != \"skipped\" ) and .result != \"success\" ) | length == 0")
2931-
if [[ "$RUN_PUBLISH" != *'false'* ]]
2965+
if [[ "$RUN_PUBLISH" != *'false'* ]] && [[ "${{ needs.check-docs-changes.outputs.docs-only }}" == 'false' ]]
29322966
then
29332967
echo "run-publish=true" >> "$GITHUB_OUTPUT"
29342968
echo "Publish conditions are met."

runbooks/update_appinspect_cli_action.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,8 @@ Once Splunk AppInspect team releases AppInspect CLI - we need to make sure that
2222

2323
- create a PR in this repository with a new version of the action ([example PR](https://github.com/splunk/addonfactory-workflow-addon-release/pull/247))
2424
- make sure that PR is towards `main` branch
25+
- make sure the title of the PR follows the format: "fix: update AppInspect CLI action to v.X.Y"
2526
- make sure that the pipeline is green
26-
- determine which version of `appinspect-cli-action` needs to be released based on the PR
27-
- if it is a bug fix or dependecnies update - "fix" in the title of the PR
28-
- if it is a feature release - "feat" in the title of the PR
2927
- attach a link to a test run of reusable workflow
3028
- get review from the team
3129
- "Squash and merge" the PR

0 commit comments

Comments
 (0)