|
48 | 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"]
|
49 | 49 | upgrade-tests-ta-versions:
|
50 | 50 | required: false
|
51 |
| - description: "List with TA versions (in 'X.X.X' format) that should be used as starting points for upgrade tests. If not provided, |
52 |
| - the latest TA version will be used. Example: ['7.6.0', '7.7.0']" |
| 51 | + 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']" |
53 | 52 | type: string
|
54 | 53 | default: >-
|
55 |
| - ["latest"] |
| 54 | + [""] |
| 55 | + wfe-run-on-splunk-latest: |
| 56 | + required: false |
| 57 | + description: "Forces WFE tests to run only on the latest Splunk when set to true. When set to false - will run on all supported Splunk versions required for the release. When not set - default behavior." |
| 58 | + type: string |
| 59 | + default: "false" |
56 | 60 | secrets:
|
57 | 61 | GH_TOKEN_ADMIN:
|
58 | 62 | description: Github admin token
|
@@ -127,7 +131,7 @@ jobs:
|
127 | 131 | execute-modinput-labeled: ${{ steps.configure-tests-on-labels.outputs.execute_modinput_functional_labeled }}
|
128 | 132 | execute-ucc-modinput-labeled: ${{ steps.configure-tests-on-labels.outputs.execute_ucc_modinput_functional_labeled }}
|
129 | 133 | execute-scripted_inputs-labeled: ${{ steps.configure-tests-on-labels.outputs.execute_scripted_inputs_labeled }}
|
130 |
| - execute-upgrade-labeled: ${{ steps.configure-tests-on-labels.outputs.execute_upgrade_test_labeled }} |
| 134 | + execute-upgrade-labeled: ${{ steps.configure-tests-on-labels.outputs.execute_upgrade_labeled }} |
131 | 135 | exit-first: ${{ steps.configure-tests-on-labels.outputs.exit-first }}
|
132 | 136 | s3_bucket_k8s: ${{ steps.k8s-environment.outputs.s3_bucket }}
|
133 | 137 | argo_server_domain_k8s: ${{ steps.k8s-environment.outputs.argo_server_domain }}
|
@@ -270,15 +274,20 @@ jobs:
|
270 | 274 | - id: matrix
|
271 | 275 | uses: splunk/addonfactory-test-matrix-action@v3.0
|
272 | 276 | - id: determine_splunk
|
| 277 | + env: |
| 278 | + wfe_run_on_splunk_latest: ${{ inputs.wfe-run-on-splunk-latest }} |
273 | 279 | run: |
|
274 |
| - if [ "${{ github.event_name }}" == "schedule" ]; then |
| 280 | + if [[ "$wfe_run_on_splunk_latest" == "" ]]; then |
| 281 | + wfe_run_on_splunk_latest="${{ github.event_name == 'schedule' || !((github.base_ref == 'main' || github.ref_name == 'main') || ((github.base_ref == 'develop' || github.ref_name == 'develop') && github.event_name == 'push')) }}" |
| 282 | + fi |
| 283 | + if [[ "$wfe_run_on_splunk_latest" == "true" ]]; then |
275 | 284 | echo "matrixSplunk=${{ toJson(steps.matrix.outputs.latestSplunk) }}" >> "$GITHUB_OUTPUT"
|
276 | 285 | else
|
277 | 286 | echo "matrixSplunk=${{toJson(steps.matrix.outputs.supportedSplunk) }}" >> "$GITHUB_OUTPUT"
|
278 | 287 | fi
|
279 | 288 | - name: job summary
|
280 | 289 | run: |
|
281 |
| - splunk_version_list=$(echo '${{ steps.matrix.outputs.supportedSplunk }}' | jq -r '.[].version') |
| 290 | + splunk_version_list=$(echo '${{ steps.determine_splunk.outputs.matrixSplunk }}' | jq -r '.[].version') |
282 | 291 | sc4s_version_list=$(echo '${{ steps.matrix.outputs.supportedSC4S }}' | jq -r '.[].version')
|
283 | 292 | echo -e "## Summary of Versions Used\n- **Splunk versions used:** (${splunk_version_list})\n- **SC4S versions used:** (${sc4s_version_list})\n- Browser: Chrome" >> "$GITHUB_STEP_SUMMARY"
|
284 | 293 | fossa-scan:
|
@@ -978,17 +987,17 @@ jobs:
|
978 | 987 | shell: bash
|
979 | 988 | run: |
|
980 | 989 | python3.7 -m pip install poetry==1.5.1
|
| 990 | + export POETRY_REPOSITORIES_SPLUNK_ADD_ON_UCC_MODINPUT_TEST_URL=https://github.com/splunk/addonfactory-ucc-test.git |
| 991 | + export POETRY_HTTP_BASIC_SPLUNK_ADD_ON_UCC_MODINPUT_TEST_USERNAME=${{ secrets.SA_GH_USER_NAME }} |
| 992 | + export POETRY_HTTP_BASIC_SPLUNK_ADD_ON_UCC_MODINPUT_TEST_PASSWORD=${{ secrets.GH_TOKEN_ADMIN }} |
| 993 | + git config --global --add url."https://${{ secrets.GH_TOKEN_ADMIN }}@github.com".insteadOf https://github.com |
| 994 | + git config --global --add url."https://${{ secrets.GH_TOKEN_ADMIN }}@github.com".insteadOf ssh://git@github.com |
981 | 995 | - name: modinput-test-prerequisites
|
982 | 996 | if: steps.download-openapi.conclusion != 'skipped'
|
983 | 997 | shell: bash
|
984 | 998 | env:
|
985 | 999 | PYTHON_KEYRING_BACKEND: keyring.backends.null.Keyring
|
986 | 1000 | run: |
|
987 |
| - export POETRY_REPOSITORIES_SPLUNK_ADD_ON_UCC_MODINPUT_TEST_URL=https://github.com/splunk/addonfactory-ucc-test.git |
988 |
| - export POETRY_HTTP_BASIC_SPLUNK_ADD_ON_UCC_MODINPUT_TEST_USERNAME=${{ secrets.SA_GH_USER_NAME }} |
989 |
| - export POETRY_HTTP_BASIC_SPLUNK_ADD_ON_UCC_MODINPUT_TEST_PASSWORD=${{ secrets.GH_TOKEN_ADMIN }} |
990 |
| - git config --global --add url."https://${{ secrets.GH_TOKEN_ADMIN }}@github.com".insteadOf https://github.com |
991 |
| - git config --global --add url."https://${{ secrets.GH_TOKEN_ADMIN }}@github.com".insteadOf ssh://git@github.com |
992 | 1001 | poetry install --only modinput
|
993 | 1002 | if [ -f "tests/ucc_modinput_functional/tmp/openapi.json" ]; then
|
994 | 1003 | poetry run ucc-test-modinput -o tests/ucc_modinput_functional/tmp/openapi.json -t ${{ steps.download-openapi.outputs.download-path }}/tmp/
|
@@ -1244,8 +1253,7 @@ jobs:
|
1244 | 1253 | - name: Run spl2 tests
|
1245 | 1254 | run: |
|
1246 | 1255 | echo "Running SPL2 Tests"
|
1247 |
| - cp -R /spl2-processor-cli/* . |
1248 |
| - pytest -s --junitxml test-results/report.xml --log-file=spl2_tests.log --pyargs spl2_testing_framework.cli_based_spl2_tests |
| 1256 | + spl2_tests_run cli -o log_cli=true --log-cli-level=INFO --verbose --junitxml test-results/report.xml |
1249 | 1257 | - name: Test Report
|
1250 | 1258 | id: test_report
|
1251 | 1259 | uses: dorny/test-reporter@v1.9.1
|
@@ -2354,7 +2362,7 @@ jobs:
|
2354 | 2362 | summary-ucc_modinput*
|
2355 | 2363 |
|
2356 | 2364 | run-upgrade-tests:
|
2357 |
| - if: ${{ !cancelled() && needs.build.result == 'success' && needs.test-inventory.outputs.upgrade == 'true' }} |
| 2365 | + if: ${{ !cancelled() && needs.build.result == 'success' && needs.test-inventory.outputs.upgrade == 'true' && needs.setup-workflow.outputs.execute-upgrade-labeled == 'true' }} |
2358 | 2366 | needs:
|
2359 | 2367 | - build
|
2360 | 2368 | - test-inventory
|
@@ -2563,7 +2571,7 @@ jobs:
|
2563 | 2571 | - name: Parse JUnit XML
|
2564 | 2572 | if: ${{ !cancelled() }}
|
2565 | 2573 | run: |
|
2566 |
| - sudo apt-get update |
| 2574 | + apt-get update |
2567 | 2575 | apt-get install -y libxml2-utils
|
2568 | 2576 | junit_xml_path="${{ needs.setup.outputs.directory-path }}/test-results"
|
2569 | 2577 | junit_xml_file=$(find "$junit_xml_path" -name "*.xml" -type f 2>/dev/null | head -n 1)
|
@@ -2889,9 +2897,11 @@ jobs:
|
2889 | 2897 | pre-publish:
|
2890 | 2898 | if: ${{ !cancelled() }}
|
2891 | 2899 | # The following line will rename 'pre-publish' to 'pre-publish-not_main_pr' when PR is created towards main branch
|
2892 |
| - # It is necessary to avoid confusion caused by githubactions considering pre-publish for both push to develop branch |
| 2900 | + # It is necessary to avoid confusion caused by github actions considering pre-publish for both push to develop branch |
2893 | 2901 | # and pull_request to main branch events.
|
2894 | 2902 | name: ${{ github.event_name == 'pull_request' && github.base_ref == 'main' && 'pre-publish' || 'pre-publish-not_main_pr' }}
|
| 2903 | + outputs: |
| 2904 | + run-publish: ${{ steps.check.outputs.run-publish }} |
2895 | 2905 | needs:
|
2896 | 2906 | - validate-custom-version
|
2897 | 2907 | - meta
|
@@ -2921,17 +2931,14 @@ jobs:
|
2921 | 2931 | if [[ "$RUN_PUBLISH" != *'false'* ]]
|
2922 | 2932 | then
|
2923 | 2933 | echo "run-publish=true" >> "$GITHUB_OUTPUT"
|
| 2934 | + echo "Publish conditions are met." |
2924 | 2935 | else
|
2925 | 2936 | echo "run-publish=false" >> "$GITHUB_OUTPUT"
|
| 2937 | + echo "Publish conditions are not met." |
2926 | 2938 | fi
|
2927 |
| - - name: exit without publish |
2928 |
| - if: ${{ steps.check.outputs.run-publish == 'false' || ( github.event.action == 'labeled') }} |
2929 |
| - run: | |
2930 |
| - echo "Expand check step to see which job has failed pre-publish step." |
2931 |
| - exit 1 |
2932 | 2939 |
|
2933 | 2940 | publish:
|
2934 |
| - if: ${{ !cancelled() && needs.pre-publish.result == 'success' && (github.event_name == 'push' || needs.validate-custom-version.result == 'success') }} |
| 2941 | + if: ${{ !cancelled() && needs.pre-publish.outputs.run-publish == 'true' && (github.event_name == 'push' || needs.validate-custom-version.result == 'success') }} |
2935 | 2942 | name: ${{ github.event.inputs.custom-version == '' && 'publish' || 'publish-custom-version' }}
|
2936 | 2943 | needs:
|
2937 | 2944 | - pre-publish
|
|
0 commit comments