Skip to content

chore(release): merge develop to main #398

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 19 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
92a7bdf
chore: run appinspect api on release branches (#376)
mgrandys-splunk Mar 6, 2025
8adf4a0
feat: skip tests on docs only change (#389)
siddharth-khatsuriya Mar 24, 2025
e30a821
feat: adding docs change validation step in reuseable CI (#390)
siddharth-khatsuriya Apr 25, 2025
67b4168
fix: hec token validation issue in scripted inputs (#393)
dvarasani-crest May 6, 2025
1f26798
docs: change the runbok for appinspect update (#395)
kdoroszko-splunk May 6, 2025
d30b057
Merge branch 'main' into develop
mkolasinski-splunk May 8, 2025
c54ceab
fix: update AppInspect CLI action to v2.10 (#394)
siddharth-khatsuriya May 13, 2025
bddfb2b
chore: sync main into develop after conflict resolution (#399)
siddharth-khatsuriya May 13, 2025
4c9a825
chore: run appinspect api on release branches (#376)
mgrandys-splunk Mar 6, 2025
23c93f8
feat: skip tests on docs only change (#389)
siddharth-khatsuriya Mar 24, 2025
5e17b28
feat: adding docs change validation step in reuseable CI (#390)
siddharth-khatsuriya Apr 25, 2025
cd697b4
fix: hec token validation issue in scripted inputs (#393)
dvarasani-crest May 6, 2025
b93e398
docs: change the runbok for appinspect update (#395)
kdoroszko-splunk May 6, 2025
a8eb995
fix: update AppInspect CLI action to v2.10 (#394)
siddharth-khatsuriya May 13, 2025
e53353a
chore: sync main into develop after conflict resolution (#399)
siddharth-khatsuriya May 13, 2025
5843a59
Chore/resolve conflicts (#400)
siddharth-khatsuriya May 13, 2025
90cd8ec
Revert "feat: adding docs change validation step in reuseable CI (#39…
siddharth-khatsuriya May 26, 2025
1f14af1
chore: merge main to develop (#397)
mkolasinski-splunk May 27, 2025
f4d267f
fix: update os versions for scripted input tests (#407)
dvarasani-crest Jun 5, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
57 changes: 47 additions & 10 deletions .github/workflows/reusable-build-test-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,13 +39,13 @@ on:
required: false
description: "branch for k8s manifests to run the tests on"
type: string
default: "v3.3.3"
default: "v3.4.1"
scripted-inputs-os-list:
required: false
description: "list of OS used for scripted input tests"
type: string
default: >-
["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"]
["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"]
upgrade-tests-ta-versions:
required: false
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']"
Expand Down Expand Up @@ -122,8 +122,37 @@ jobs:
exit 1
fi

check-docs-changes:
runs-on: ubuntu-latest
outputs:
docs-only: ${{ steps.check.outputs.docs-only }}
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Fetch all refs
run: git fetch --prune --unshallow

- name: Check if the changes are only in docs/*, mkdocs.yml, or .github/workflows/docs.yml
id: check
run: |
set -o xtrace
# List all files modified in the commit or PR
changed_files=$(git diff --name-only --diff-filter=ACMRT ${{ github.event.pull_request.base.sha }} ${{ github.sha }})
# changed_files=$(git diff --name-only ${{ github.event.before }} ${{ github.sha }})

# Check if any of the changed files are not in docs/*, mkdocs.yml, or .github/workflows/docs.yml
if echo "$changed_files" | grep -vqE '^(docs/|mkdocs.yml|.github/workflows/docs.yml)'; then
echo "docs-only=false" >> "$GITHUB_OUTPUT"
else
echo "Only documentation changes found."
echo "docs-only=true" >> "$GITHUB_OUTPUT"
fi

setup-workflow:
runs-on: ubuntu-latest
needs:
- check-docs-changes
outputs:
execute-knowledge-labeled: ${{ steps.configure-tests-on-labels.outputs.execute_knowledge_labeled }}
execute-spl2-labeled: ${{ steps.configure-tests-on-labels.outputs.execute_spl2_labeled }}
Expand Down Expand Up @@ -169,7 +198,9 @@ jobs:
case "${{ github.event_name }}" in
"pull_request")
labels=$(echo '${{ toJSON(github.event.pull_request.labels) }}' | jq -r '.[] | .name')
if ${{ github.base_ref == 'main' }} && ${{ contains(github.event.pull_request.labels.*.name, 'use_labels') }}; then
if ${{ needs.check-docs-changes.outputs.docs-only == 'true' }}; then
echo -e "\033[1;33m⚠️ Skipping tests as there are only documentation related changes ⚠️\033[0m"
elif ${{ github.base_ref == 'main' }} && ${{ contains(github.event.pull_request.labels.*.name, 'use_labels') }}; then
for test_type in "${TESTSET[@]}"; do
if [[ "$labels" =~ $test_type ]]; then
EXECUTE_LABELED["$test_type"]="true"
Expand Down Expand Up @@ -381,6 +412,8 @@ jobs:

test-inventory:
runs-on: ubuntu-latest
needs:
- check-docs-changes
# Map a step output to a job output
outputs:
spl2: ${{ steps.testset.outputs.spl2 }}
Expand All @@ -396,8 +429,8 @@ jobs:
- id: testset
name: Check available test types
run: |
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
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
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
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

run-unit-tests:
name: test-unit-python3-${{ matrix.python-version }}
Expand Down Expand Up @@ -540,6 +573,7 @@ jobs:
build:
runs-on: ubuntu-22.04
needs:
- check-docs-changes
- validate-custom-version
- setup-workflow
- test-inventory
Expand All @@ -550,7 +584,7 @@ jobs:
- semgrep
- run-unit-tests
- fossa-scan
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') }}
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') }}
outputs:
buildname: ${{ steps.buildupload.outputs.name }}
permissions:
Expand Down Expand Up @@ -728,6 +762,7 @@ jobs:
build-3_9:
runs-on: ubuntu-latest
needs:
- check-docs-changes
- validate-custom-version
- setup-workflow
- test-inventory
Expand All @@ -741,7 +776,8 @@ jobs:
if: |
always() &&
(needs.run-unit-tests-3_9.result == 'success' || needs.run-unit-tests-3_9.result == 'skipped') &&
(needs.validate-custom-version.result == 'success' || needs.validate-custom-version.result == 'skipped')
(needs.validate-custom-version.result == 'success' || needs.validate-custom-version.result == 'skipped') &&
(needs.check-docs-changes.outputs.docs-only == 'false')
permissions:
contents: write
packages: read
Expand Down Expand Up @@ -856,7 +892,7 @@ jobs:
name: package-splunkbase
path: build/package/
- name: Scan
uses: splunk/appinspect-cli-action@v2.9
uses: splunk/appinspect-cli-action@v2.10
with:
app_path: build/package/
included_tags: ${{ matrix.tags }}
Expand All @@ -881,7 +917,7 @@ jobs:
if: |
!cancelled() &&
needs.build.result == 'success' &&
( github.base_ref == 'main' || github.ref_name == 'main' )
( github.base_ref == 'main' || github.ref_name == 'main' || startsWith(github.base_ref, 'release/') || startsWith(github.ref_name, 'release/') )
runs-on: ubuntu-latest
strategy:
fail-fast: false
Expand Down Expand Up @@ -2903,6 +2939,7 @@ jobs:
outputs:
run-publish: ${{ steps.check.outputs.run-publish }}
needs:
- check-docs-changes
- validate-custom-version
- meta
- compliance-copyrights
Expand All @@ -2928,7 +2965,7 @@ jobs:
shell: bash
run: |
RUN_PUBLISH=$(echo "$NEEDS" | jq ".[] | select( ( .result != \"skipped\" ) and .result != \"success\" ) | length == 0")
if [[ "$RUN_PUBLISH" != *'false'* ]]
if [[ "$RUN_PUBLISH" != *'false'* ]] && [[ "${{ needs.check-docs-changes.outputs.docs-only }}" == 'false' ]]
then
echo "run-publish=true" >> "$GITHUB_OUTPUT"
echo "Publish conditions are met."
Expand Down
4 changes: 1 addition & 3 deletions runbooks/update_appinspect_cli_action.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,8 @@ Once Splunk AppInspect team releases AppInspect CLI - we need to make sure that

- 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))
- make sure that PR is towards `main` branch
- make sure the tile of the PR follows the format: "fix: update AppInspect CLI action to v.X.Y"
- make sure that the pipeline is green
- determine which version of `appinspect-cli-action` needs to be released based on the PR
- if it is a bug fix or dependecnies update - "fix" in the title of the PR
- if it is a feature release - "feat" in the title of the PR
- attach a link to a test run of reusable workflow
- get review from the team
- "Squash and merge" the PR
Expand Down
Loading