From 893ba7516af9ddfda09eb7f5b3d6186feec01247 Mon Sep 17 00:00:00 2001 From: Harshil Gajera Date: Tue, 6 Aug 2024 15:25:09 +0530 Subject: [PATCH 01/73] ci: initial commit --- .github/workflows/reusable-build-test-release.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/reusable-build-test-release.yml b/.github/workflows/reusable-build-test-release.yml index 3be35f712..f95057de0 100644 --- a/.github/workflows/reusable-build-test-release.yml +++ b/.github/workflows/reusable-build-test-release.yml @@ -161,6 +161,8 @@ jobs: echo "$test_type""_labeled=${EXECUTE_LABELED["$test_type"]}" >> "$GITHUB_OUTPUT" echo "$test_type""_labeled: ${EXECUTE_LABELED["$test_type"]}" done + - name: job summary + run: echo $EXECUTE_LABELED >> $GITHUB_STEP_SUMMARY validate-pr-title: name: Validate PR title From 6b77e8b4f25d3864d8557fe51ad857e743f72044 Mon Sep 17 00:00:00 2001 From: Harshil Gajera Date: Tue, 6 Aug 2024 15:31:09 +0530 Subject: [PATCH 02/73] ci: initial commit --- .github/workflows/reusable-build-test-release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/reusable-build-test-release.yml b/.github/workflows/reusable-build-test-release.yml index f95057de0..26bb20abc 100644 --- a/.github/workflows/reusable-build-test-release.yml +++ b/.github/workflows/reusable-build-test-release.yml @@ -162,7 +162,7 @@ jobs: echo "$test_type""_labeled: ${EXECUTE_LABELED["$test_type"]}" done - name: job summary - run: echo $EXECUTE_LABELED >> $GITHUB_STEP_SUMMARY + run: echo "### Hello world! ${EXECUTE_LABELED}" >> $GITHUB_STEP_SUMMARY validate-pr-title: name: Validate PR title From 6b72809f9ef36bced60be01c6a812583168421be Mon Sep 17 00:00:00 2001 From: Harshil Gajera Date: Tue, 6 Aug 2024 15:43:24 +0530 Subject: [PATCH 03/73] ci: initial commit --- .github/workflows/build-test-release.yaml | 8 ++++++++ .github/workflows/reusable-build-test-release.yml | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build-test-release.yaml b/.github/workflows/build-test-release.yaml index ddc75c4bd..c217127dd 100644 --- a/.github/workflows/build-test-release.yaml +++ b/.github/workflows/build-test-release.yaml @@ -23,6 +23,14 @@ jobs: - uses: apache/skywalking-eyes@v0.6.0 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + - name: job summary + run: | + echo "| First Header | Second Header |" >> $GITHUB_STEP_SUMMARY + echo "| ------------- | ------------- |" >> $GITHUB_STEP_SUMMARY + echo "| Content Cell | Content Cell |" >> $GITHUB_STEP_SUMMARY +#| Content Cell | Content Cell | + + pre-commit: runs-on: ubuntu-latest diff --git a/.github/workflows/reusable-build-test-release.yml b/.github/workflows/reusable-build-test-release.yml index 26bb20abc..fe7f974d9 100644 --- a/.github/workflows/reusable-build-test-release.yml +++ b/.github/workflows/reusable-build-test-release.yml @@ -162,7 +162,7 @@ jobs: echo "$test_type""_labeled: ${EXECUTE_LABELED["$test_type"]}" done - name: job summary - run: echo "### Hello world! ${EXECUTE_LABELED}" >> $GITHUB_STEP_SUMMARY + run: echo "### Hello world! ${{ steps.configure-tests-on-labels.outputs.execute_knowledge_labeled }}" >> $GITHUB_STEP_SUMMARY validate-pr-title: name: Validate PR title From ffeb3b8b89e42d6e6ac31251321a1714a8f61286 Mon Sep 17 00:00:00 2001 From: Harshil Gajera Date: Tue, 6 Aug 2024 16:05:21 +0530 Subject: [PATCH 04/73] ci: initial commit --- .../workflows/reusable-build-test-release.yml | 20 ++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/.github/workflows/reusable-build-test-release.yml b/.github/workflows/reusable-build-test-release.yml index fe7f974d9..5695812ce 100644 --- a/.github/workflows/reusable-build-test-release.yml +++ b/.github/workflows/reusable-build-test-release.yml @@ -162,7 +162,25 @@ jobs: echo "$test_type""_labeled: ${EXECUTE_LABELED["$test_type"]}" done - name: job summary - run: echo "### Hello world! ${{ steps.configure-tests-on-labels.outputs.execute_knowledge_labeled }}" >> $GITHUB_STEP_SUMMARY +# run: echo "### Test-Types to be executed [${{ steps.configure-tests-on-labels.outputs.execute_knowledge_labeled }}, ]" >> $GITHUB_STEP_SUMMARY + run: | + echo "| Test-Types to be executed |" >> $GITHUB_STEP_SUMMARY + if ${{ steps.configure-tests-on-labels.outputs.execute_knowledge_labeled }}, then + echo "| Knowledge |" >> $GITHUB_STEP_SUMMARY + fi + if ${{ steps.configure-tests-on-labels.outputs.execute_ui_labeled }}, then + echo "| UI |" >> $GITHUB_STEP_SUMMARY + fi + if ${{ steps.configure-tests-on-labels.outputs.execute_modinput_functional_labeled }}, then + echo "| Modinput |" >> $GITHUB_STEP_SUMMARY + fi + if ${{ steps.configure-tests-on-labels.outputs.execute_scripted_inputs_labeled }}, then + echo "| Scripted Input |" >> $GITHUB_STEP_SUMMARY + fi + if ${{ steps.configure-tests-on-labels.outputs.execute_requirement_test_labeled }}, then + echo "| Requirement |" >> $GITHUB_STEP_SUMMARY + fi + echo "| Content Cell | Content Cell |" >> $GITHUB_STEP_SUMMARY validate-pr-title: name: Validate PR title From 4529147d854c64624937710acf117aa5aedddf2e Mon Sep 17 00:00:00 2001 From: Harshil Gajera Date: Tue, 6 Aug 2024 16:12:27 +0530 Subject: [PATCH 05/73] ci: initial commit --- .github/workflows/reusable-build-test-release.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/reusable-build-test-release.yml b/.github/workflows/reusable-build-test-release.yml index 5695812ce..67b583138 100644 --- a/.github/workflows/reusable-build-test-release.yml +++ b/.github/workflows/reusable-build-test-release.yml @@ -165,19 +165,19 @@ jobs: # run: echo "### Test-Types to be executed [${{ steps.configure-tests-on-labels.outputs.execute_knowledge_labeled }}, ]" >> $GITHUB_STEP_SUMMARY run: | echo "| Test-Types to be executed |" >> $GITHUB_STEP_SUMMARY - if ${{ steps.configure-tests-on-labels.outputs.execute_knowledge_labeled }}, then + if ${{ steps.configure-tests-on-labels.outputs.execute_knowledge_labeled }}; then echo "| Knowledge |" >> $GITHUB_STEP_SUMMARY fi if ${{ steps.configure-tests-on-labels.outputs.execute_ui_labeled }}, then echo "| UI |" >> $GITHUB_STEP_SUMMARY fi - if ${{ steps.configure-tests-on-labels.outputs.execute_modinput_functional_labeled }}, then + if ${{ steps.configure-tests-on-labels.outputs.execute_modinput_functional_labeled }}; then echo "| Modinput |" >> $GITHUB_STEP_SUMMARY fi - if ${{ steps.configure-tests-on-labels.outputs.execute_scripted_inputs_labeled }}, then + if ${{ steps.configure-tests-on-labels.outputs.execute_scripted_inputs_labeled }}; then echo "| Scripted Input |" >> $GITHUB_STEP_SUMMARY fi - if ${{ steps.configure-tests-on-labels.outputs.execute_requirement_test_labeled }}, then + if ${{ steps.configure-tests-on-labels.outputs.execute_requirement_test_labeled }}; then echo "| Requirement |" >> $GITHUB_STEP_SUMMARY fi echo "| Content Cell | Content Cell |" >> $GITHUB_STEP_SUMMARY From cf998b0bf80631796aedf5a2645d7f1e89193d4e Mon Sep 17 00:00:00 2001 From: Harshil Gajera Date: Tue, 6 Aug 2024 16:13:42 +0530 Subject: [PATCH 06/73] ci: initial commit --- .github/workflows/reusable-build-test-release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/reusable-build-test-release.yml b/.github/workflows/reusable-build-test-release.yml index 67b583138..3c70e88a5 100644 --- a/.github/workflows/reusable-build-test-release.yml +++ b/.github/workflows/reusable-build-test-release.yml @@ -168,7 +168,7 @@ jobs: if ${{ steps.configure-tests-on-labels.outputs.execute_knowledge_labeled }}; then echo "| Knowledge |" >> $GITHUB_STEP_SUMMARY fi - if ${{ steps.configure-tests-on-labels.outputs.execute_ui_labeled }}, then + if ${{ steps.configure-tests-on-labels.outputs.execute_ui_labeled }}; then echo "| UI |" >> $GITHUB_STEP_SUMMARY fi if ${{ steps.configure-tests-on-labels.outputs.execute_modinput_functional_labeled }}; then From 145b252966cd08435c5084e21e71058bd679da5a Mon Sep 17 00:00:00 2001 From: Harshil Gajera Date: Tue, 6 Aug 2024 17:54:48 +0530 Subject: [PATCH 07/73] ci: initial commit --- .github/workflows/reusable-build-test-release.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/reusable-build-test-release.yml b/.github/workflows/reusable-build-test-release.yml index 3c70e88a5..f2d6b1527 100644 --- a/.github/workflows/reusable-build-test-release.yml +++ b/.github/workflows/reusable-build-test-release.yml @@ -165,6 +165,7 @@ jobs: # run: echo "### Test-Types to be executed [${{ steps.configure-tests-on-labels.outputs.execute_knowledge_labeled }}, ]" >> $GITHUB_STEP_SUMMARY run: | echo "| Test-Types to be executed |" >> $GITHUB_STEP_SUMMARY + echo "| ------------- |" >> $GITHUB_STEP_SUMMARY if ${{ steps.configure-tests-on-labels.outputs.execute_knowledge_labeled }}; then echo "| Knowledge |" >> $GITHUB_STEP_SUMMARY fi From 42bf3647f5198220713f1bc0c2b5b0d6546358f3 Mon Sep 17 00:00:00 2001 From: Harshil Gajera Date: Tue, 6 Aug 2024 18:11:18 +0530 Subject: [PATCH 08/73] ci: initial commit --- .github/workflows/reusable-build-test-release.yml | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/.github/workflows/reusable-build-test-release.yml b/.github/workflows/reusable-build-test-release.yml index f2d6b1527..bc9c8a397 100644 --- a/.github/workflows/reusable-build-test-release.yml +++ b/.github/workflows/reusable-build-test-release.yml @@ -181,7 +181,6 @@ jobs: if ${{ steps.configure-tests-on-labels.outputs.execute_requirement_test_labeled }}; then echo "| Requirement |" >> $GITHUB_STEP_SUMMARY fi - echo "| Content Cell | Content Cell |" >> $GITHUB_STEP_SUMMARY validate-pr-title: name: Validate PR title @@ -218,6 +217,16 @@ jobs: persist-credentials: false - id: matrix uses: splunk/addonfactory-test-matrix-action@v2.1 + - name: job summary +# run: echo "### Test-Types to be executed [${{ steps.configure-tests-on-labels.outputs.execute_knowledge_labeled }}, ]" >> $GITHUB_STEP_SUMMARY + run: | + echo "Below are the splunk versions and sc4s verison used for testing" + echo "| Splunk versions | SC4S version" >> $GITHUB_STEP_SUMMARY + echo "| ------------- | ------------- |" >> $GITHUB_STEP_SUMMARY +# if ${{ steps.configure-tests-on-labels.outputs.execute_knowledge_labeled }}; then + echo "| ${{ steps.matrix.outputs.supportedSplunk }} | ${{ steps.matrix.outputs.supportedSC4S }}" >> $GITHUB_STEP_SUMMARY +# echo "| ${{ steps.matrix.outputs.supportedSplunk }} |" >> $GITHUB_STEP_SUMMARY +# fi fossa-scan: runs-on: ubuntu-latest From f6db2647edc5bf375ceedefcc5ee8f118c965c42 Mon Sep 17 00:00:00 2001 From: Harshil Gajera Date: Tue, 6 Aug 2024 18:21:15 +0530 Subject: [PATCH 09/73] ci: initial commit --- .github/workflows/reusable-build-test-release.yml | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/.github/workflows/reusable-build-test-release.yml b/.github/workflows/reusable-build-test-release.yml index bc9c8a397..65405f6b6 100644 --- a/.github/workflows/reusable-build-test-release.yml +++ b/.github/workflows/reusable-build-test-release.yml @@ -218,15 +218,11 @@ jobs: - id: matrix uses: splunk/addonfactory-test-matrix-action@v2.1 - name: job summary -# run: echo "### Test-Types to be executed [${{ steps.configure-tests-on-labels.outputs.execute_knowledge_labeled }}, ]" >> $GITHUB_STEP_SUMMARY run: | - echo "Below are the splunk versions and sc4s verison used for testing" - echo "| Splunk versions | SC4S version" >> $GITHUB_STEP_SUMMARY + echo "Below are the splunk versions and sc4s version used for testing" + echo "| Splunk versions | SC4S version |" >> $GITHUB_STEP_SUMMARY echo "| ------------- | ------------- |" >> $GITHUB_STEP_SUMMARY -# if ${{ steps.configure-tests-on-labels.outputs.execute_knowledge_labeled }}; then - echo "| ${{ steps.matrix.outputs.supportedSplunk }} | ${{ steps.matrix.outputs.supportedSC4S }}" >> $GITHUB_STEP_SUMMARY -# echo "| ${{ steps.matrix.outputs.supportedSplunk }} |" >> $GITHUB_STEP_SUMMARY -# fi + echo "| ${{ steps.matrix.outputs.supportedSplunk }} | ${{ steps.matrix.outputs.supportedSC4S }} |" >> $GITHUB_STEP_SUMMARY fossa-scan: runs-on: ubuntu-latest From 123038fecd2d1b573cb183912bf901487853f4c9 Mon Sep 17 00:00:00 2001 From: Harshil Gajera Date: Tue, 6 Aug 2024 18:58:56 +0530 Subject: [PATCH 10/73] ci: push --- .github/workflows/reusable-build-test-release.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/workflows/reusable-build-test-release.yml b/.github/workflows/reusable-build-test-release.yml index 65405f6b6..e7f02a7f6 100644 --- a/.github/workflows/reusable-build-test-release.yml +++ b/.github/workflows/reusable-build-test-release.yml @@ -219,10 +219,15 @@ jobs: uses: splunk/addonfactory-test-matrix-action@v2.1 - name: job summary run: | + apt-get install jq + splunk_version_list=${{ steps.matrix.outputs.supportedSplunk }} + sc4s_version_list=${{ steps.matrix.outputs.supportedSC4S }} + splunk_version_list=$(echo "splunk_version_list" | jq -r '.[].version') + sc4s_version_list=$(echo "sc4s_version_list" | jq -r '.[].version') echo "Below are the splunk versions and sc4s version used for testing" echo "| Splunk versions | SC4S version |" >> $GITHUB_STEP_SUMMARY echo "| ------------- | ------------- |" >> $GITHUB_STEP_SUMMARY - echo "| ${{ steps.matrix.outputs.supportedSplunk }} | ${{ steps.matrix.outputs.supportedSC4S }} |" >> $GITHUB_STEP_SUMMARY + echo "| ${splunk_version_list} | ${sc4s_version_list} |" >> $GITHUB_STEP_SUMMARY fossa-scan: runs-on: ubuntu-latest From b7b32fb7eaa6d169ba0d8a591a243aed6a664834 Mon Sep 17 00:00:00 2001 From: Harshil Gajera Date: Tue, 6 Aug 2024 19:02:29 +0530 Subject: [PATCH 11/73] ci: push --- .github/workflows/reusable-build-test-release.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/reusable-build-test-release.yml b/.github/workflows/reusable-build-test-release.yml index e7f02a7f6..ab73d13b7 100644 --- a/.github/workflows/reusable-build-test-release.yml +++ b/.github/workflows/reusable-build-test-release.yml @@ -222,12 +222,13 @@ jobs: apt-get install jq splunk_version_list=${{ steps.matrix.outputs.supportedSplunk }} sc4s_version_list=${{ steps.matrix.outputs.supportedSC4S }} - splunk_version_list=$(echo "splunk_version_list" | jq -r '.[].version') - sc4s_version_list=$(echo "sc4s_version_list" | jq -r '.[].version') + splunk_version_list1=$(echo "$splunk_version_list" | jq -r '.[].version') + sc4s_version_list1=$(echo "$sc4s_version_list" | jq -r '.[].version') echo "Below are the splunk versions and sc4s version used for testing" echo "| Splunk versions | SC4S version |" >> $GITHUB_STEP_SUMMARY echo "| ------------- | ------------- |" >> $GITHUB_STEP_SUMMARY echo "| ${splunk_version_list} | ${sc4s_version_list} |" >> $GITHUB_STEP_SUMMARY + echo "| ${splunk_version_list1} | ${sc4s_version_list1} |" >> $GITHUB_STEP_SUMMARY fossa-scan: runs-on: ubuntu-latest From a5e598176f51ae424bc7d6a673879d8d9f319933 Mon Sep 17 00:00:00 2001 From: Harshil Gajera Date: Tue, 6 Aug 2024 19:08:32 +0530 Subject: [PATCH 12/73] ci: push --- .github/workflows/reusable-build-test-release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/reusable-build-test-release.yml b/.github/workflows/reusable-build-test-release.yml index ab73d13b7..3d5760427 100644 --- a/.github/workflows/reusable-build-test-release.yml +++ b/.github/workflows/reusable-build-test-release.yml @@ -219,7 +219,7 @@ jobs: uses: splunk/addonfactory-test-matrix-action@v2.1 - name: job summary run: | - apt-get install jq +# apt-get install jq splunk_version_list=${{ steps.matrix.outputs.supportedSplunk }} sc4s_version_list=${{ steps.matrix.outputs.supportedSC4S }} splunk_version_list1=$(echo "$splunk_version_list" | jq -r '.[].version') From cd5044eb9bd31ac6907307a570bf4f1588b655f3 Mon Sep 17 00:00:00 2001 From: Harshil Gajera Date: Tue, 6 Aug 2024 19:10:25 +0530 Subject: [PATCH 13/73] ci: push --- .github/workflows/reusable-build-test-release.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/reusable-build-test-release.yml b/.github/workflows/reusable-build-test-release.yml index 3d5760427..4087a2e26 100644 --- a/.github/workflows/reusable-build-test-release.yml +++ b/.github/workflows/reusable-build-test-release.yml @@ -219,7 +219,6 @@ jobs: uses: splunk/addonfactory-test-matrix-action@v2.1 - name: job summary run: | -# apt-get install jq splunk_version_list=${{ steps.matrix.outputs.supportedSplunk }} sc4s_version_list=${{ steps.matrix.outputs.supportedSC4S }} splunk_version_list1=$(echo "$splunk_version_list" | jq -r '.[].version') From 0ff0bbb12f1a2fa3e6b24f58c611904b189d76b7 Mon Sep 17 00:00:00 2001 From: Harshil Gajera Date: Wed, 7 Aug 2024 11:14:18 +0530 Subject: [PATCH 14/73] ci: debugging --- .github/workflows/reusable-build-test-release.yml | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/.github/workflows/reusable-build-test-release.yml b/.github/workflows/reusable-build-test-release.yml index 4087a2e26..2f9dc0cdf 100644 --- a/.github/workflows/reusable-build-test-release.yml +++ b/.github/workflows/reusable-build-test-release.yml @@ -219,10 +219,9 @@ jobs: uses: splunk/addonfactory-test-matrix-action@v2.1 - name: job summary run: | - splunk_version_list=${{ steps.matrix.outputs.supportedSplunk }} - sc4s_version_list=${{ steps.matrix.outputs.supportedSC4S }} - splunk_version_list1=$(echo "$splunk_version_list" | jq -r '.[].version') - sc4s_version_list1=$(echo "$sc4s_version_list" | jq -r '.[].version') + splunk_version_list1=$(echo ${{ steps.matrix.outputs.supportedSplunk }} | jq -r '.[].version') + sc4s_version_list1=$(echo ${{ steps.matrix.outputs.supportedSC4S }} | jq -r '.[].version') + echo $splunk_version_list1,$sc4s_version_list1 echo "Below are the splunk versions and sc4s version used for testing" echo "| Splunk versions | SC4S version |" >> $GITHUB_STEP_SUMMARY echo "| ------------- | ------------- |" >> $GITHUB_STEP_SUMMARY From 198a043676e25741d7835fca8cde762353fa4da0 Mon Sep 17 00:00:00 2001 From: Harshil Gajera Date: Wed, 7 Aug 2024 13:34:37 +0530 Subject: [PATCH 15/73] ci: debugging --- .github/workflows/reusable-build-test-release.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/reusable-build-test-release.yml b/.github/workflows/reusable-build-test-release.yml index 2f9dc0cdf..bae61a74e 100644 --- a/.github/workflows/reusable-build-test-release.yml +++ b/.github/workflows/reusable-build-test-release.yml @@ -219,8 +219,8 @@ jobs: uses: splunk/addonfactory-test-matrix-action@v2.1 - name: job summary run: | - splunk_version_list1=$(echo ${{ steps.matrix.outputs.supportedSplunk }} | jq -r '.[].version') - sc4s_version_list1=$(echo ${{ steps.matrix.outputs.supportedSC4S }} | jq -r '.[].version') + splunk_version_list1=$(${{ steps.matrix.outputs.supportedSplunk }} | jq -r '.[].version') + sc4s_version_list1=$(${{ steps.matrix.outputs.supportedSC4S }} | jq -r '.[].version') echo $splunk_version_list1,$sc4s_version_list1 echo "Below are the splunk versions and sc4s version used for testing" echo "| Splunk versions | SC4S version |" >> $GITHUB_STEP_SUMMARY From d8ffb772c079ce3a61207dd94f90b09bb4d4cdc8 Mon Sep 17 00:00:00 2001 From: Harshil Gajera Date: Wed, 7 Aug 2024 13:43:33 +0530 Subject: [PATCH 16/73] ci: debugging --- .github/workflows/reusable-build-test-release.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/reusable-build-test-release.yml b/.github/workflows/reusable-build-test-release.yml index bae61a74e..a99860f6a 100644 --- a/.github/workflows/reusable-build-test-release.yml +++ b/.github/workflows/reusable-build-test-release.yml @@ -219,8 +219,8 @@ jobs: uses: splunk/addonfactory-test-matrix-action@v2.1 - name: job summary run: | - splunk_version_list1=$(${{ steps.matrix.outputs.supportedSplunk }} | jq -r '.[].version') - sc4s_version_list1=$(${{ steps.matrix.outputs.supportedSC4S }} | jq -r '.[].version') + splunk_version_list1=$(echo "${{ steps.matrix.outputs.supportedSplunk }}" | jq -r '.[].version') + sc4s_version_list1=$(echo "${{ steps.matrix.outputs.supportedSC4S }}" | jq -r '.[].version') echo $splunk_version_list1,$sc4s_version_list1 echo "Below are the splunk versions and sc4s version used for testing" echo "| Splunk versions | SC4S version |" >> $GITHUB_STEP_SUMMARY From 074cd092caf387b8560122bc16ccbddea728607f Mon Sep 17 00:00:00 2001 From: Harshil Gajera Date: Wed, 7 Aug 2024 13:55:03 +0530 Subject: [PATCH 17/73] ci: debugging --- .github/workflows/reusable-build-test-release.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/reusable-build-test-release.yml b/.github/workflows/reusable-build-test-release.yml index a99860f6a..4119de6ff 100644 --- a/.github/workflows/reusable-build-test-release.yml +++ b/.github/workflows/reusable-build-test-release.yml @@ -219,8 +219,8 @@ jobs: uses: splunk/addonfactory-test-matrix-action@v2.1 - name: job summary run: | - splunk_version_list1=$(echo "${{ steps.matrix.outputs.supportedSplunk }}" | jq -r '.[].version') - sc4s_version_list1=$(echo "${{ steps.matrix.outputs.supportedSC4S }}" | jq -r '.[].version') + splunk_version_list1=$(echo '${{ steps.matrix.outputs.supportedSplunk }}' | jq -r '.[].version') + sc4s_version_list1=$(echo '${{ steps.matrix.outputs.supportedSC4S }}' | jq -r '.[].version') echo $splunk_version_list1,$sc4s_version_list1 echo "Below are the splunk versions and sc4s version used for testing" echo "| Splunk versions | SC4S version |" >> $GITHUB_STEP_SUMMARY From a9e66a602709937db7a9e1934a474888f5f0eb23 Mon Sep 17 00:00:00 2001 From: Harshil Gajera Date: Mon, 12 Aug 2024 18:28:35 +0530 Subject: [PATCH 18/73] ci: adding fossa link --- .github/workflows/reusable-build-test-release.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/workflows/reusable-build-test-release.yml b/.github/workflows/reusable-build-test-release.yml index 4119de6ff..59147ba05 100644 --- a/.github/workflows/reusable-build-test-release.yml +++ b/.github/workflows/reusable-build-test-release.yml @@ -233,9 +233,11 @@ jobs: steps: - uses: actions/checkout@v4 - name: run fossa analyze and create report + id: fossa-scan run: | curl -H 'Cache-Control: no-cache' https://raw.githubusercontent.com/fossas/fossa-cli/master/install-latest.sh | bash - fossa analyze --debug + FOSSA_REPORT_URL=$(fossa analyze --debug | grep "View FOSSA Report" | awk '{print $NF}') + echo "FOSSA_REPORT_URL=$FOSSA_REPORT_URL" >> "$GITHUB_OUTPUT" fossa report attribution --format text --timeout 600 > /tmp/THIRDPARTY env: FOSSA_API_KEY: ${{ secrets.FOSSA_API_KEY }} @@ -244,6 +246,9 @@ jobs: with: name: THIRDPARTY path: /tmp/THIRDPARTY + - name: job summary + run: | + echo "View FOSSA Report: ${{ steps.fossa-scan.outputs.FOSSA_REPORT_URL }}" >> $GITHUB_STEP_SUMMARY fossa-test: continue-on-error: true From 7a53401aef1d6c3a7e22683873d4cbe902f5ea8d Mon Sep 17 00:00:00 2001 From: Harshil Gajera Date: Tue, 13 Aug 2024 12:01:19 +0530 Subject: [PATCH 19/73] ci: adding fossa link --- .github/workflows/reusable-build-test-release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/reusable-build-test-release.yml b/.github/workflows/reusable-build-test-release.yml index 59147ba05..2fe96065b 100644 --- a/.github/workflows/reusable-build-test-release.yml +++ b/.github/workflows/reusable-build-test-release.yml @@ -236,7 +236,7 @@ jobs: id: fossa-scan run: | curl -H 'Cache-Control: no-cache' https://raw.githubusercontent.com/fossas/fossa-cli/master/install-latest.sh | bash - FOSSA_REPORT_URL=$(fossa analyze --debug | grep "View FOSSA Report" | awk '{print $NF}') + FOSSA_REPORT_URL=$(fossa analyze --debug | grep -o 'https://app.fossa.com[^ ]*')) echo "FOSSA_REPORT_URL=$FOSSA_REPORT_URL" >> "$GITHUB_OUTPUT" fossa report attribution --format text --timeout 600 > /tmp/THIRDPARTY env: From 6529c3c1cedb56c596ec697be27f332ebc4d2802 Mon Sep 17 00:00:00 2001 From: Harshil Gajera Date: Tue, 13 Aug 2024 12:02:52 +0530 Subject: [PATCH 20/73] ci: adding fossa link --- .github/workflows/reusable-build-test-release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/reusable-build-test-release.yml b/.github/workflows/reusable-build-test-release.yml index 2fe96065b..032f4c950 100644 --- a/.github/workflows/reusable-build-test-release.yml +++ b/.github/workflows/reusable-build-test-release.yml @@ -236,7 +236,7 @@ jobs: id: fossa-scan run: | curl -H 'Cache-Control: no-cache' https://raw.githubusercontent.com/fossas/fossa-cli/master/install-latest.sh | bash - FOSSA_REPORT_URL=$(fossa analyze --debug | grep -o 'https://app.fossa.com[^ ]*')) + FOSSA_REPORT_URL=$(fossa analyze --debug | grep -o 'https://app.fossa.com[^ ]*') echo "FOSSA_REPORT_URL=$FOSSA_REPORT_URL" >> "$GITHUB_OUTPUT" fossa report attribution --format text --timeout 600 > /tmp/THIRDPARTY env: From ccbc364b2e92f51f118cdfe139ba99299ee4dfc0 Mon Sep 17 00:00:00 2001 From: Harshil Gajera Date: Tue, 13 Aug 2024 12:06:13 +0530 Subject: [PATCH 21/73] ci: adding fossa link --- .github/workflows/reusable-build-test-release.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/reusable-build-test-release.yml b/.github/workflows/reusable-build-test-release.yml index 032f4c950..515411a01 100644 --- a/.github/workflows/reusable-build-test-release.yml +++ b/.github/workflows/reusable-build-test-release.yml @@ -247,6 +247,7 @@ jobs: name: THIRDPARTY path: /tmp/THIRDPARTY - name: job summary + if: success() || failure() run: | echo "View FOSSA Report: ${{ steps.fossa-scan.outputs.FOSSA_REPORT_URL }}" >> $GITHUB_STEP_SUMMARY From 98374a60cef04436c4f03e344a94b00055d48c40 Mon Sep 17 00:00:00 2001 From: Harshil Gajera Date: Tue, 13 Aug 2024 12:18:40 +0530 Subject: [PATCH 22/73] ci: adding fossa link --- .github/workflows/reusable-build-test-release.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/reusable-build-test-release.yml b/.github/workflows/reusable-build-test-release.yml index 515411a01..97e7121c4 100644 --- a/.github/workflows/reusable-build-test-release.yml +++ b/.github/workflows/reusable-build-test-release.yml @@ -238,6 +238,7 @@ jobs: curl -H 'Cache-Control: no-cache' https://raw.githubusercontent.com/fossas/fossa-cli/master/install-latest.sh | bash FOSSA_REPORT_URL=$(fossa analyze --debug | grep -o 'https://app.fossa.com[^ ]*') echo "FOSSA_REPORT_URL=$FOSSA_REPORT_URL" >> "$GITHUB_OUTPUT" + echo $$FOSSA_REPORT_URL fossa report attribution --format text --timeout 600 > /tmp/THIRDPARTY env: FOSSA_API_KEY: ${{ secrets.FOSSA_API_KEY }} From 4d5ca91a481bda8a9408c1449e657bd7b873ff62 Mon Sep 17 00:00:00 2001 From: Harshil Gajera Date: Tue, 13 Aug 2024 12:37:00 +0530 Subject: [PATCH 23/73] ci: adding fossa link --- .github/workflows/reusable-build-test-release.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/reusable-build-test-release.yml b/.github/workflows/reusable-build-test-release.yml index 97e7121c4..3e277c8d6 100644 --- a/.github/workflows/reusable-build-test-release.yml +++ b/.github/workflows/reusable-build-test-release.yml @@ -236,10 +236,14 @@ jobs: id: fossa-scan run: | curl -H 'Cache-Control: no-cache' https://raw.githubusercontent.com/fossas/fossa-cli/master/install-latest.sh | bash - FOSSA_REPORT_URL=$(fossa analyze --debug | grep -o 'https://app.fossa.com[^ ]*') + fossa_analyze_output=$(fossa analyze --debug 2>&1) + exit_code=$? + FOSSA_REPORT_URL=$(echo "fossa_analyze_output" | grep -o 'https://app.fossa.com[^ ]*') + echo $FOSSA_REPORT_URL echo "FOSSA_REPORT_URL=$FOSSA_REPORT_URL" >> "$GITHUB_OUTPUT" echo $$FOSSA_REPORT_URL fossa report attribution --format text --timeout 600 > /tmp/THIRDPARTY + exit $exit_code env: FOSSA_API_KEY: ${{ secrets.FOSSA_API_KEY }} - name: upload THIRDPARTY file From 5d07623aae2d8914183b2423a5c9a0e9ae4fb0ce Mon Sep 17 00:00:00 2001 From: Harshil Gajera Date: Tue, 13 Aug 2024 13:24:06 +0530 Subject: [PATCH 24/73] ci: adding fossa link --- .github/workflows/reusable-build-test-release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/reusable-build-test-release.yml b/.github/workflows/reusable-build-test-release.yml index 3e277c8d6..cf901ddfc 100644 --- a/.github/workflows/reusable-build-test-release.yml +++ b/.github/workflows/reusable-build-test-release.yml @@ -236,7 +236,7 @@ jobs: id: fossa-scan run: | curl -H 'Cache-Control: no-cache' https://raw.githubusercontent.com/fossas/fossa-cli/master/install-latest.sh | bash - fossa_analyze_output=$(fossa analyze --debug 2>&1) + fossa_analyze_output=$(fossa analyze --debug 2>&1 | tee /dev/tty) exit_code=$? FOSSA_REPORT_URL=$(echo "fossa_analyze_output" | grep -o 'https://app.fossa.com[^ ]*') echo $FOSSA_REPORT_URL From de09804aaf7bb206cf2aed5a2481f5734c57c0b9 Mon Sep 17 00:00:00 2001 From: Harshil Gajera Date: Tue, 13 Aug 2024 13:28:49 +0530 Subject: [PATCH 25/73] ci: adding fossa link --- .github/workflows/reusable-build-test-release.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/reusable-build-test-release.yml b/.github/workflows/reusable-build-test-release.yml index cf901ddfc..879143fd6 100644 --- a/.github/workflows/reusable-build-test-release.yml +++ b/.github/workflows/reusable-build-test-release.yml @@ -109,6 +109,7 @@ jobs: fi - name: configure tests based on labels + id: configure-tests-on-labels id: configure-tests-on-labels run: | set +e @@ -236,7 +237,7 @@ jobs: id: fossa-scan run: | curl -H 'Cache-Control: no-cache' https://raw.githubusercontent.com/fossas/fossa-cli/master/install-latest.sh | bash - fossa_analyze_output=$(fossa analyze --debug 2>&1 | tee /dev/tty) + fossa_analyze_output=$(fossa analyze --debug 2>&1 | tee /dev/stderr) exit_code=$? FOSSA_REPORT_URL=$(echo "fossa_analyze_output" | grep -o 'https://app.fossa.com[^ ]*') echo $FOSSA_REPORT_URL @@ -465,7 +466,7 @@ jobs: - semgrep - run-unit-tests - fossa-scan - if: ${{ !cancelled() && (needs.run-unit-tests.result == 'success' || needs.run-unit-tests.result == 'skipped') }} + if: failure() outputs: buildname: ${{ steps.buildupload.outputs.name }} permissions: From e00ad105468f72f4e38f02a068d0c86ea691a038 Mon Sep 17 00:00:00 2001 From: Harshil Gajera Date: Tue, 13 Aug 2024 13:36:18 +0530 Subject: [PATCH 26/73] ci: adding fossa link --- .github/workflows/reusable-build-test-release.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/reusable-build-test-release.yml b/.github/workflows/reusable-build-test-release.yml index 879143fd6..805140962 100644 --- a/.github/workflows/reusable-build-test-release.yml +++ b/.github/workflows/reusable-build-test-release.yml @@ -109,7 +109,6 @@ jobs: fi - name: configure tests based on labels - id: configure-tests-on-labels id: configure-tests-on-labels run: | set +e From 70a5d61a8889580550f672d71f42574dfd31975d Mon Sep 17 00:00:00 2001 From: Harshil Gajera Date: Tue, 13 Aug 2024 13:40:57 +0530 Subject: [PATCH 27/73] ci: adding fossa link --- .github/workflows/reusable-build-test-release.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/reusable-build-test-release.yml b/.github/workflows/reusable-build-test-release.yml index 805140962..e26671f05 100644 --- a/.github/workflows/reusable-build-test-release.yml +++ b/.github/workflows/reusable-build-test-release.yml @@ -237,6 +237,7 @@ jobs: run: | curl -H 'Cache-Control: no-cache' https://raw.githubusercontent.com/fossas/fossa-cli/master/install-latest.sh | bash fossa_analyze_output=$(fossa analyze --debug 2>&1 | tee /dev/stderr) + echo "fossa analysis complete" exit_code=$? FOSSA_REPORT_URL=$(echo "fossa_analyze_output" | grep -o 'https://app.fossa.com[^ ]*') echo $FOSSA_REPORT_URL From ca46187760be09e512213c2a4f44af0b26027e22 Mon Sep 17 00:00:00 2001 From: Harshil Gajera Date: Tue, 13 Aug 2024 13:52:38 +0530 Subject: [PATCH 28/73] ci: adding fossa link --- .github/workflows/reusable-build-test-release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/reusable-build-test-release.yml b/.github/workflows/reusable-build-test-release.yml index e26671f05..41db65e35 100644 --- a/.github/workflows/reusable-build-test-release.yml +++ b/.github/workflows/reusable-build-test-release.yml @@ -236,7 +236,7 @@ jobs: id: fossa-scan run: | curl -H 'Cache-Control: no-cache' https://raw.githubusercontent.com/fossas/fossa-cli/master/install-latest.sh | bash - fossa_analyze_output=$(fossa analyze --debug 2>&1 | tee /dev/stderr) + fossa_analyze_output=$(fossa analyze --debug || true) echo "fossa analysis complete" exit_code=$? FOSSA_REPORT_URL=$(echo "fossa_analyze_output" | grep -o 'https://app.fossa.com[^ ]*') From b19d6fd5658fb0edf4c5dad798c9e2291dca7a48 Mon Sep 17 00:00:00 2001 From: Harshil Gajera Date: Tue, 13 Aug 2024 13:57:47 +0530 Subject: [PATCH 29/73] ci: adding fossa link --- .../workflows/reusable-build-test-release.yml | 53 +++++++++++-------- 1 file changed, 30 insertions(+), 23 deletions(-) diff --git a/.github/workflows/reusable-build-test-release.yml b/.github/workflows/reusable-build-test-release.yml index 41db65e35..f4ed0f70c 100644 --- a/.github/workflows/reusable-build-test-release.yml +++ b/.github/workflows/reusable-build-test-release.yml @@ -161,26 +161,7 @@ jobs: echo "$test_type""_labeled=${EXECUTE_LABELED["$test_type"]}" >> "$GITHUB_OUTPUT" echo "$test_type""_labeled: ${EXECUTE_LABELED["$test_type"]}" done - - name: job summary -# run: echo "### Test-Types to be executed [${{ steps.configure-tests-on-labels.outputs.execute_knowledge_labeled }}, ]" >> $GITHUB_STEP_SUMMARY - run: | - echo "| Test-Types to be executed |" >> $GITHUB_STEP_SUMMARY - echo "| ------------- |" >> $GITHUB_STEP_SUMMARY - if ${{ steps.configure-tests-on-labels.outputs.execute_knowledge_labeled }}; then - echo "| Knowledge |" >> $GITHUB_STEP_SUMMARY - fi - if ${{ steps.configure-tests-on-labels.outputs.execute_ui_labeled }}; then - echo "| UI |" >> $GITHUB_STEP_SUMMARY - fi - if ${{ steps.configure-tests-on-labels.outputs.execute_modinput_functional_labeled }}; then - echo "| Modinput |" >> $GITHUB_STEP_SUMMARY - fi - if ${{ steps.configure-tests-on-labels.outputs.execute_scripted_inputs_labeled }}; then - echo "| Scripted Input |" >> $GITHUB_STEP_SUMMARY - fi - if ${{ steps.configure-tests-on-labels.outputs.execute_requirement_test_labeled }}; then - echo "| Requirement |" >> $GITHUB_STEP_SUMMARY - fi + validate-pr-title: name: Validate PR title @@ -237,9 +218,9 @@ jobs: run: | curl -H 'Cache-Control: no-cache' https://raw.githubusercontent.com/fossas/fossa-cli/master/install-latest.sh | bash fossa_analyze_output=$(fossa analyze --debug || true) - echo "fossa analysis complete" exit_code=$? - FOSSA_REPORT_URL=$(echo "fossa_analyze_output" | grep -o 'https://app.fossa.com[^ ]*') + echo "fossa analysis complete" + FOSSA_REPORT_URL=$(echo "$fossa_analyze_output" | grep -o 'https://app.fossa.com[^ ]*') || true echo $FOSSA_REPORT_URL echo "FOSSA_REPORT_URL=$FOSSA_REPORT_URL" >> "$GITHUB_OUTPUT" echo $$FOSSA_REPORT_URL @@ -351,7 +332,33 @@ jobs: ucc_modinput_tests="false" fi echo "ucc_modinput_tests=$ucc_modinput_tests" >> "$GITHUB_OUTPUT" - + - name: job summary + run: | + echo "| Test-Types to be executed |" >> $GITHUB_STEP_SUMMARY + echo "| ------------- |" >> $GITHUB_STEP_SUMMARY + if ${{ steps.testset.outputs.unit }}; then + echo "| Unit |" >> $GITHUB_STEP_SUMMARY + fi + if ${{ steps.testset.outputs.knowledge }}; then + echo "| Knowledge |" >> $GITHUB_STEP_SUMMARY + fi + if ${{ steps.testset.outputs.ui }}; then + echo "| UI |" >> $GITHUB_STEP_SUMMARY + fi + if ${{ steps.testset.outputs.modinput_functional }}; then + echo "| Modinput |" >> $GITHUB_STEP_SUMMARY + fi + if ${{ steps.configure-tests-on-labels.outputs.execute_scripted_inputs_labeled }}; then + echo "| Scripted Input |" >> $GITHUB_STEP_SUMMARY + fi + if ${{ steps.testset.outputs.scripted_inputs }}; then + echo "| Requirement |" >> $GITHUB_STEP_SUMMARY + fi + if ${{ steps.modinput-version.outputs.ucc_modinput_tests }}; then + echo "| UCC Modinput |" >> $GITHUB_STEP_SUMMARY + fi + + run-unit-tests: name: test-unit-python3-${{ matrix.python-version }} if: ${{ needs.test-inventory.outputs.unit == 'true' }} From 2255aedd91bb97c82ef60d756b3b33ff7f2cfd0d Mon Sep 17 00:00:00 2001 From: Harshil Gajera Date: Tue, 13 Aug 2024 14:26:27 +0530 Subject: [PATCH 30/73] ci: debugging --- .../workflows/reusable-build-test-release.yml | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/.github/workflows/reusable-build-test-release.yml b/.github/workflows/reusable-build-test-release.yml index f4ed0f70c..d84242a55 100644 --- a/.github/workflows/reusable-build-test-release.yml +++ b/.github/workflows/reusable-build-test-release.yml @@ -220,10 +220,12 @@ jobs: fossa_analyze_output=$(fossa analyze --debug || true) exit_code=$? echo "fossa analysis complete" + echo $fossa_analyze_output FOSSA_REPORT_URL=$(echo "$fossa_analyze_output" | grep -o 'https://app.fossa.com[^ ]*') || true echo $FOSSA_REPORT_URL echo "FOSSA_REPORT_URL=$FOSSA_REPORT_URL" >> "$GITHUB_OUTPUT" echo $$FOSSA_REPORT_URL + fossa_analyze_output_1=$(fossa analyze --debug 2>&1 | tee /dev/stderr || true) fossa report attribution --format text --timeout 600 > /tmp/THIRDPARTY exit $exit_code env: @@ -336,25 +338,25 @@ jobs: run: | echo "| Test-Types to be executed |" >> $GITHUB_STEP_SUMMARY echo "| ------------- |" >> $GITHUB_STEP_SUMMARY - if ${{ steps.testset.outputs.unit }}; then + if ${{ steps.testset.outputs.unit == 'true' }}; then echo "| Unit |" >> $GITHUB_STEP_SUMMARY fi - if ${{ steps.testset.outputs.knowledge }}; then + if ${{ steps.testset.outputs.knowledge == 'true' }}; then echo "| Knowledge |" >> $GITHUB_STEP_SUMMARY fi - if ${{ steps.testset.outputs.ui }}; then + if ${{ steps.testset.outputs.ui == 'true' }}; then echo "| UI |" >> $GITHUB_STEP_SUMMARY fi - if ${{ steps.testset.outputs.modinput_functional }}; then + if ${{ steps.testset.outputs.modinput_functional == 'true' }}; then echo "| Modinput |" >> $GITHUB_STEP_SUMMARY fi - if ${{ steps.configure-tests-on-labels.outputs.execute_scripted_inputs_labeled }}; then + if ${{ steps.testset.outputs.scripted_inputs == 'true' }}; then echo "| Scripted Input |" >> $GITHUB_STEP_SUMMARY fi - if ${{ steps.testset.outputs.scripted_inputs }}; then + if ${{ steps.testset.outputs.scripted_inputs == 'true' }}; then echo "| Requirement |" >> $GITHUB_STEP_SUMMARY fi - if ${{ steps.modinput-version.outputs.ucc_modinput_tests }}; then + if ${{ steps.modinput-version.outputs.ucc_modinput_tests == 'true' }}; then echo "| UCC Modinput |" >> $GITHUB_STEP_SUMMARY fi From d766c35dbddbc6943e17864ffd331c178da0dfe4 Mon Sep 17 00:00:00 2001 From: Harshil Gajera Date: Tue, 13 Aug 2024 14:56:08 +0530 Subject: [PATCH 31/73] ci: debugging --- .github/workflows/reusable-build-test-release.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/reusable-build-test-release.yml b/.github/workflows/reusable-build-test-release.yml index d84242a55..f877c239c 100644 --- a/.github/workflows/reusable-build-test-release.yml +++ b/.github/workflows/reusable-build-test-release.yml @@ -221,11 +221,12 @@ jobs: exit_code=$? echo "fossa analysis complete" echo $fossa_analyze_output - FOSSA_REPORT_URL=$(echo "$fossa_analyze_output" | grep -o 'https://app.fossa.com[^ ]*') || true + FOSSA_REPORT_URL=$(echo $fossa_analyze_output | grep -o 'https://app.fossa.com[^ ]*') || true echo $FOSSA_REPORT_URL +# echo $$FOSSA_REPORT_URL + fossa_analyze_output_1=$(fossa analyze --debug 2>&1 | tee /dev/stderr) + echo $fossa_analyze_output_1 echo "FOSSA_REPORT_URL=$FOSSA_REPORT_URL" >> "$GITHUB_OUTPUT" - echo $$FOSSA_REPORT_URL - fossa_analyze_output_1=$(fossa analyze --debug 2>&1 | tee /dev/stderr || true) fossa report attribution --format text --timeout 600 > /tmp/THIRDPARTY exit $exit_code env: From fa4755d0abaaba5a9844ba0b7b67f87dac41062b Mon Sep 17 00:00:00 2001 From: Harshil Gajera Date: Tue, 13 Aug 2024 15:11:57 +0530 Subject: [PATCH 32/73] ci: debugging --- .github/workflows/reusable-build-test-release.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/reusable-build-test-release.yml b/.github/workflows/reusable-build-test-release.yml index f877c239c..5d4f5b60d 100644 --- a/.github/workflows/reusable-build-test-release.yml +++ b/.github/workflows/reusable-build-test-release.yml @@ -221,9 +221,8 @@ jobs: exit_code=$? echo "fossa analysis complete" echo $fossa_analyze_output - FOSSA_REPORT_URL=$(echo $fossa_analyze_output | grep -o 'https://app.fossa.com[^ ]*') || true + FOSSA_REPORT_URL=$(echo "$fossa_analyze_output" | grep -o 'https://app.fossa.com[^ ]*' || true) echo $FOSSA_REPORT_URL -# echo $$FOSSA_REPORT_URL fossa_analyze_output_1=$(fossa analyze --debug 2>&1 | tee /dev/stderr) echo $fossa_analyze_output_1 echo "FOSSA_REPORT_URL=$FOSSA_REPORT_URL" >> "$GITHUB_OUTPUT" From 8d37fbefd7c07d6e77b04e270d18ca6900d47225 Mon Sep 17 00:00:00 2001 From: Harshil Gajera Date: Tue, 13 Aug 2024 15:22:14 +0530 Subject: [PATCH 33/73] ci: debugging --- .github/workflows/reusable-build-test-release.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/reusable-build-test-release.yml b/.github/workflows/reusable-build-test-release.yml index 5d4f5b60d..d72f8d53a 100644 --- a/.github/workflows/reusable-build-test-release.yml +++ b/.github/workflows/reusable-build-test-release.yml @@ -220,9 +220,8 @@ jobs: fossa_analyze_output=$(fossa analyze --debug || true) exit_code=$? echo "fossa analysis complete" - echo $fossa_analyze_output - FOSSA_REPORT_URL=$(echo "$fossa_analyze_output" | grep -o 'https://app.fossa.com[^ ]*' || true) - echo $FOSSA_REPORT_URL + FOSSA_REPORT_URL=$(echo "$fossa_analyze_output" | grep -o 'https://app.fossa.com[^ ]*') + echo "url="$FOSSA_REPORT_URL fossa_analyze_output_1=$(fossa analyze --debug 2>&1 | tee /dev/stderr) echo $fossa_analyze_output_1 echo "FOSSA_REPORT_URL=$FOSSA_REPORT_URL" >> "$GITHUB_OUTPUT" From 8e9cc5e496a0fe6e4f19bdd47a80f39cafa16e28 Mon Sep 17 00:00:00 2001 From: Harshil Gajera Date: Tue, 13 Aug 2024 15:38:47 +0530 Subject: [PATCH 34/73] ci: debugging --- .../workflows/reusable-build-test-release.yml | 25 +++++++++++++++---- 1 file changed, 20 insertions(+), 5 deletions(-) diff --git a/.github/workflows/reusable-build-test-release.yml b/.github/workflows/reusable-build-test-release.yml index d72f8d53a..a0f214b5e 100644 --- a/.github/workflows/reusable-build-test-release.yml +++ b/.github/workflows/reusable-build-test-release.yml @@ -216,17 +216,32 @@ jobs: - name: run fossa analyze and create report id: fossa-scan run: | + # Install the latest version of FOSSA CLI curl -H 'Cache-Control: no-cache' https://raw.githubusercontent.com/fossas/fossa-cli/master/install-latest.sh | bash - fossa_analyze_output=$(fossa analyze --debug || true) + + # Run FOSSA analyze, display the output in real-time, and capture it for further processing + fossa_analyze_output=$(fossa analyze --debug 2>&1 | tee /tmp/fossa_analyze_output.txt) exit_code=$? + + # Print a message indicating the completion of the FOSSA analysis echo "fossa analysis complete" - FOSSA_REPORT_URL=$(echo "$fossa_analyze_output" | grep -o 'https://app.fossa.com[^ ]*') - echo "url="$FOSSA_REPORT_URL - fossa_analyze_output_1=$(fossa analyze --debug 2>&1 | tee /dev/stderr) - echo $fossa_analyze_output_1 + + # Extract the FOSSA report URL from the captured output + # Using '|| true' ensures that the script doesn't fail if grep returns no matches + FOSSA_REPORT_URL=$(grep -o 'https://app.fossa.com[^ ]*' /tmp/fossa_analyze_output.txt || true) + + # Print the extracted URL (if any) + echo "url=$FOSSA_REPORT_URL" + + # Save the FOSSA report URL to the GitHub Actions output echo "FOSSA_REPORT_URL=$FOSSA_REPORT_URL" >> "$GITHUB_OUTPUT" + + # Run the FOSSA report command, capturing the output to a file fossa report attribution --format text --timeout 600 > /tmp/THIRDPARTY + + # Exit with the same exit code as the FOSSA analyze command exit $exit_code + env: FOSSA_API_KEY: ${{ secrets.FOSSA_API_KEY }} - name: upload THIRDPARTY file From 4d8d3cdd58e0802d7b9ff4827792424b511b857c Mon Sep 17 00:00:00 2001 From: Harshil Gajera Date: Tue, 13 Aug 2024 17:44:06 +0530 Subject: [PATCH 35/73] ci: adding unit test summary --- .../workflows/reusable-build-test-release.yml | 27 ++++++++++++------- 1 file changed, 18 insertions(+), 9 deletions(-) diff --git a/.github/workflows/reusable-build-test-release.yml b/.github/workflows/reusable-build-test-release.yml index a0f214b5e..6d95c5eaf 100644 --- a/.github/workflows/reusable-build-test-release.yml +++ b/.github/workflows/reusable-build-test-release.yml @@ -223,9 +223,6 @@ jobs: fossa_analyze_output=$(fossa analyze --debug 2>&1 | tee /tmp/fossa_analyze_output.txt) exit_code=$? - # Print a message indicating the completion of the FOSSA analysis - echo "fossa analysis complete" - # Extract the FOSSA report URL from the captured output # Using '|| true' ensures that the script doesn't fail if grep returns no matches FOSSA_REPORT_URL=$(grep -o 'https://app.fossa.com[^ ]*' /tmp/fossa_analyze_output.txt || true) @@ -252,7 +249,7 @@ jobs: - name: job summary if: success() || failure() run: | - echo "View FOSSA Report: ${{ steps.fossa-scan.outputs.FOSSA_REPORT_URL }}" >> $GITHUB_STEP_SUMMARY + echo "FOSSA Report: ${{ steps.fossa-scan.outputs.FOSSA_REPORT_URL }}" >> $GITHUB_STEP_SUMMARY fossa-test: continue-on-error: true @@ -367,13 +364,9 @@ jobs: if ${{ steps.testset.outputs.scripted_inputs == 'true' }}; then echo "| Scripted Input |" >> $GITHUB_STEP_SUMMARY fi - if ${{ steps.testset.outputs.scripted_inputs == 'true' }}; then + if ${{ steps.testset.outputs.requirement_test == 'true' }}; then echo "| Requirement |" >> $GITHUB_STEP_SUMMARY fi - if ${{ steps.modinput-version.outputs.ucc_modinput_tests == 'true' }}; then - echo "| UCC Modinput |" >> $GITHUB_STEP_SUMMARY - fi - run-unit-tests: name: test-unit-python3-${{ matrix.python-version }} @@ -471,6 +464,22 @@ jobs: run: cp tests/unit/pytest-ci.ini pytest.ini - name: Run Pytest with coverage run: poetry run pytest --cov=./ --cov-report=xml --junitxml=test-results/junit.xml tests/unit + - job-summary: + run: | + junit_xml_path="test-results/junit.xml" + total_tests=$(xmllint --xpath 'sum(//testsuite/@tests)' $junit_xml_path) + failures=$(xmllint --xpath 'sum(//testsuite/@failures)' $junit_xml_path) + errors=$(xmllint --xpath 'sum(//testsuite/@errors)' $junit_xml_path) + skipped=$(xmllint --xpath 'sum(//testsuite/@skipped)' $junit_xml_path) + passed=$((total_tests - failures - errors - skipped)) + + echo "| Total Tests | $total_tests |" >> $GITHUB_STEP_SUMMARY + echo "| ------------- | -------- |" >> $GITHUB_STEP_SUMMARY + echo "| Passed Tests | $passed |" >> $GITHUB_STEP_SUMMARY + echo "| Failed Tests | $failures |" >> $GITHUB_STEP_SUMMARY + echo "| Errored Tests | $errors |" >> $GITHUB_STEP_SUMMARY + echo "| Skipped Tests | $skipped |" >> $GITHUB_STEP_SUMMARY + - uses: actions/upload-artifact@v4 if: success() || failure() with: From e05ab95ffad955ba37aca9e2999386eaf65761c0 Mon Sep 17 00:00:00 2001 From: Harshil Gajera Date: Tue, 13 Aug 2024 17:48:06 +0530 Subject: [PATCH 36/73] ci: adding unit test summary --- .github/workflows/reusable-build-test-release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/reusable-build-test-release.yml b/.github/workflows/reusable-build-test-release.yml index 6d95c5eaf..7e94494af 100644 --- a/.github/workflows/reusable-build-test-release.yml +++ b/.github/workflows/reusable-build-test-release.yml @@ -464,7 +464,7 @@ jobs: run: cp tests/unit/pytest-ci.ini pytest.ini - name: Run Pytest with coverage run: poetry run pytest --cov=./ --cov-report=xml --junitxml=test-results/junit.xml tests/unit - - job-summary: + - name : Job summary run: | junit_xml_path="test-results/junit.xml" total_tests=$(xmllint --xpath 'sum(//testsuite/@tests)' $junit_xml_path) From a0cffc4d5204400e0d4788e13e06324dcee9d919 Mon Sep 17 00:00:00 2001 From: Harshil Gajera Date: Tue, 13 Aug 2024 17:56:49 +0530 Subject: [PATCH 37/73] ci: adding unit test summary --- .../workflows/reusable-build-test-release.yml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/.github/workflows/reusable-build-test-release.yml b/.github/workflows/reusable-build-test-release.yml index 7e94494af..2d89c21a1 100644 --- a/.github/workflows/reusable-build-test-release.yml +++ b/.github/workflows/reusable-build-test-release.yml @@ -413,6 +413,24 @@ jobs: run: cp tests/unit/pytest-ci.ini pytest.ini - name: Run Pytest with coverage run: poetry run pytest --cov=./ --cov-report=xml --junitxml=test-results/junit.xml tests/unit + - name : Job summary + run: | + apt-get update -qq + apt-get install -y libxml2-utils + junit_xml_path="test-results/junit.xml" + total_tests=$(xmllint --xpath 'sum(//testsuite/@tests)' $junit_xml_path) + failures=$(xmllint --xpath 'sum(//testsuite/@failures)' $junit_xml_path) + errors=$(xmllint --xpath 'sum(//testsuite/@errors)' $junit_xml_path) + skipped=$(xmllint --xpath 'sum(//testsuite/@skipped)' $junit_xml_path) + passed=$((total_tests - failures - errors - skipped)) + + echo "| Total Tests | $total_tests |" >> $GITHUB_STEP_SUMMARY + echo "| ------------- | -------- |" >> $GITHUB_STEP_SUMMARY + echo "| Passed Tests | $passed |" >> $GITHUB_STEP_SUMMARY + echo "| Failed Tests | $failures |" >> $GITHUB_STEP_SUMMARY + echo "| Errored Tests | $errors |" >> $GITHUB_STEP_SUMMARY + echo "| Skipped Tests | $skipped |" >> $GITHUB_STEP_SUMMARY + - uses: actions/upload-artifact@v4 if: success() || failure() with: From 25d2c9d2954ebe4063f183a93f2b3cb19630c497 Mon Sep 17 00:00:00 2001 From: Harshil Gajera Date: Tue, 13 Aug 2024 18:04:56 +0530 Subject: [PATCH 38/73] ci: adding unit test summary --- .github/workflows/reusable-build-test-release.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/reusable-build-test-release.yml b/.github/workflows/reusable-build-test-release.yml index 2d89c21a1..4e2054514 100644 --- a/.github/workflows/reusable-build-test-release.yml +++ b/.github/workflows/reusable-build-test-release.yml @@ -415,7 +415,6 @@ jobs: run: poetry run pytest --cov=./ --cov-report=xml --junitxml=test-results/junit.xml tests/unit - name : Job summary run: | - apt-get update -qq apt-get install -y libxml2-utils junit_xml_path="test-results/junit.xml" total_tests=$(xmllint --xpath 'sum(//testsuite/@tests)' $junit_xml_path) From b1e3d59966a2ffc6e861571b92622bb49942cfba Mon Sep 17 00:00:00 2001 From: Harshil Gajera Date: Tue, 13 Aug 2024 18:12:22 +0530 Subject: [PATCH 39/73] ci: adding unit test summary --- .github/workflows/reusable-build-test-release.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/reusable-build-test-release.yml b/.github/workflows/reusable-build-test-release.yml index 4e2054514..18480172f 100644 --- a/.github/workflows/reusable-build-test-release.yml +++ b/.github/workflows/reusable-build-test-release.yml @@ -415,7 +415,7 @@ jobs: run: poetry run pytest --cov=./ --cov-report=xml --junitxml=test-results/junit.xml tests/unit - name : Job summary run: | - apt-get install -y libxml2-utils + sudo apt-get install -y libxml2-utils junit_xml_path="test-results/junit.xml" total_tests=$(xmllint --xpath 'sum(//testsuite/@tests)' $junit_xml_path) failures=$(xmllint --xpath 'sum(//testsuite/@failures)' $junit_xml_path) @@ -483,6 +483,7 @@ jobs: run: poetry run pytest --cov=./ --cov-report=xml --junitxml=test-results/junit.xml tests/unit - name : Job summary run: | + sudo apt-get install -y libxml2-utils junit_xml_path="test-results/junit.xml" total_tests=$(xmllint --xpath 'sum(//testsuite/@tests)' $junit_xml_path) failures=$(xmllint --xpath 'sum(//testsuite/@failures)' $junit_xml_path) From 99cd466225ef2c8320d6e5b0fcb7d42cc967ca81 Mon Sep 17 00:00:00 2001 From: Harshil Gajera Date: Tue, 13 Aug 2024 19:02:30 +0530 Subject: [PATCH 40/73] ci: adding unit test summary --- .../workflows/reusable-build-test-release.yml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/.github/workflows/reusable-build-test-release.yml b/.github/workflows/reusable-build-test-release.yml index 18480172f..e8e9294fc 100644 --- a/.github/workflows/reusable-build-test-release.yml +++ b/.github/workflows/reusable-build-test-release.yml @@ -1222,6 +1222,24 @@ jobs: name: splunk ${{ matrix.splunk.version }}${{ secrets.OTHER_TA_REQUIRED_CONFIGS }} ${{ env.TEST_TYPE }} test report path: "${{ needs.setup.outputs.directory-path }}/test-results/*.xml" reporter: java-junit + - name: Job summary + if: ${{ !cancelled() }} + run: | + sudo apt-get install -y libxml2-utils + junit_xml_path="${{ needs.setup.outputs.directory-path }}/test-results/*.xml" + total_tests=$(xmllint --xpath 'sum(//testsuite/@tests)' $junit_xml_path) + failures=$(xmllint --xpath 'sum(//testsuite/@failures)' $junit_xml_path) + errors=$(xmllint --xpath 'sum(//testsuite/@errors)' $junit_xml_path) + skipped=$(xmllint --xpath 'sum(//testsuite/@skipped)' $junit_xml_path) + passed=$((total_tests - failures - errors - skipped)) + + echo "| Total Tests | $total_tests |" >> $GITHUB_STEP_SUMMARY + echo "| ------------- | -------- |" >> $GITHUB_STEP_SUMMARY + echo "| Passed Tests | $passed |" >> $GITHUB_STEP_SUMMARY + echo "| Failed Tests | $failures |" >> $GITHUB_STEP_SUMMARY + echo "| Errored Tests | $errors |" >> $GITHUB_STEP_SUMMARY + echo "| Skipped Tests | $skipped |" >> $GITHUB_STEP_SUMMARY + - name: pull diag from s3 bucket if: ${{ failure() && steps.test_report.outputs.conclusion == 'failure' }} run: | From f46a0d5a030fd55f3fbe251a43b2c716d8e708c2 Mon Sep 17 00:00:00 2001 From: Harshil Gajera Date: Tue, 13 Aug 2024 19:35:31 +0530 Subject: [PATCH 41/73] ci: adding unit test summary --- .github/workflows/reusable-build-test-release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/reusable-build-test-release.yml b/.github/workflows/reusable-build-test-release.yml index e8e9294fc..92781adfc 100644 --- a/.github/workflows/reusable-build-test-release.yml +++ b/.github/workflows/reusable-build-test-release.yml @@ -1225,7 +1225,7 @@ jobs: - name: Job summary if: ${{ !cancelled() }} run: | - sudo apt-get install -y libxml2-utils + apt-get install -y libxml2-utils junit_xml_path="${{ needs.setup.outputs.directory-path }}/test-results/*.xml" total_tests=$(xmllint --xpath 'sum(//testsuite/@tests)' $junit_xml_path) failures=$(xmllint --xpath 'sum(//testsuite/@failures)' $junit_xml_path) From 52aae342a30428afab577c40f115da0af619eb70 Mon Sep 17 00:00:00 2001 From: Harshil Gajera Date: Wed, 14 Aug 2024 12:28:03 +0530 Subject: [PATCH 42/73] ci: reverting changes --- .github/workflows/reusable-build-test-release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/reusable-build-test-release.yml b/.github/workflows/reusable-build-test-release.yml index 92781adfc..fa95c308d 100644 --- a/.github/workflows/reusable-build-test-release.yml +++ b/.github/workflows/reusable-build-test-release.yml @@ -516,7 +516,7 @@ jobs: - semgrep - run-unit-tests - fossa-scan - if: failure() + if: success() || failure() outputs: buildname: ${{ steps.buildupload.outputs.name }} permissions: From d846b2568b541f72c64ddc3a70451303755060b5 Mon Sep 17 00:00:00 2001 From: Harshil Gajera Date: Wed, 14 Aug 2024 12:28:44 +0530 Subject: [PATCH 43/73] ci: reverting changes --- .github/workflows/reusable-build-test-release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/reusable-build-test-release.yml b/.github/workflows/reusable-build-test-release.yml index fa95c308d..4e3b99600 100644 --- a/.github/workflows/reusable-build-test-release.yml +++ b/.github/workflows/reusable-build-test-release.yml @@ -1225,7 +1225,7 @@ jobs: - name: Job summary if: ${{ !cancelled() }} run: | - apt-get install -y libxml2-utils + apt-get install -y libxml2-utils || true junit_xml_path="${{ needs.setup.outputs.directory-path }}/test-results/*.xml" total_tests=$(xmllint --xpath 'sum(//testsuite/@tests)' $junit_xml_path) failures=$(xmllint --xpath 'sum(//testsuite/@failures)' $junit_xml_path) From 208ada0a788f2833de3d44d16a4fc92b16ff2276 Mon Sep 17 00:00:00 2001 From: Harshil Gajera Date: Fri, 16 Aug 2024 12:04:06 +0530 Subject: [PATCH 44/73] ci: making improvements --- .../workflows/reusable-build-test-release.yml | 37 +++++++------------ 1 file changed, 13 insertions(+), 24 deletions(-) diff --git a/.github/workflows/reusable-build-test-release.yml b/.github/workflows/reusable-build-test-release.yml index 4e3b99600..2c254e61d 100644 --- a/.github/workflows/reusable-build-test-release.yml +++ b/.github/workflows/reusable-build-test-release.yml @@ -203,11 +203,9 @@ jobs: splunk_version_list1=$(echo '${{ steps.matrix.outputs.supportedSplunk }}' | jq -r '.[].version') sc4s_version_list1=$(echo '${{ steps.matrix.outputs.supportedSC4S }}' | jq -r '.[].version') echo $splunk_version_list1,$sc4s_version_list1 - echo "Below are the splunk versions and sc4s version used for testing" - echo "| Splunk versions | SC4S version |" >> $GITHUB_STEP_SUMMARY - echo "| ------------- | ------------- |" >> $GITHUB_STEP_SUMMARY - echo "| ${splunk_version_list} | ${sc4s_version_list} |" >> $GITHUB_STEP_SUMMARY - echo "| ${splunk_version_list1} | ${sc4s_version_list1} |" >> $GITHUB_STEP_SUMMARY + echo "## Summary of Versions Used" >> $GITHUB_STEP_SUMMARY + echo "- **Splunk versions used:** (${splunk_version_list})" >> $GITHUB_STEP_SUMMARY + echo "- **SC4S versions used:** (${sc4s_version_list})" >> $GITHUB_STEP_SUMMARY fossa-scan: runs-on: ubuntu-latest @@ -423,12 +421,9 @@ jobs: skipped=$(xmllint --xpath 'sum(//testsuite/@skipped)' $junit_xml_path) passed=$((total_tests - failures - errors - skipped)) - echo "| Total Tests | $total_tests |" >> $GITHUB_STEP_SUMMARY - echo "| ------------- | -------- |" >> $GITHUB_STEP_SUMMARY - echo "| Passed Tests | $passed |" >> $GITHUB_STEP_SUMMARY - echo "| Failed Tests | $failures |" >> $GITHUB_STEP_SUMMARY - echo "| Errored Tests | $errors |" >> $GITHUB_STEP_SUMMARY - echo "| Skipped Tests | $skipped |" >> $GITHUB_STEP_SUMMARY + echo "| Total Tests | Passed Tests | Failed Tests | Errored Tests | Skipped Tests |" >> $GITHUB_STEP_SUMMARY + echo "| ----------- | ------------ | ------------ | ------------- | ------------- |" >> $GITHUB_STEP_SUMMARY + echo "| $total_tests | $passed | $failures | $errors | $skipped |" >> $GITHUB_STEP_SUMMARY - uses: actions/upload-artifact@v4 if: success() || failure() @@ -490,13 +485,10 @@ jobs: errors=$(xmllint --xpath 'sum(//testsuite/@errors)' $junit_xml_path) skipped=$(xmllint --xpath 'sum(//testsuite/@skipped)' $junit_xml_path) passed=$((total_tests - failures - errors - skipped)) + echo "| Total Tests | Passed Tests | Failed Tests | Errored Tests | Skipped Tests |" >> $GITHUB_STEP_SUMMARY + echo "| ----------- | ------------ | ------------ | ------------- | ------------- |" >> $GITHUB_STEP_SUMMARY + echo "| $total_tests | $passed | $failures | $errors | $skipped |" >> $GITHUB_STEP_SUMMARY - echo "| Total Tests | $total_tests |" >> $GITHUB_STEP_SUMMARY - echo "| ------------- | -------- |" >> $GITHUB_STEP_SUMMARY - echo "| Passed Tests | $passed |" >> $GITHUB_STEP_SUMMARY - echo "| Failed Tests | $failures |" >> $GITHUB_STEP_SUMMARY - echo "| Errored Tests | $errors |" >> $GITHUB_STEP_SUMMARY - echo "| Skipped Tests | $skipped |" >> $GITHUB_STEP_SUMMARY - uses: actions/upload-artifact@v4 if: success() || failure() @@ -1227,18 +1219,15 @@ jobs: run: | apt-get install -y libxml2-utils || true junit_xml_path="${{ needs.setup.outputs.directory-path }}/test-results/*.xml" + ls ${{ needs.setup.outputs.directory-path }}/test-results/ total_tests=$(xmllint --xpath 'sum(//testsuite/@tests)' $junit_xml_path) failures=$(xmllint --xpath 'sum(//testsuite/@failures)' $junit_xml_path) errors=$(xmllint --xpath 'sum(//testsuite/@errors)' $junit_xml_path) skipped=$(xmllint --xpath 'sum(//testsuite/@skipped)' $junit_xml_path) passed=$((total_tests - failures - errors - skipped)) - - echo "| Total Tests | $total_tests |" >> $GITHUB_STEP_SUMMARY - echo "| ------------- | -------- |" >> $GITHUB_STEP_SUMMARY - echo "| Passed Tests | $passed |" >> $GITHUB_STEP_SUMMARY - echo "| Failed Tests | $failures |" >> $GITHUB_STEP_SUMMARY - echo "| Errored Tests | $errors |" >> $GITHUB_STEP_SUMMARY - echo "| Skipped Tests | $skipped |" >> $GITHUB_STEP_SUMMARY + echo "| Total Tests | Passed Tests | Failed Tests | Errored Tests | Skipped Tests |" >> $GITHUB_STEP_SUMMARY + echo "| ----------- | ------------ | ------------ | ------------- | ------------- |" >> $GITHUB_STEP_SUMMARY + echo "| $total_tests | $passed | $failures | $errors | $skipped |" >> $GITHUB_STEP_SUMMARY - name: pull diag from s3 bucket if: ${{ failure() && steps.test_report.outputs.conclusion == 'failure' }} From ce9243226eb365a0e527b1eb38f9def9e2fa5363 Mon Sep 17 00:00:00 2001 From: Harshil Gajera Date: Fri, 16 Aug 2024 14:40:48 +0530 Subject: [PATCH 45/73] ci: making improvements --- .github/workflows/reusable-build-test-release.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/reusable-build-test-release.yml b/.github/workflows/reusable-build-test-release.yml index 2c254e61d..d5289aa1d 100644 --- a/.github/workflows/reusable-build-test-release.yml +++ b/.github/workflows/reusable-build-test-release.yml @@ -200,9 +200,8 @@ jobs: uses: splunk/addonfactory-test-matrix-action@v2.1 - name: job summary run: | - splunk_version_list1=$(echo '${{ steps.matrix.outputs.supportedSplunk }}' | jq -r '.[].version') - sc4s_version_list1=$(echo '${{ steps.matrix.outputs.supportedSC4S }}' | jq -r '.[].version') - echo $splunk_version_list1,$sc4s_version_list1 + splunk_version_list=$(echo '${{ steps.matrix.outputs.supportedSplunk }}' | jq -r '.[].version') + sc4s_version_list=$(echo '${{ steps.matrix.outputs.supportedSC4S }}' | jq -r '.[].version') echo "## Summary of Versions Used" >> $GITHUB_STEP_SUMMARY echo "- **Splunk versions used:** (${splunk_version_list})" >> $GITHUB_STEP_SUMMARY echo "- **SC4S versions used:** (${sc4s_version_list})" >> $GITHUB_STEP_SUMMARY From 7aa5bec530b4582808636c5ae753f9975a5e6a59 Mon Sep 17 00:00:00 2001 From: Harshil Gajera Date: Tue, 20 Aug 2024 14:14:22 +0530 Subject: [PATCH 46/73] ci: adding report url --- .github/workflows/reusable-build-test-release.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/reusable-build-test-release.yml b/.github/workflows/reusable-build-test-release.yml index d5289aa1d..b64d4c8ec 100644 --- a/.github/workflows/reusable-build-test-release.yml +++ b/.github/workflows/reusable-build-test-release.yml @@ -1224,9 +1224,11 @@ jobs: errors=$(xmllint --xpath 'sum(//testsuite/@errors)' $junit_xml_path) skipped=$(xmllint --xpath 'sum(//testsuite/@skipped)' $junit_xml_path) passed=$((total_tests - failures - errors - skipped)) + echo "## Summary for splunk ${{ matrix.splunk.version }}${{ secrets.OTHER_TA_REQUIRED_CONFIGS }} ${{ env.TEST_TYPE }} test report" >> $GITHUB_STEP_SUMMARY echo "| Total Tests | Passed Tests | Failed Tests | Errored Tests | Skipped Tests |" >> $GITHUB_STEP_SUMMARY echo "| ----------- | ------------ | ------------ | ------------- | ------------- |" >> $GITHUB_STEP_SUMMARY echo "| $total_tests | $passed | $failures | $errors | $skipped |" >> $GITHUB_STEP_SUMMARY + echo "### Link to html test report: ${{steps.test_report.outputs.url_html}}" >> $GITHUB_STEP_SUMMARY - name: pull diag from s3 bucket if: ${{ failure() && steps.test_report.outputs.conclusion == 'failure' }} From 0abb779612fba9feb6fa5db6f0b7dfe8a502fa5b Mon Sep 17 00:00:00 2001 From: Harshil Gajera Date: Tue, 20 Aug 2024 18:48:41 +0530 Subject: [PATCH 47/73] ci: adding condition --- .../workflows/reusable-build-test-release.yml | 107 +++++++++++++++++- 1 file changed, 106 insertions(+), 1 deletion(-) diff --git a/.github/workflows/reusable-build-test-release.yml b/.github/workflows/reusable-build-test-release.yml index b64d4c8ec..91f179946 100644 --- a/.github/workflows/reusable-build-test-release.yml +++ b/.github/workflows/reusable-build-test-release.yml @@ -420,10 +420,16 @@ jobs: skipped=$(xmllint --xpath 'sum(//testsuite/@skipped)' $junit_xml_path) passed=$((total_tests - failures - errors - skipped)) + # Check for failures or errors + if [ "$failures" -gt 0 ] || [ "$errors" -gt 0 ]; then + echo "## Summary for splunk ${{ matrix.splunk.version }}${{ secrets.OTHER_TA_REQUIRED_CONFIGS }} ${{ env.TEST_TYPE }} test report" >> $GITHUB_STEP_SUMMARY echo "| Total Tests | Passed Tests | Failed Tests | Errored Tests | Skipped Tests |" >> $GITHUB_STEP_SUMMARY echo "| ----------- | ------------ | ------------ | ------------- | ------------- |" >> $GITHUB_STEP_SUMMARY echo "| $total_tests | $passed | $failures | $errors | $skipped |" >> $GITHUB_STEP_SUMMARY - + echo "### Link to html test report: ${{steps.test_report.outputs.url_html}}" >> $GITHUB_STEP_SUMMARY + else + echo "All tests passed successfully. No failures or errors to report." + fi - uses: actions/upload-artifact@v4 if: success() || failure() with: @@ -1224,12 +1230,19 @@ jobs: errors=$(xmllint --xpath 'sum(//testsuite/@errors)' $junit_xml_path) skipped=$(xmllint --xpath 'sum(//testsuite/@skipped)' $junit_xml_path) passed=$((total_tests - failures - errors - skipped)) + + # Check for failures or errors + if [ "failures" -gt 0 ] || [ "errors" -gt 0 ]; then echo "## Summary for splunk ${{ matrix.splunk.version }}${{ secrets.OTHER_TA_REQUIRED_CONFIGS }} ${{ env.TEST_TYPE }} test report" >> $GITHUB_STEP_SUMMARY echo "| Total Tests | Passed Tests | Failed Tests | Errored Tests | Skipped Tests |" >> $GITHUB_STEP_SUMMARY echo "| ----------- | ------------ | ------------ | ------------- | ------------- |" >> $GITHUB_STEP_SUMMARY echo "| $total_tests | $passed | $failures | $errors | $skipped |" >> $GITHUB_STEP_SUMMARY echo "### Link to html test report: ${{steps.test_report.outputs.url_html}}" >> $GITHUB_STEP_SUMMARY + else + echo "All tests passed successfully. No failures or errors to report." + fi + - name: pull diag from s3 bucket if: ${{ failure() && steps.test_report.outputs.conclusion == 'failure' }} run: | @@ -1442,6 +1455,30 @@ jobs: name: splunk ${{ matrix.splunk.version }} ${{ env.TEST_TYPE }} test report path: "${{ needs.setup.outputs.directory-path }}/test-results/*.xml" reporter: java-junit + - name: Job summary + if: ${{ !cancelled() }} + run: | + apt-get install -y libxml2-utils || true + junit_xml_path="${{ needs.setup.outputs.directory-path }}/test-results/*.xml" + ls ${{ needs.setup.outputs.directory-path }}/test-results/ + total_tests=$(xmllint --xpath 'sum(//testsuite/@tests)' $junit_xml_path) + failures=$(xmllint --xpath 'sum(//testsuite/@failures)' $junit_xml_path) + errors=$(xmllint --xpath 'sum(//testsuite/@errors)' $junit_xml_path) + skipped=$(xmllint --xpath 'sum(//testsuite/@skipped)' $junit_xml_path) + passed=$((total_tests - failures - errors - skipped)) + + # Check for failures or errors + if [ "failures" -gt 0 ] || [ "errors" -gt 0 ]; then + echo "## Summary for splunk ${{ matrix.splunk.version }}${{ secrets.OTHER_TA_REQUIRED_CONFIGS }} ${{ env.TEST_TYPE }} test report" >> $GITHUB_STEP_SUMMARY + echo "| Total Tests | Passed Tests | Failed Tests | Errored Tests | Skipped Tests |" >> $GITHUB_STEP_SUMMARY + echo "| ----------- | ------------ | ------------ | ------------- | ------------- |" >> $GITHUB_STEP_SUMMARY + echo "| $total_tests | $passed | $failures | $errors | $skipped |" >> $GITHUB_STEP_SUMMARY + echo "### Link to html test report: ${{steps.test_report.outputs.url_html}}" >> $GITHUB_STEP_SUMMARY + + else + echo "All tests passed successfully. No failures or errors to report." + fi + - name: pull diag from s3 bucket if: ${{ failure() && steps.test_report.outputs.conclusion == 'failure' }} run: | @@ -1675,6 +1712,30 @@ jobs: name: splunk ${{ matrix.splunk.version }}${{ secrets.OTHER_TA_REQUIRED_CONFIGS }} ${{ env.TEST_TYPE }} ${{ matrix.browser }} ${{ matrix.vendor-version.image }} test report path: "${{ needs.setup.outputs.directory-path }}/test-results/*.xml" reporter: java-junit + - name: Job summary + if: ${{ !cancelled() }} + run: | + apt-get install -y libxml2-utils || true + junit_xml_path="${{ needs.setup.outputs.directory-path }}/test-results/*.xml" + ls ${{ needs.setup.outputs.directory-path }}/test-results/ + total_tests=$(xmllint --xpath 'sum(//testsuite/@tests)' $junit_xml_path) + failures=$(xmllint --xpath 'sum(//testsuite/@failures)' $junit_xml_path) + errors=$(xmllint --xpath 'sum(//testsuite/@errors)' $junit_xml_path) + skipped=$(xmllint --xpath 'sum(//testsuite/@skipped)' $junit_xml_path) + passed=$((total_tests - failures - errors - skipped)) + + # Check for failures or errors + if [ "failures" -gt 0 ] || [ "errors" -gt 0 ]; then + echo "## Summary for splunk ${{ matrix.splunk.version }}${{ secrets.OTHER_TA_REQUIRED_CONFIGS }} ${{ env.TEST_TYPE }} test report" >> $GITHUB_STEP_SUMMARY + echo "| Total Tests | Passed Tests | Failed Tests | Errored Tests | Skipped Tests |" >> $GITHUB_STEP_SUMMARY + echo "| ----------- | ------------ | ------------ | ------------- | ------------- |" >> $GITHUB_STEP_SUMMARY + echo "| $total_tests | $passed | $failures | $errors | $skipped |" >> $GITHUB_STEP_SUMMARY + echo "### Link to html test report: ${{steps.test_report.outputs.url_html}}" >> $GITHUB_STEP_SUMMARY + + else + echo "All tests passed successfully. No failures or errors to report." + fi + - name: pull diag from s3 bucket if: ${{ failure() && steps.test_report.outputs.conclusion == 'failure' }} run: | @@ -1906,6 +1967,29 @@ jobs: name: splunk ${{ matrix.splunk.version }}${{ secrets.OTHER_TA_REQUIRED_CONFIGS }} ${{ env.TEST_TYPE }} ${{ matrix.vendor-version.image }} test report path: "${{ needs.setup.outputs.directory-path }}/test-results/*.xml" reporter: java-junit + - name: Job summary + if: ${{ !cancelled() }} + run: | + apt-get install -y libxml2-utils || true + junit_xml_path="${{ needs.setup.outputs.directory-path }}/test-results/*.xml" + ls ${{ needs.setup.outputs.directory-path }}/test-results/ + total_tests=$(xmllint --xpath 'sum(//testsuite/@tests)' $junit_xml_path) + failures=$(xmllint --xpath 'sum(//testsuite/@failures)' $junit_xml_path) + errors=$(xmllint --xpath 'sum(//testsuite/@errors)' $junit_xml_path) + skipped=$(xmllint --xpath 'sum(//testsuite/@skipped)' $junit_xml_path) + passed=$((total_tests - failures - errors - skipped)) + + # Check for failures or errors + if [ "failures" -gt 0 ] || [ "errors" -gt 0 ]; then + echo "## Summary for splunk ${{ matrix.splunk.version }}${{ secrets.OTHER_TA_REQUIRED_CONFIGS }} ${{ env.TEST_TYPE }} test report" >> $GITHUB_STEP_SUMMARY + echo "| Total Tests | Passed Tests | Failed Tests | Errored Tests | Skipped Tests |" >> $GITHUB_STEP_SUMMARY + echo "| ----------- | ------------ | ------------ | ------------- | ------------- |" >> $GITHUB_STEP_SUMMARY + echo "| $total_tests | $passed | $failures | $errors | $skipped |" >> $GITHUB_STEP_SUMMARY + echo "### Link to html test report: ${{steps.test_report.outputs.url_html}}" >> $GITHUB_STEP_SUMMARY + + else + echo "All tests passed successfully. No failures or errors to report." + fi - name: pull diag from s3 bucket if: ${{ failure() && steps.test_report.outputs.conclusion == 'failure' }} run: | @@ -2131,6 +2215,27 @@ jobs: name: splunk ${{ matrix.splunk.version }}${{ secrets.OTHER_TA_REQUIRED_CONFIGS }} ${{ env.TEST_TYPE }} ${{ matrix.vendor-version.image }} ${{ steps.os-name-version.outputs.os-name }} ${{ steps.os-name-version.outputs.os-version }} test report path: "${{ needs.setup.outputs.directory-path }}/test-results/*.xml" reporter: java-junit + - name: Job summary + if: ${{ !cancelled() }} + run: | + apt-get install -y libxml2-utils || true + junit_xml_path="${{ needs.setup.outputs.directory-path }}/test-results/*.xml" + total_tests=$(xmllint --xpath 'sum(//testsuite/@tests)' $junit_xml_path) + failures=$(xmllint --xpath 'sum(//testsuite/@failures)' $junit_xml_path) + errors=$(xmllint --xpath 'sum(//testsuite/@errors)' $junit_xml_path) + skipped=$(xmllint --xpath 'sum(//testsuite/@skipped)' $junit_xml_path) + passed=$((total_tests - failures - errors - skipped)) + + # Check for failures or errors + if [ "$failures" -gt 0 ] || [ "$errors" -gt 0 ]; then + echo "## Summary for splunk ${{ matrix.splunk.version }}${{ secrets.OTHER_TA_REQUIRED_CONFIGS }} ${{ env.TEST_TYPE }} test report" >> $GITHUB_STEP_SUMMARY + echo "| Total Tests | Passed Tests | Failed Tests | Errored Tests | Skipped Tests |" >> $GITHUB_STEP_SUMMARY + echo "| ----------- | ------------ | ------------ | ------------- | ------------- |" >> $GITHUB_STEP_SUMMARY + echo "| $total_tests | $passed | $failures | $errors | $skipped |" >> $GITHUB_STEP_SUMMARY + echo "### Link to html test report: ${{steps.test_report.outputs.url_html}}" >> $GITHUB_STEP_SUMMARY + else + echo "All tests passed successfully. No failures or errors to report." + fi - name: pull diag from s3 bucket if: ${{ failure() && steps.test_report.outputs.conclusion == 'failure' }} run: | From 963aac533f4743d46bd9170a1c5a293e045f5a9d Mon Sep 17 00:00:00 2001 From: Harshil Gajera Date: Tue, 20 Aug 2024 19:51:33 +0530 Subject: [PATCH 48/73] ci: updating condition --- .github/workflows/reusable-build-test-release.yml | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/.github/workflows/reusable-build-test-release.yml b/.github/workflows/reusable-build-test-release.yml index 91f179946..875ca00fc 100644 --- a/.github/workflows/reusable-build-test-release.yml +++ b/.github/workflows/reusable-build-test-release.yml @@ -1232,7 +1232,7 @@ jobs: passed=$((total_tests - failures - errors - skipped)) # Check for failures or errors - if [ "failures" -gt 0 ] || [ "errors" -gt 0 ]; then + if [ "$failures" -gt 0 ] || [ "$errors" -gt 0 ]; then echo "## Summary for splunk ${{ matrix.splunk.version }}${{ secrets.OTHER_TA_REQUIRED_CONFIGS }} ${{ env.TEST_TYPE }} test report" >> $GITHUB_STEP_SUMMARY echo "| Total Tests | Passed Tests | Failed Tests | Errored Tests | Skipped Tests |" >> $GITHUB_STEP_SUMMARY echo "| ----------- | ------------ | ------------ | ------------- | ------------- |" >> $GITHUB_STEP_SUMMARY @@ -1468,7 +1468,7 @@ jobs: passed=$((total_tests - failures - errors - skipped)) # Check for failures or errors - if [ "failures" -gt 0 ] || [ "errors" -gt 0 ]; then + if [ "$failures" -gt 0 ] || [ "$errors" -gt 0 ]; then echo "## Summary for splunk ${{ matrix.splunk.version }}${{ secrets.OTHER_TA_REQUIRED_CONFIGS }} ${{ env.TEST_TYPE }} test report" >> $GITHUB_STEP_SUMMARY echo "| Total Tests | Passed Tests | Failed Tests | Errored Tests | Skipped Tests |" >> $GITHUB_STEP_SUMMARY echo "| ----------- | ------------ | ------------ | ------------- | ------------- |" >> $GITHUB_STEP_SUMMARY @@ -1725,13 +1725,12 @@ jobs: passed=$((total_tests - failures - errors - skipped)) # Check for failures or errors - if [ "failures" -gt 0 ] || [ "errors" -gt 0 ]; then + if [ "$failures" -gt 0 ] || [ "$errors" -gt 0 ]; then echo "## Summary for splunk ${{ matrix.splunk.version }}${{ secrets.OTHER_TA_REQUIRED_CONFIGS }} ${{ env.TEST_TYPE }} test report" >> $GITHUB_STEP_SUMMARY echo "| Total Tests | Passed Tests | Failed Tests | Errored Tests | Skipped Tests |" >> $GITHUB_STEP_SUMMARY echo "| ----------- | ------------ | ------------ | ------------- | ------------- |" >> $GITHUB_STEP_SUMMARY echo "| $total_tests | $passed | $failures | $errors | $skipped |" >> $GITHUB_STEP_SUMMARY echo "### Link to html test report: ${{steps.test_report.outputs.url_html}}" >> $GITHUB_STEP_SUMMARY - else echo "All tests passed successfully. No failures or errors to report." fi @@ -1980,7 +1979,7 @@ jobs: passed=$((total_tests - failures - errors - skipped)) # Check for failures or errors - if [ "failures" -gt 0 ] || [ "errors" -gt 0 ]; then + if [ "$failures" -gt 0 ] || [ "$errors" -gt 0 ]; then echo "## Summary for splunk ${{ matrix.splunk.version }}${{ secrets.OTHER_TA_REQUIRED_CONFIGS }} ${{ env.TEST_TYPE }} test report" >> $GITHUB_STEP_SUMMARY echo "| Total Tests | Passed Tests | Failed Tests | Errored Tests | Skipped Tests |" >> $GITHUB_STEP_SUMMARY echo "| ----------- | ------------ | ------------ | ------------- | ------------- |" >> $GITHUB_STEP_SUMMARY From 28d8a99ce3a65a69b83f309dd33580e984536583 Mon Sep 17 00:00:00 2001 From: Harshil Gajera Date: Tue, 20 Aug 2024 21:16:37 +0530 Subject: [PATCH 49/73] ci: updating condition --- .../workflows/reusable-build-test-release.yml | 26 +++++++++---------- 1 file changed, 12 insertions(+), 14 deletions(-) diff --git a/.github/workflows/reusable-build-test-release.yml b/.github/workflows/reusable-build-test-release.yml index 875ca00fc..0413d5f6a 100644 --- a/.github/workflows/reusable-build-test-release.yml +++ b/.github/workflows/reusable-build-test-release.yml @@ -1219,8 +1219,8 @@ jobs: name: splunk ${{ matrix.splunk.version }}${{ secrets.OTHER_TA_REQUIRED_CONFIGS }} ${{ env.TEST_TYPE }} test report path: "${{ needs.setup.outputs.directory-path }}/test-results/*.xml" reporter: java-junit - - name: Job summary - if: ${{ !cancelled() }} + - name: Parse JUnit XML + id: parse-junit run: | apt-get install -y libxml2-utils || true junit_xml_path="${{ needs.setup.outputs.directory-path }}/test-results/*.xml" @@ -1230,18 +1230,16 @@ jobs: errors=$(xmllint --xpath 'sum(//testsuite/@errors)' $junit_xml_path) skipped=$(xmllint --xpath 'sum(//testsuite/@skipped)' $junit_xml_path) passed=$((total_tests - failures - errors - skipped)) - - # Check for failures or errors - if [ "$failures" -gt 0 ] || [ "$errors" -gt 0 ]; then - echo "## Summary for splunk ${{ matrix.splunk.version }}${{ secrets.OTHER_TA_REQUIRED_CONFIGS }} ${{ env.TEST_TYPE }} test report" >> $GITHUB_STEP_SUMMARY - echo "| Total Tests | Passed Tests | Failed Tests | Errored Tests | Skipped Tests |" >> $GITHUB_STEP_SUMMARY - echo "| ----------- | ------------ | ------------ | ------------- | ------------- |" >> $GITHUB_STEP_SUMMARY - echo "| $total_tests | $passed | $failures | $errors | $skipped |" >> $GITHUB_STEP_SUMMARY - echo "### Link to html test report: ${{steps.test_report.outputs.url_html}}" >> $GITHUB_STEP_SUMMARY - - else - echo "All tests passed successfully. No failures or errors to report." - fi + echo "tests=$total_tests" >> $GITHUB_ENV + echo "passed=passed" >> $GITHUB_ENV + echo "failed=$failures" >> $GITHUB_ENV + echo "skipped=$skipped" >> $GITHUB_ENV + echo "errors=$errors" >> $GITHUB_ENV + - name: Add job summary + run: | + echo "| Job | Total Tests | Passed | Failed | skipped | errors" >> $GITHUB_STEP_SUMMARY + echo "| --- | ----------- | ------ | ------ | ------- | ------ |" >> $GITHUB_STEP_SUMMARY + echo "| ${{ matrix.splunk }} | ${{ env.tests }} | ${{ env.passed }} | ${{ env.failed }} | ${{ env.skipped }} | ${{ env.errors }} |" >> $GITHUB_STEP_SUMMARY - name: pull diag from s3 bucket if: ${{ failure() && steps.test_report.outputs.conclusion == 'failure' }} From 1a57f09718c186628a0a708808d85efe796bdb31 Mon Sep 17 00:00:00 2001 From: Harshil Gajera Date: Wed, 21 Aug 2024 11:55:40 +0530 Subject: [PATCH 50/73] ci: combining results --- .../workflows/reusable-build-test-release.yml | 27 +++++++++++++++---- 1 file changed, 22 insertions(+), 5 deletions(-) diff --git a/.github/workflows/reusable-build-test-release.yml b/.github/workflows/reusable-build-test-release.yml index 0413d5f6a..9ab4d7c2d 100644 --- a/.github/workflows/reusable-build-test-release.yml +++ b/.github/workflows/reusable-build-test-release.yml @@ -1013,7 +1013,8 @@ jobs: matrix: splunk: ${{ fromJson(needs.meta.outputs.matrix_supportedSplunk) }} sc4s: ${{ fromJson(needs.meta.outputs.matrix_supportedSC4S) }} - + outputs: + summary-${{ matrix.splunk }}-${{ matrix.sc4s }}: ${{ steps.parse-junit.outputs.summary }} container: image: ghcr.io/splunk/workflow-engine-base:4.1.0 env: @@ -1237,10 +1238,10 @@ jobs: echo "errors=$errors" >> $GITHUB_ENV - name: Add job summary run: | - echo "| Job | Total Tests | Passed | Failed | skipped | errors" >> $GITHUB_STEP_SUMMARY - echo "| --- | ----------- | ------ | ------ | ------- | ------ |" >> $GITHUB_STEP_SUMMARY - echo "| ${{ matrix.splunk }} | ${{ env.tests }} | ${{ env.passed }} | ${{ env.failed }} | ${{ env.skipped }} | ${{ env.errors }} |" >> $GITHUB_STEP_SUMMARY - + summary="${{ matrix.splunk }}-${{ matrix.sc4s }}| ${{ env.tests }} | ${{ env.passed }} | ${{ env.failed }} | ${{ env.skipped }} | ${{ env.errors }} |" + echo "summary=$summary" >> $GITHUB_ENV + outputs: + summary: ${{ env.summary }} - name: pull diag from s3 bucket if: ${{ failure() && steps.test_report.outputs.conclusion == 'failure' }} run: | @@ -1253,6 +1254,22 @@ jobs: path: | ${{ needs.setup.outputs.directory-path }}/diag* + finalize: + needs: run-knowledge-tests + runs-on: ubuntu-latest + steps: + - name: Combine summaries into a table + run: | + echo "| Splunk - SC4S | Total Tests | Passed | Failed | skipped | errors" >> $GITHUB_STEP_SUMMARY + echo "| ---------- | ----------- | ------ | ------ | ------ | ------ |" >> $GITHUB_STEP_SUMMARY + + # Dynamically iterate over all matrix combinations + for splunk in ${{ fromJson(needs.ko-tests.strategy.matrix.splunk) }}; do + for sc4s in ${{ fromJson(needs.ko-tests.strategy.matrix.sc4s) }}; do + job_summary="${{ needs.run-knowledge-tests.outputs['summary-'$splunk'-'$sc4s] }}" + echo "$splunk-$sc4s | $job_summary" >> $GITHUB_STEP_SUMMARY + done + done run-requirement-tests: if: ${{ !cancelled() && needs.build.result == 'success' && needs.test-inventory.outputs.requirement_test == 'true' && needs.setup-workflow.outputs.execute-requirement-labeled == 'true' }} From 968997b4a84edd0393939cea94459d238346b8a5 Mon Sep 17 00:00:00 2001 From: Harshil Gajera Date: Wed, 21 Aug 2024 12:10:01 +0530 Subject: [PATCH 51/73] ci: combining results --- .../workflows/reusable-build-test-release.yml | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/.github/workflows/reusable-build-test-release.yml b/.github/workflows/reusable-build-test-release.yml index 9ab4d7c2d..33243536c 100644 --- a/.github/workflows/reusable-build-test-release.yml +++ b/.github/workflows/reusable-build-test-release.yml @@ -1014,7 +1014,7 @@ jobs: splunk: ${{ fromJson(needs.meta.outputs.matrix_supportedSplunk) }} sc4s: ${{ fromJson(needs.meta.outputs.matrix_supportedSC4S) }} outputs: - summary-${{ matrix.splunk }}-${{ matrix.sc4s }}: ${{ steps.parse-junit.outputs.summary }} + summary-${{ matrix.splunk.version }}-${{ matrix.splunk.version }}: ${{ steps.parse-junit.outputs.summary }} container: image: ghcr.io/splunk/workflow-engine-base:4.1.0 env: @@ -1239,9 +1239,7 @@ jobs: - name: Add job summary run: | summary="${{ matrix.splunk }}-${{ matrix.sc4s }}| ${{ env.tests }} | ${{ env.passed }} | ${{ env.failed }} | ${{ env.skipped }} | ${{ env.errors }} |" - echo "summary=$summary" >> $GITHUB_ENV - outputs: - summary: ${{ env.summary }} + echo "summary=$summary" >> $GITHUB_OUTPUT - name: pull diag from s3 bucket if: ${{ failure() && steps.test_report.outputs.conclusion == 'failure' }} run: | @@ -1262,10 +1260,16 @@ jobs: run: | echo "| Splunk - SC4S | Total Tests | Passed | Failed | skipped | errors" >> $GITHUB_STEP_SUMMARY echo "| ---------- | ----------- | ------ | ------ | ------ | ------ |" >> $GITHUB_STEP_SUMMARY + # Get the JSON string for the matrix strategy + matrix_json='${{ toJson(needs.run-knowledge-tests.strategy.matrix) }}' + + # Parse JSON to extract version values + splunk_versions=$(echo "$matrix_json" | jq -r '.splunk[].version') + sc4s_versions=$(echo "$matrix_json" | jq -r '.sc4s[].version') # Dynamically iterate over all matrix combinations - for splunk in ${{ fromJson(needs.ko-tests.strategy.matrix.splunk) }}; do - for sc4s in ${{ fromJson(needs.ko-tests.strategy.matrix.sc4s) }}; do + for splunk in $splunk_versions; do + for sc4s in $sc4s_versions; do job_summary="${{ needs.run-knowledge-tests.outputs['summary-'$splunk'-'$sc4s] }}" echo "$splunk-$sc4s | $job_summary" >> $GITHUB_STEP_SUMMARY done From 1be99ae75e8e31de225266cd63acd0baadf2bc15 Mon Sep 17 00:00:00 2001 From: Harshil Gajera Date: Wed, 21 Aug 2024 12:19:02 +0530 Subject: [PATCH 52/73] ci: combining results --- .../workflows/reusable-build-test-release.yml | 40 +++++++------------ 1 file changed, 14 insertions(+), 26 deletions(-) diff --git a/.github/workflows/reusable-build-test-release.yml b/.github/workflows/reusable-build-test-release.yml index 33243536c..1d219cb3d 100644 --- a/.github/workflows/reusable-build-test-release.yml +++ b/.github/workflows/reusable-build-test-release.yml @@ -1013,8 +1013,6 @@ jobs: matrix: splunk: ${{ fromJson(needs.meta.outputs.matrix_supportedSplunk) }} sc4s: ${{ fromJson(needs.meta.outputs.matrix_supportedSC4S) }} - outputs: - summary-${{ matrix.splunk.version }}-${{ matrix.splunk.version }}: ${{ steps.parse-junit.outputs.summary }} container: image: ghcr.io/splunk/workflow-engine-base:4.1.0 env: @@ -1231,15 +1229,12 @@ jobs: errors=$(xmllint --xpath 'sum(//testsuite/@errors)' $junit_xml_path) skipped=$(xmllint --xpath 'sum(//testsuite/@skipped)' $junit_xml_path) passed=$((total_tests - failures - errors - skipped)) - echo "tests=$total_tests" >> $GITHUB_ENV - echo "passed=passed" >> $GITHUB_ENV - echo "failed=$failures" >> $GITHUB_ENV - echo "skipped=$skipped" >> $GITHUB_ENV - echo "errors=$errors" >> $GITHUB_ENV - - name: Add job summary - run: | - summary="${{ matrix.splunk }}-${{ matrix.sc4s }}| ${{ env.tests }} | ${{ env.passed }} | ${{ env.failed }} | ${{ env.skipped }} | ${{ env.errors }} |" - echo "summary=$summary" >> $GITHUB_OUTPUT + echo "splunk ${{ matrix.splunk.version }}${{ secrets.OTHER_TA_REQUIRED_CONFIGS }} ${{ env.TEST_TYPE }} test report |$tests |$passed |$failures |$errors" > summary.txt + - name: Upload-${{ matrix.splunk.version }}-${{ matrix.sc4s.version }}-${{ env.TEST_TYPE }} + uses: actions/upload-artifact@v3 + with: + name: summary-${{ matrix.job }} + path: summary.txt - name: pull diag from s3 bucket if: ${{ failure() && steps.test_report.outputs.conclusion == 'failure' }} run: | @@ -1256,23 +1251,16 @@ jobs: needs: run-knowledge-tests runs-on: ubuntu-latest steps: + - name: Download all summaries + uses: actions/download-artifact@v3 + with: + name: summary-* - name: Combine summaries into a table run: | - echo "| Splunk - SC4S | Total Tests | Passed | Failed | skipped | errors" >> $GITHUB_STEP_SUMMARY - echo "| ---------- | ----------- | ------ | ------ | ------ | ------ |" >> $GITHUB_STEP_SUMMARY - # Get the JSON string for the matrix strategy - matrix_json='${{ toJson(needs.run-knowledge-tests.strategy.matrix) }}' - - # Parse JSON to extract version values - splunk_versions=$(echo "$matrix_json" | jq -r '.splunk[].version') - sc4s_versions=$(echo "$matrix_json" | jq -r '.sc4s[].version') - - # Dynamically iterate over all matrix combinations - for splunk in $splunk_versions; do - for sc4s in $sc4s_versions; do - job_summary="${{ needs.run-knowledge-tests.outputs['summary-'$splunk'-'$sc4s] }}" - echo "$splunk-$sc4s | $job_summary" >> $GITHUB_STEP_SUMMARY - done + echo "| Job | Total Tests | Passed | Failed | errors" >> $GITHUB_STEP_SUMMARY + echo "| ---------- | ----------- | ------ | ------ | ------ |" >> $GITHUB_STEP_SUMMARY + for file in summary-*/summary.txt; do + cat "$file" >> $GITHUB_STEP_SUMMARY done run-requirement-tests: From 0b3ed7f58e9f92262e156833a71b43100f499268 Mon Sep 17 00:00:00 2001 From: Harshil Gajera Date: Wed, 21 Aug 2024 13:15:43 +0530 Subject: [PATCH 53/73] ci: combining results --- .github/workflows/reusable-build-test-release.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/reusable-build-test-release.yml b/.github/workflows/reusable-build-test-release.yml index 1d219cb3d..e352f4f55 100644 --- a/.github/workflows/reusable-build-test-release.yml +++ b/.github/workflows/reusable-build-test-release.yml @@ -1233,7 +1233,7 @@ jobs: - name: Upload-${{ matrix.splunk.version }}-${{ matrix.sc4s.version }}-${{ env.TEST_TYPE }} uses: actions/upload-artifact@v3 with: - name: summary-${{ matrix.job }} + name: summary-${{ matrix.splunk.version }}-${{ secrets.OTHER_TA_REQUIRED_CONFIGS }} path: summary.txt - name: pull diag from s3 bucket if: ${{ failure() && steps.test_report.outputs.conclusion == 'failure' }} @@ -1254,7 +1254,7 @@ jobs: - name: Download all summaries uses: actions/download-artifact@v3 with: - name: summary-* + pattern: summary* - name: Combine summaries into a table run: | echo "| Job | Total Tests | Passed | Failed | errors" >> $GITHUB_STEP_SUMMARY From b7a32e4863dc1050e4776868814a2601a3322d1b Mon Sep 17 00:00:00 2001 From: Harshil Gajera Date: Wed, 21 Aug 2024 14:28:27 +0530 Subject: [PATCH 54/73] ci: combining results --- .../workflows/reusable-build-test-release.yml | 78 ++++++++++++------- 1 file changed, 49 insertions(+), 29 deletions(-) diff --git a/.github/workflows/reusable-build-test-release.yml b/.github/workflows/reusable-build-test-release.yml index e352f4f55..4a81da3df 100644 --- a/.github/workflows/reusable-build-test-release.yml +++ b/.github/workflows/reusable-build-test-release.yml @@ -1247,7 +1247,7 @@ jobs: path: | ${{ needs.setup.outputs.directory-path }}/diag* - finalize: + knowledge-tests-report-summary: needs: run-knowledge-tests runs-on: ubuntu-latest steps: @@ -1719,8 +1719,8 @@ jobs: name: splunk ${{ matrix.splunk.version }}${{ secrets.OTHER_TA_REQUIRED_CONFIGS }} ${{ env.TEST_TYPE }} ${{ matrix.browser }} ${{ matrix.vendor-version.image }} test report path: "${{ needs.setup.outputs.directory-path }}/test-results/*.xml" reporter: java-junit - - name: Job summary - if: ${{ !cancelled() }} + - name: Parse JUnit XML + id: parse-junit run: | apt-get install -y libxml2-utils || true junit_xml_path="${{ needs.setup.outputs.directory-path }}/test-results/*.xml" @@ -1730,18 +1730,12 @@ jobs: errors=$(xmllint --xpath 'sum(//testsuite/@errors)' $junit_xml_path) skipped=$(xmllint --xpath 'sum(//testsuite/@skipped)' $junit_xml_path) passed=$((total_tests - failures - errors - skipped)) - - # Check for failures or errors - if [ "$failures" -gt 0 ] || [ "$errors" -gt 0 ]; then - echo "## Summary for splunk ${{ matrix.splunk.version }}${{ secrets.OTHER_TA_REQUIRED_CONFIGS }} ${{ env.TEST_TYPE }} test report" >> $GITHUB_STEP_SUMMARY - echo "| Total Tests | Passed Tests | Failed Tests | Errored Tests | Skipped Tests |" >> $GITHUB_STEP_SUMMARY - echo "| ----------- | ------------ | ------------ | ------------- | ------------- |" >> $GITHUB_STEP_SUMMARY - echo "| $total_tests | $passed | $failures | $errors | $skipped |" >> $GITHUB_STEP_SUMMARY - echo "### Link to html test report: ${{steps.test_report.outputs.url_html}}" >> $GITHUB_STEP_SUMMARY - else - echo "All tests passed successfully. No failures or errors to report." - fi - + echo "splunk ${{ matrix.splunk.version }}${{ secrets.OTHER_TA_REQUIRED_CONFIGS }} ${{ env.TEST_TYPE }} test report |$total_tests |$passed |$failures |$errors" > summary.txt + - name: Upload-${{ matrix.splunk.version }}-${{ matrix.sc4s.version }}-${{ env.TEST_TYPE }} + uses: actions/upload-artifact@v3 + with: + name: summary-${{ matrix.splunk.version }}-${{ secrets.OTHER_TA_REQUIRED_CONFIGS }} + path: summary.txt - name: pull diag from s3 bucket if: ${{ failure() && steps.test_report.outputs.conclusion == 'failure' }} run: | @@ -1754,6 +1748,22 @@ jobs: path: | ${{ needs.setup.outputs.directory-path }}/diag* + UI-tests-report-summary: + needs: run-ui-tests + runs-on: ubuntu-latest + steps: + - name: Download all summaries + uses: actions/download-artifact@v3 + with: + pattern: summary* + - name: Combine summaries into a table + run: | + echo "| Job | Total Tests | Passed | Failed | errors" >> $GITHUB_STEP_SUMMARY + echo "| ---------- | ----------- | ------ | ------ | ------ |" >> $GITHUB_STEP_SUMMARY + for file in summary-*/summary.txt; do + cat "$file" >> $GITHUB_STEP_SUMMARY + done + run-modinput-tests: if: ${{ !cancelled() && needs.build.result == 'success' && needs.test-inventory.outputs.modinput_functional == 'true' && needs.setup-workflow.outputs.execute-modinput-labeled == 'true' }} needs: @@ -1973,8 +1983,8 @@ jobs: name: splunk ${{ matrix.splunk.version }}${{ secrets.OTHER_TA_REQUIRED_CONFIGS }} ${{ env.TEST_TYPE }} ${{ matrix.vendor-version.image }} test report path: "${{ needs.setup.outputs.directory-path }}/test-results/*.xml" reporter: java-junit - - name: Job summary - if: ${{ !cancelled() }} + - name: Parse JUnit XML + id: parse-junit run: | apt-get install -y libxml2-utils || true junit_xml_path="${{ needs.setup.outputs.directory-path }}/test-results/*.xml" @@ -1984,18 +1994,12 @@ jobs: errors=$(xmllint --xpath 'sum(//testsuite/@errors)' $junit_xml_path) skipped=$(xmllint --xpath 'sum(//testsuite/@skipped)' $junit_xml_path) passed=$((total_tests - failures - errors - skipped)) - - # Check for failures or errors - if [ "$failures" -gt 0 ] || [ "$errors" -gt 0 ]; then - echo "## Summary for splunk ${{ matrix.splunk.version }}${{ secrets.OTHER_TA_REQUIRED_CONFIGS }} ${{ env.TEST_TYPE }} test report" >> $GITHUB_STEP_SUMMARY - echo "| Total Tests | Passed Tests | Failed Tests | Errored Tests | Skipped Tests |" >> $GITHUB_STEP_SUMMARY - echo "| ----------- | ------------ | ------------ | ------------- | ------------- |" >> $GITHUB_STEP_SUMMARY - echo "| $total_tests | $passed | $failures | $errors | $skipped |" >> $GITHUB_STEP_SUMMARY - echo "### Link to html test report: ${{steps.test_report.outputs.url_html}}" >> $GITHUB_STEP_SUMMARY - - else - echo "All tests passed successfully. No failures or errors to report." - fi + echo "splunk ${{ matrix.splunk.version }}${{ secrets.OTHER_TA_REQUIRED_CONFIGS }} ${{ env.TEST_TYPE }} test report |$total_tests |$passed |$failures |$errors" > summary.txt + - name: Upload-${{ matrix.splunk.version }}-${{ matrix.sc4s.version }}-${{ env.TEST_TYPE }} + uses: actions/upload-artifact@v3 + with: + name: summary-${{ matrix.splunk.version }}-${{ secrets.OTHER_TA_REQUIRED_CONFIGS }} + path: summary.txt - name: pull diag from s3 bucket if: ${{ failure() && steps.test_report.outputs.conclusion == 'failure' }} run: | @@ -2008,6 +2012,22 @@ jobs: path: | ${{ needs.setup.outputs.directory-path }}/diag* + Modinput-tests-report-summary: + needs: run-modinput-tests + runs-on: ubuntu-latest + steps: + - name: Download all summaries + uses: actions/download-artifact@v3 + with: + pattern: summary* + - name: Combine summaries into a table + run: | + echo "| Job | Total Tests | Passed | Failed | errors" >> $GITHUB_STEP_SUMMARY + echo "| ---------- | ----------- | ------ | ------ | ------ |" >> $GITHUB_STEP_SUMMARY + for file in summary-*/summary.txt; do + cat "$file" >> $GITHUB_STEP_SUMMARY + done + run-scripted-input-tests-full-matrix: if: ${{ !cancelled() && needs.build.result == 'success' && needs.test-inventory.outputs.scripted_inputs == 'true' && ( github.base_ref == 'main' || github.ref_name == 'main' ) && needs.setup-workflow.outputs.execute-scripted_inputs-labeled == 'true' }} needs: From a31811bdd4ccfea6b19b6878d19404b1f0460562 Mon Sep 17 00:00:00 2001 From: Harshil Gajera Date: Wed, 21 Aug 2024 15:15:41 +0530 Subject: [PATCH 55/73] ci: combining results --- .github/workflows/reusable-build-test-release.yml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/reusable-build-test-release.yml b/.github/workflows/reusable-build-test-release.yml index 4a81da3df..1b4420307 100644 --- a/.github/workflows/reusable-build-test-release.yml +++ b/.github/workflows/reusable-build-test-release.yml @@ -1229,11 +1229,11 @@ jobs: errors=$(xmllint --xpath 'sum(//testsuite/@errors)' $junit_xml_path) skipped=$(xmllint --xpath 'sum(//testsuite/@skipped)' $junit_xml_path) passed=$((total_tests - failures - errors - skipped)) - echo "splunk ${{ matrix.splunk.version }}${{ secrets.OTHER_TA_REQUIRED_CONFIGS }} ${{ env.TEST_TYPE }} test report |$tests |$passed |$failures |$errors" > summary.txt + echo "splunk ${{ matrix.splunk.version }}${{ secrets.OTHER_TA_REQUIRED_CONFIGS }} ${{ env.TEST_TYPE }} test report |$total_tests |$passed |$failures |$errors" > summary.txt - name: Upload-${{ matrix.splunk.version }}-${{ matrix.sc4s.version }}-${{ env.TEST_TYPE }} uses: actions/upload-artifact@v3 with: - name: summary-${{ matrix.splunk.version }}-${{ secrets.OTHER_TA_REQUIRED_CONFIGS }} + name: summary-ko-${{ matrix.splunk.version }}-${{ secrets.OTHER_TA_REQUIRED_CONFIGS }} path: summary.txt - name: pull diag from s3 bucket if: ${{ failure() && steps.test_report.outputs.conclusion == 'failure' }} @@ -1254,7 +1254,7 @@ jobs: - name: Download all summaries uses: actions/download-artifact@v3 with: - pattern: summary* + pattern: summary-ko-* - name: Combine summaries into a table run: | echo "| Job | Total Tests | Passed | Failed | errors" >> $GITHUB_STEP_SUMMARY @@ -1734,7 +1734,7 @@ jobs: - name: Upload-${{ matrix.splunk.version }}-${{ matrix.sc4s.version }}-${{ env.TEST_TYPE }} uses: actions/upload-artifact@v3 with: - name: summary-${{ matrix.splunk.version }}-${{ secrets.OTHER_TA_REQUIRED_CONFIGS }} + name: summary-ui-${{ matrix.splunk.version }}-${{ secrets.OTHER_TA_REQUIRED_CONFIGS }} path: summary.txt - name: pull diag from s3 bucket if: ${{ failure() && steps.test_report.outputs.conclusion == 'failure' }} @@ -1755,7 +1755,7 @@ jobs: - name: Download all summaries uses: actions/download-artifact@v3 with: - pattern: summary* + pattern: summary-ui-* - name: Combine summaries into a table run: | echo "| Job | Total Tests | Passed | Failed | errors" >> $GITHUB_STEP_SUMMARY @@ -1998,7 +1998,7 @@ jobs: - name: Upload-${{ matrix.splunk.version }}-${{ matrix.sc4s.version }}-${{ env.TEST_TYPE }} uses: actions/upload-artifact@v3 with: - name: summary-${{ matrix.splunk.version }}-${{ secrets.OTHER_TA_REQUIRED_CONFIGS }} + name: summary-modinput-${{ matrix.splunk.version }}-${{ secrets.OTHER_TA_REQUIRED_CONFIGS }} path: summary.txt - name: pull diag from s3 bucket if: ${{ failure() && steps.test_report.outputs.conclusion == 'failure' }} @@ -2019,7 +2019,7 @@ jobs: - name: Download all summaries uses: actions/download-artifact@v3 with: - pattern: summary* + pattern: summary-modinput-* - name: Combine summaries into a table run: | echo "| Job | Total Tests | Passed | Failed | errors" >> $GITHUB_STEP_SUMMARY From 7a34e5ab92e0d6de61f0b7d89841a244700107e1 Mon Sep 17 00:00:00 2001 From: Harshil Gajera Date: Wed, 21 Aug 2024 15:58:30 +0530 Subject: [PATCH 56/73] ci: updating artifact version --- .github/workflows/reusable-build-test-release.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/reusable-build-test-release.yml b/.github/workflows/reusable-build-test-release.yml index 1b4420307..b421efecb 100644 --- a/.github/workflows/reusable-build-test-release.yml +++ b/.github/workflows/reusable-build-test-release.yml @@ -1252,14 +1252,14 @@ jobs: runs-on: ubuntu-latest steps: - name: Download all summaries - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4 with: pattern: summary-ko-* - name: Combine summaries into a table run: | echo "| Job | Total Tests | Passed | Failed | errors" >> $GITHUB_STEP_SUMMARY echo "| ---------- | ----------- | ------ | ------ | ------ |" >> $GITHUB_STEP_SUMMARY - for file in summary-*/summary.txt; do + for file in summary-ko*/summary.txt; do cat "$file" >> $GITHUB_STEP_SUMMARY done @@ -1753,7 +1753,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Download all summaries - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4 with: pattern: summary-ui-* - name: Combine summaries into a table @@ -2017,7 +2017,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Download all summaries - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4 with: pattern: summary-modinput-* - name: Combine summaries into a table From 1ebaee5db56f2887b7d7c4ab7e2d0528dba116f8 Mon Sep 17 00:00:00 2001 From: Harshil Gajera Date: Wed, 21 Aug 2024 18:04:53 +0530 Subject: [PATCH 57/73] ci: updating condition --- .github/workflows/reusable-build-test-release.yml | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/.github/workflows/reusable-build-test-release.yml b/.github/workflows/reusable-build-test-release.yml index b421efecb..71c3df788 100644 --- a/.github/workflows/reusable-build-test-release.yml +++ b/.github/workflows/reusable-build-test-release.yml @@ -1231,7 +1231,7 @@ jobs: passed=$((total_tests - failures - errors - skipped)) echo "splunk ${{ matrix.splunk.version }}${{ secrets.OTHER_TA_REQUIRED_CONFIGS }} ${{ env.TEST_TYPE }} test report |$total_tests |$passed |$failures |$errors" > summary.txt - name: Upload-${{ matrix.splunk.version }}-${{ matrix.sc4s.version }}-${{ env.TEST_TYPE }} - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: summary-ko-${{ matrix.splunk.version }}-${{ secrets.OTHER_TA_REQUIRED_CONFIGS }} path: summary.txt @@ -1253,10 +1253,9 @@ jobs: steps: - name: Download all summaries uses: actions/download-artifact@v4 - with: - pattern: summary-ko-* - name: Combine summaries into a table run: | + ls -al echo "| Job | Total Tests | Passed | Failed | errors" >> $GITHUB_STEP_SUMMARY echo "| ---------- | ----------- | ------ | ------ | ------ |" >> $GITHUB_STEP_SUMMARY for file in summary-ko*/summary.txt; do @@ -1754,13 +1753,11 @@ jobs: steps: - name: Download all summaries uses: actions/download-artifact@v4 - with: - pattern: summary-ui-* - name: Combine summaries into a table run: | echo "| Job | Total Tests | Passed | Failed | errors" >> $GITHUB_STEP_SUMMARY echo "| ---------- | ----------- | ------ | ------ | ------ |" >> $GITHUB_STEP_SUMMARY - for file in summary-*/summary.txt; do + for file in summary-ui-*/summary.txt; do cat "$file" >> $GITHUB_STEP_SUMMARY done @@ -2018,13 +2015,11 @@ jobs: steps: - name: Download all summaries uses: actions/download-artifact@v4 - with: - pattern: summary-modinput-* - name: Combine summaries into a table run: | echo "| Job | Total Tests | Passed | Failed | errors" >> $GITHUB_STEP_SUMMARY echo "| ---------- | ----------- | ------ | ------ | ------ |" >> $GITHUB_STEP_SUMMARY - for file in summary-*/summary.txt; do + for file in summary-modinput-*/summary.txt; do cat "$file" >> $GITHUB_STEP_SUMMARY done From 49783bbdf4a4dba811d6f966a7e3ba25e725d7ba Mon Sep 17 00:00:00 2001 From: Harshil Gajera Date: Thu, 22 Aug 2024 11:30:30 +0530 Subject: [PATCH 58/73] ci: updating condition --- .github/workflows/reusable-build-test-release.yml | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/.github/workflows/reusable-build-test-release.yml b/.github/workflows/reusable-build-test-release.yml index 71c3df788..6449f7335 100644 --- a/.github/workflows/reusable-build-test-release.yml +++ b/.github/workflows/reusable-build-test-release.yml @@ -1250,9 +1250,12 @@ jobs: knowledge-tests-report-summary: needs: run-knowledge-tests runs-on: ubuntu-latest + if: success() || failure() steps: - name: Download all summaries uses: actions/download-artifact@v4 + with: + pattern: summary-ko* - name: Combine summaries into a table run: | ls -al @@ -1740,7 +1743,7 @@ jobs: run: | echo "pulling diag" aws s3 cp s3://${{ needs.setup.outputs.s3-bucket }}/diag-${{ steps.create-job-name.outputs.job-name }}/diag-${{ steps.create-job-name.outputs.job-name }}.tgz ${{ needs.setup.outputs.directory-path }}/ - - uses: actions/upload-artifact@v4 + - uses: actions/upload-artifact@v3 if: ${{ failure() && steps.test_report.outputs.conclusion == 'failure' }} with: name: archive splunk ${{ matrix.splunk.version }}${{ secrets.OTHER_TA_REQUIRED_CONFIGS }} ${{ env.TEST_TYPE }} ${{ matrix.browser }} ${{ matrix.vendor-version.image }} tests diag @@ -1750,9 +1753,10 @@ jobs: UI-tests-report-summary: needs: run-ui-tests runs-on: ubuntu-latest + if: success() || failure() steps: - name: Download all summaries - uses: actions/download-artifact@v4 + uses: actions/download-artifact@v3 - name: Combine summaries into a table run: | echo "| Job | Total Tests | Passed | Failed | errors" >> $GITHUB_STEP_SUMMARY @@ -2012,9 +2016,10 @@ jobs: Modinput-tests-report-summary: needs: run-modinput-tests runs-on: ubuntu-latest + if: success() || failure() steps: - name: Download all summaries - uses: actions/download-artifact@v4 + uses: actions/download-artifact@v3 - name: Combine summaries into a table run: | echo "| Job | Total Tests | Passed | Failed | errors" >> $GITHUB_STEP_SUMMARY From 66dea7f39b0c14aa7914f9af0c2161e9719be8e7 Mon Sep 17 00:00:00 2001 From: Harshil Gajera Date: Thu, 22 Aug 2024 12:04:47 +0530 Subject: [PATCH 59/73] ci: updating for ko and modinput --- .github/workflows/reusable-build-test-release.yml | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/.github/workflows/reusable-build-test-release.yml b/.github/workflows/reusable-build-test-release.yml index 6449f7335..a0c735d1f 100644 --- a/.github/workflows/reusable-build-test-release.yml +++ b/.github/workflows/reusable-build-test-release.yml @@ -1734,7 +1734,7 @@ jobs: passed=$((total_tests - failures - errors - skipped)) echo "splunk ${{ matrix.splunk.version }}${{ secrets.OTHER_TA_REQUIRED_CONFIGS }} ${{ env.TEST_TYPE }} test report |$total_tests |$passed |$failures |$errors" > summary.txt - name: Upload-${{ matrix.splunk.version }}-${{ matrix.sc4s.version }}-${{ env.TEST_TYPE }} - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: summary-ui-${{ matrix.splunk.version }}-${{ secrets.OTHER_TA_REQUIRED_CONFIGS }} path: summary.txt @@ -1756,7 +1756,9 @@ jobs: if: success() || failure() steps: - name: Download all summaries - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4 + with: + pattern: summary-ui* - name: Combine summaries into a table run: | echo "| Job | Total Tests | Passed | Failed | errors" >> $GITHUB_STEP_SUMMARY @@ -2019,7 +2021,9 @@ jobs: if: success() || failure() steps: - name: Download all summaries - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4 + with: + pattern: summary-modinput* - name: Combine summaries into a table run: | echo "| Job | Total Tests | Passed | Failed | errors" >> $GITHUB_STEP_SUMMARY From 6b35f005116e54484753b192b849cc9c6eb3488f Mon Sep 17 00:00:00 2001 From: Harshil Gajera Date: Thu, 22 Aug 2024 12:10:44 +0530 Subject: [PATCH 60/73] ci: updating workflow --- .../workflows/reusable-build-test-release.yml | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/.github/workflows/reusable-build-test-release.yml b/.github/workflows/reusable-build-test-release.yml index a0c735d1f..8286d7f21 100644 --- a/.github/workflows/reusable-build-test-release.yml +++ b/.github/workflows/reusable-build-test-release.yml @@ -1229,7 +1229,7 @@ jobs: errors=$(xmllint --xpath 'sum(//testsuite/@errors)' $junit_xml_path) skipped=$(xmllint --xpath 'sum(//testsuite/@skipped)' $junit_xml_path) passed=$((total_tests - failures - errors - skipped)) - echo "splunk ${{ matrix.splunk.version }}${{ secrets.OTHER_TA_REQUIRED_CONFIGS }} ${{ env.TEST_TYPE }} test report |$total_tests |$passed |$failures |$errors" > summary.txt + echo "splunk ${{ matrix.splunk.version }}${{ secrets.OTHER_TA_REQUIRED_CONFIGS }} ${{ env.TEST_TYPE }} test report |$total_tests |$passed |$failures |$errors |${{steps.test_report.outputs.url_html}}" > summary.txt - name: Upload-${{ matrix.splunk.version }}-${{ matrix.sc4s.version }}-${{ env.TEST_TYPE }} uses: actions/upload-artifact@v4 with: @@ -1259,8 +1259,8 @@ jobs: - name: Combine summaries into a table run: | ls -al - echo "| Job | Total Tests | Passed | Failed | errors" >> $GITHUB_STEP_SUMMARY - echo "| ---------- | ----------- | ------ | ------ | ------ |" >> $GITHUB_STEP_SUMMARY + echo "| Job | Total Tests | Passed | Failed | errors | Report Link" >> $GITHUB_STEP_SUMMARY + echo "| ---------- | ----------- | ------ | ------ | ------ | ------ |" >> $GITHUB_STEP_SUMMARY for file in summary-ko*/summary.txt; do cat "$file" >> $GITHUB_STEP_SUMMARY done @@ -1732,7 +1732,7 @@ jobs: errors=$(xmllint --xpath 'sum(//testsuite/@errors)' $junit_xml_path) skipped=$(xmllint --xpath 'sum(//testsuite/@skipped)' $junit_xml_path) passed=$((total_tests - failures - errors - skipped)) - echo "splunk ${{ matrix.splunk.version }}${{ secrets.OTHER_TA_REQUIRED_CONFIGS }} ${{ env.TEST_TYPE }} test report |$total_tests |$passed |$failures |$errors" > summary.txt + echo "splunk ${{ matrix.splunk.version }}${{ secrets.OTHER_TA_REQUIRED_CONFIGS }} ${{ env.TEST_TYPE }} ${{ matrix.browser }} ${{ matrix.vendor-version.image }} test report |$total_tests |$passed |$failures |$errors |${{steps.test_report.outputs.url_html}}" > summary.txt - name: Upload-${{ matrix.splunk.version }}-${{ matrix.sc4s.version }}-${{ env.TEST_TYPE }} uses: actions/upload-artifact@v4 with: @@ -1761,8 +1761,8 @@ jobs: pattern: summary-ui* - name: Combine summaries into a table run: | - echo "| Job | Total Tests | Passed | Failed | errors" >> $GITHUB_STEP_SUMMARY - echo "| ---------- | ----------- | ------ | ------ | ------ |" >> $GITHUB_STEP_SUMMARY + echo "| Job | Total Tests | Passed | Failed | errors | Report Link" >> $GITHUB_STEP_SUMMARY + echo "| ---------- | ----------- | ------ | ------ | ------ | ----- |" >> $GITHUB_STEP_SUMMARY for file in summary-ui-*/summary.txt; do cat "$file" >> $GITHUB_STEP_SUMMARY done @@ -1997,7 +1997,7 @@ jobs: errors=$(xmllint --xpath 'sum(//testsuite/@errors)' $junit_xml_path) skipped=$(xmllint --xpath 'sum(//testsuite/@skipped)' $junit_xml_path) passed=$((total_tests - failures - errors - skipped)) - echo "splunk ${{ matrix.splunk.version }}${{ secrets.OTHER_TA_REQUIRED_CONFIGS }} ${{ env.TEST_TYPE }} test report |$total_tests |$passed |$failures |$errors" > summary.txt + echo "splunk ${{ matrix.splunk.version }}${{ secrets.OTHER_TA_REQUIRED_CONFIGS }} ${{ env.TEST_TYPE }} ${{ matrix.vendor-version.image }} test report |$total_tests |$passed |$failures |$errors |${{steps.test_report.outputs.url_html}}" > summary.txt - name: Upload-${{ matrix.splunk.version }}-${{ matrix.sc4s.version }}-${{ env.TEST_TYPE }} uses: actions/upload-artifact@v3 with: @@ -2026,8 +2026,8 @@ jobs: pattern: summary-modinput* - name: Combine summaries into a table run: | - echo "| Job | Total Tests | Passed | Failed | errors" >> $GITHUB_STEP_SUMMARY - echo "| ---------- | ----------- | ------ | ------ | ------ |" >> $GITHUB_STEP_SUMMARY + echo "| Job | Total Tests | Passed | Failed | Errors| Report Link" >> $GITHUB_STEP_SUMMARY + echo "| ---------- | ----------- | ------ | ------ | ------ | ------ |" >> $GITHUB_STEP_SUMMARY for file in summary-modinput-*/summary.txt; do cat "$file" >> $GITHUB_STEP_SUMMARY done From 41237893c893b8e0fb8d2315a65824be036a301b Mon Sep 17 00:00:00 2001 From: Harshil Gajera Date: Thu, 22 Aug 2024 12:13:30 +0530 Subject: [PATCH 61/73] ci: updating workflow --- .github/workflows/reusable-build-test-release.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/reusable-build-test-release.yml b/.github/workflows/reusable-build-test-release.yml index 8286d7f21..987990224 100644 --- a/.github/workflows/reusable-build-test-release.yml +++ b/.github/workflows/reusable-build-test-release.yml @@ -1733,7 +1733,7 @@ jobs: skipped=$(xmllint --xpath 'sum(//testsuite/@skipped)' $junit_xml_path) passed=$((total_tests - failures - errors - skipped)) echo "splunk ${{ matrix.splunk.version }}${{ secrets.OTHER_TA_REQUIRED_CONFIGS }} ${{ env.TEST_TYPE }} ${{ matrix.browser }} ${{ matrix.vendor-version.image }} test report |$total_tests |$passed |$failures |$errors |${{steps.test_report.outputs.url_html}}" > summary.txt - - name: Upload-${{ matrix.splunk.version }}-${{ matrix.sc4s.version }}-${{ env.TEST_TYPE }} + - name: Upload-${{ matrix.splunk.version }}-${{ secrets.OTHER_TA_REQUIRED_CONFIGS }}-${{ env.TEST_TYPE }}-${{ matrix.browser }}-${{ matrix.vendor-version.image }}-test-artifact uses: actions/upload-artifact@v4 with: name: summary-ui-${{ matrix.splunk.version }}-${{ secrets.OTHER_TA_REQUIRED_CONFIGS }} @@ -2001,7 +2001,7 @@ jobs: - name: Upload-${{ matrix.splunk.version }}-${{ matrix.sc4s.version }}-${{ env.TEST_TYPE }} uses: actions/upload-artifact@v3 with: - name: summary-modinput-${{ matrix.splunk.version }}-${{ secrets.OTHER_TA_REQUIRED_CONFIGS }} + name: summary-modinput-${{ matrix.splunk.version }}-${{ secrets.OTHER_TA_REQUIRED_CONFIGS }}-${{ env.TEST_TYPE }}-${{ matrix.vendor-version.image }}-artifact path: summary.txt - name: pull diag from s3 bucket if: ${{ failure() && steps.test_report.outputs.conclusion == 'failure' }} From 2ea91ef8525c74f6037709a8bc28cba24e9c3f10 Mon Sep 17 00:00:00 2001 From: Harshil Gajera Date: Thu, 22 Aug 2024 13:24:17 +0530 Subject: [PATCH 62/73] ci: updating workflow --- .github/workflows/reusable-build-test-release.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/reusable-build-test-release.yml b/.github/workflows/reusable-build-test-release.yml index 987990224..b5b7f6977 100644 --- a/.github/workflows/reusable-build-test-release.yml +++ b/.github/workflows/reusable-build-test-release.yml @@ -1733,10 +1733,10 @@ jobs: skipped=$(xmllint --xpath 'sum(//testsuite/@skipped)' $junit_xml_path) passed=$((total_tests - failures - errors - skipped)) echo "splunk ${{ matrix.splunk.version }}${{ secrets.OTHER_TA_REQUIRED_CONFIGS }} ${{ env.TEST_TYPE }} ${{ matrix.browser }} ${{ matrix.vendor-version.image }} test report |$total_tests |$passed |$failures |$errors |${{steps.test_report.outputs.url_html}}" > summary.txt - - name: Upload-${{ matrix.splunk.version }}-${{ secrets.OTHER_TA_REQUIRED_CONFIGS }}-${{ env.TEST_TYPE }}-${{ matrix.browser }}-${{ matrix.vendor-version.image }}-test-artifact + - name: Upload-artifact-for-github-summary uses: actions/upload-artifact@v4 with: - name: summary-ui-${{ matrix.splunk.version }}-${{ secrets.OTHER_TA_REQUIRED_CONFIGS }} + name: summary-ui-${{ matrix.splunk.version }}-${{ secrets.OTHER_TA_REQUIRED_CONFIGS }}-${{ env.TEST_TYPE }}-${{ matrix.browser }}-${{ matrix.vendor-version.image }}-test-artifact path: summary.txt - name: pull diag from s3 bucket if: ${{ failure() && steps.test_report.outputs.conclusion == 'failure' }} @@ -1999,7 +1999,7 @@ jobs: passed=$((total_tests - failures - errors - skipped)) echo "splunk ${{ matrix.splunk.version }}${{ secrets.OTHER_TA_REQUIRED_CONFIGS }} ${{ env.TEST_TYPE }} ${{ matrix.vendor-version.image }} test report |$total_tests |$passed |$failures |$errors |${{steps.test_report.outputs.url_html}}" > summary.txt - name: Upload-${{ matrix.splunk.version }}-${{ matrix.sc4s.version }}-${{ env.TEST_TYPE }} - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: summary-modinput-${{ matrix.splunk.version }}-${{ secrets.OTHER_TA_REQUIRED_CONFIGS }}-${{ env.TEST_TYPE }}-${{ matrix.vendor-version.image }}-artifact path: summary.txt From 76c0a81416ece830400f06f7f5799a348f828499 Mon Sep 17 00:00:00 2001 From: Harshil Gajera Date: Thu, 22 Aug 2024 14:31:35 +0530 Subject: [PATCH 63/73] ci: updating workflow --- .../workflows/reusable-build-test-release.yml | 33 ++++++++++--------- 1 file changed, 17 insertions(+), 16 deletions(-) diff --git a/.github/workflows/reusable-build-test-release.yml b/.github/workflows/reusable-build-test-release.yml index b5b7f6977..989e39c52 100644 --- a/.github/workflows/reusable-build-test-release.yml +++ b/.github/workflows/reusable-build-test-release.yml @@ -205,6 +205,7 @@ jobs: echo "## Summary of Versions Used" >> $GITHUB_STEP_SUMMARY echo "- **Splunk versions used:** (${splunk_version_list})" >> $GITHUB_STEP_SUMMARY echo "- **SC4S versions used:** (${sc4s_version_list})" >> $GITHUB_STEP_SUMMARY + echo "Browser: Chrome" >> $GITHUB_STEP_SUMMARY fossa-scan: runs-on: ubuntu-latest @@ -347,7 +348,8 @@ jobs: echo "| Test-Types to be executed |" >> $GITHUB_STEP_SUMMARY echo "| ------------- |" >> $GITHUB_STEP_SUMMARY if ${{ steps.testset.outputs.unit == 'true' }}; then - echo "| Unit |" >> $GITHUB_STEP_SUMMARY + echo "| Unit-python3.7 |" >> $GITHUB_STEP_SUMMARY + echo "| Unit-python3.9 |" >> $GITHUB_STEP_SUMMARY fi if ${{ steps.testset.outputs.knowledge == 'true' }}; then echo "| Knowledge |" >> $GITHUB_STEP_SUMMARY @@ -420,16 +422,9 @@ jobs: skipped=$(xmllint --xpath 'sum(//testsuite/@skipped)' $junit_xml_path) passed=$((total_tests - failures - errors - skipped)) - # Check for failures or errors - if [ "$failures" -gt 0 ] || [ "$errors" -gt 0 ]; then - echo "## Summary for splunk ${{ matrix.splunk.version }}${{ secrets.OTHER_TA_REQUIRED_CONFIGS }} ${{ env.TEST_TYPE }} test report" >> $GITHUB_STEP_SUMMARY echo "| Total Tests | Passed Tests | Failed Tests | Errored Tests | Skipped Tests |" >> $GITHUB_STEP_SUMMARY echo "| ----------- | ------------ | ------------ | ------------- | ------------- |" >> $GITHUB_STEP_SUMMARY echo "| $total_tests | $passed | $failures | $errors | $skipped |" >> $GITHUB_STEP_SUMMARY - echo "### Link to html test report: ${{steps.test_report.outputs.url_html}}" >> $GITHUB_STEP_SUMMARY - else - echo "All tests passed successfully. No failures or errors to report." - fi - uses: actions/upload-artifact@v4 if: success() || failure() with: @@ -1220,6 +1215,7 @@ jobs: reporter: java-junit - name: Parse JUnit XML id: parse-junit + if: ${{ !cancelled() }} run: | apt-get install -y libxml2-utils || true junit_xml_path="${{ needs.setup.outputs.directory-path }}/test-results/*.xml" @@ -1232,6 +1228,7 @@ jobs: echo "splunk ${{ matrix.splunk.version }}${{ secrets.OTHER_TA_REQUIRED_CONFIGS }} ${{ env.TEST_TYPE }} test report |$total_tests |$passed |$failures |$errors |${{steps.test_report.outputs.url_html}}" > summary.txt - name: Upload-${{ matrix.splunk.version }}-${{ matrix.sc4s.version }}-${{ env.TEST_TYPE }} uses: actions/upload-artifact@v4 + if: ${{ !cancelled() }} with: name: summary-ko-${{ matrix.splunk.version }}-${{ secrets.OTHER_TA_REQUIRED_CONFIGS }} path: summary.txt @@ -1247,7 +1244,7 @@ jobs: path: | ${{ needs.setup.outputs.directory-path }}/diag* - knowledge-tests-report-summary: + knowledge-tests-report: needs: run-knowledge-tests runs-on: ubuntu-latest if: success() || failure() @@ -1723,6 +1720,7 @@ jobs: reporter: java-junit - name: Parse JUnit XML id: parse-junit + if: ${{ !cancelled() }} run: | apt-get install -y libxml2-utils || true junit_xml_path="${{ needs.setup.outputs.directory-path }}/test-results/*.xml" @@ -1732,11 +1730,12 @@ jobs: errors=$(xmllint --xpath 'sum(//testsuite/@errors)' $junit_xml_path) skipped=$(xmllint --xpath 'sum(//testsuite/@skipped)' $junit_xml_path) passed=$((total_tests - failures - errors - skipped)) - echo "splunk ${{ matrix.splunk.version }}${{ secrets.OTHER_TA_REQUIRED_CONFIGS }} ${{ env.TEST_TYPE }} ${{ matrix.browser }} ${{ matrix.vendor-version.image }} test report |$total_tests |$passed |$failures |$errors |${{steps.test_report.outputs.url_html}}" > summary.txt + echo "splunk ${{ matrix.splunk.version }}${{ secrets.OTHER_TA_REQUIRED_CONFIGS }} ${{ matrix.browser }} ${{ matrix.vendor-version.image }} ${{ matrix.marker }} test report |$total_tests |$passed |$failures |$errors |${{steps.test_report.outputs.url_html}}" > summary.txt - name: Upload-artifact-for-github-summary uses: actions/upload-artifact@v4 + if: ${{ !cancelled() }} with: - name: summary-ui-${{ matrix.splunk.version }}-${{ secrets.OTHER_TA_REQUIRED_CONFIGS }}-${{ env.TEST_TYPE }}-${{ matrix.browser }}-${{ matrix.vendor-version.image }}-test-artifact + name: summary-ui-${{ matrix.splunk.version }}-${{ secrets.OTHER_TA_REQUIRED_CONFIGS }}-${{ matrix.browser }}-${{ matrix.vendor-version.image }}-${{ matrix.marker }}-artifact path: summary.txt - name: pull diag from s3 bucket if: ${{ failure() && steps.test_report.outputs.conclusion == 'failure' }} @@ -1750,7 +1749,7 @@ jobs: path: | ${{ needs.setup.outputs.directory-path }}/diag* - UI-tests-report-summary: + UI-tests-report: needs: run-ui-tests runs-on: ubuntu-latest if: success() || failure() @@ -1988,6 +1987,7 @@ jobs: reporter: java-junit - name: Parse JUnit XML id: parse-junit + if: ${{ !cancelled() }} run: | apt-get install -y libxml2-utils || true junit_xml_path="${{ needs.setup.outputs.directory-path }}/test-results/*.xml" @@ -1997,11 +1997,12 @@ jobs: errors=$(xmllint --xpath 'sum(//testsuite/@errors)' $junit_xml_path) skipped=$(xmllint --xpath 'sum(//testsuite/@skipped)' $junit_xml_path) passed=$((total_tests - failures - errors - skipped)) - echo "splunk ${{ matrix.splunk.version }}${{ secrets.OTHER_TA_REQUIRED_CONFIGS }} ${{ env.TEST_TYPE }} ${{ matrix.vendor-version.image }} test report |$total_tests |$passed |$failures |$errors |${{steps.test_report.outputs.url_html}}" > summary.txt - - name: Upload-${{ matrix.splunk.version }}-${{ matrix.sc4s.version }}-${{ env.TEST_TYPE }} + echo "splunk ${{ matrix.splunk.version }}${{ secrets.OTHER_TA_REQUIRED_CONFIGS }} ${{ matrix.marker }} ${{ matrix.vendor-version.image }} test report |$total_tests |$passed |$failures |$errors |${{steps.test_report.outputs.url_html}}" > summary.txt + - name: Upload-artifact-for-github-summary uses: actions/upload-artifact@v4 + if: ${{ !cancelled() }} with: - name: summary-modinput-${{ matrix.splunk.version }}-${{ secrets.OTHER_TA_REQUIRED_CONFIGS }}-${{ env.TEST_TYPE }}-${{ matrix.vendor-version.image }}-artifact + name: summary-modinput-${{ matrix.splunk.version }}-${{ secrets.OTHER_TA_REQUIRED_CONFIGS }}-${{ matrix.vendor-version.image }}-${{ matrix.marker }}-artifact path: summary.txt - name: pull diag from s3 bucket if: ${{ failure() && steps.test_report.outputs.conclusion == 'failure' }} @@ -2015,7 +2016,7 @@ jobs: path: | ${{ needs.setup.outputs.directory-path }}/diag* - Modinput-tests-report-summary: + Modinput-tests-report: needs: run-modinput-tests runs-on: ubuntu-latest if: success() || failure() From 54195cba6aee894bc8abb84b577b9ef9dc5a8913 Mon Sep 17 00:00:00 2001 From: Harshil Gajera Date: Thu, 22 Aug 2024 15:40:46 +0530 Subject: [PATCH 64/73] ci: updating workflow --- .../workflows/reusable-build-test-release.yml | 99 +++++++++++-------- 1 file changed, 58 insertions(+), 41 deletions(-) diff --git a/.github/workflows/reusable-build-test-release.yml b/.github/workflows/reusable-build-test-release.yml index 989e39c52..4cd65e8e9 100644 --- a/.github/workflows/reusable-build-test-release.yml +++ b/.github/workflows/reusable-build-test-release.yml @@ -205,7 +205,7 @@ jobs: echo "## Summary of Versions Used" >> $GITHUB_STEP_SUMMARY echo "- **Splunk versions used:** (${splunk_version_list})" >> $GITHUB_STEP_SUMMARY echo "- **SC4S versions used:** (${sc4s_version_list})" >> $GITHUB_STEP_SUMMARY - echo "Browser: Chrome" >> $GITHUB_STEP_SUMMARY + echo "- Browser: Chrome" >> $GITHUB_STEP_SUMMARY fossa-scan: runs-on: ubuntu-latest @@ -1214,18 +1214,16 @@ jobs: path: "${{ needs.setup.outputs.directory-path }}/test-results/*.xml" reporter: java-junit - name: Parse JUnit XML - id: parse-junit if: ${{ !cancelled() }} run: | - apt-get install -y libxml2-utils || true + apt-get install -y libxml2-utils junit_xml_path="${{ needs.setup.outputs.directory-path }}/test-results/*.xml" - ls ${{ needs.setup.outputs.directory-path }}/test-results/ total_tests=$(xmllint --xpath 'sum(//testsuite/@tests)' $junit_xml_path) failures=$(xmllint --xpath 'sum(//testsuite/@failures)' $junit_xml_path) errors=$(xmllint --xpath 'sum(//testsuite/@errors)' $junit_xml_path) skipped=$(xmllint --xpath 'sum(//testsuite/@skipped)' $junit_xml_path) passed=$((total_tests - failures - errors - skipped)) - echo "splunk ${{ matrix.splunk.version }}${{ secrets.OTHER_TA_REQUIRED_CONFIGS }} ${{ env.TEST_TYPE }} test report |$total_tests |$passed |$failures |$errors |${{steps.test_report.outputs.url_html}}" > summary.txt + echo "splunk ${{ matrix.splunk.version }}${{ secrets.OTHER_TA_REQUIRED_CONFIGS }} ${{ env.TEST_TYPE }} |$total_tests |$passed |$failures |$errors |${{steps.test_report.outputs.url_html}}" > summary.txt - name: Upload-${{ matrix.splunk.version }}-${{ matrix.sc4s.version }}-${{ env.TEST_TYPE }} uses: actions/upload-artifact@v4 if: ${{ !cancelled() }} @@ -1255,7 +1253,6 @@ jobs: pattern: summary-ko* - name: Combine summaries into a table run: | - ls -al echo "| Job | Total Tests | Passed | Failed | errors | Report Link" >> $GITHUB_STEP_SUMMARY echo "| ---------- | ----------- | ------ | ------ | ------ | ------ |" >> $GITHUB_STEP_SUMMARY for file in summary-ko*/summary.txt; do @@ -1461,29 +1458,23 @@ jobs: name: splunk ${{ matrix.splunk.version }} ${{ env.TEST_TYPE }} test report path: "${{ needs.setup.outputs.directory-path }}/test-results/*.xml" reporter: java-junit - - name: Job summary + - name: Parse JUnit XML if: ${{ !cancelled() }} run: | - apt-get install -y libxml2-utils || true + apt-get install -y libxml2-utils junit_xml_path="${{ needs.setup.outputs.directory-path }}/test-results/*.xml" - ls ${{ needs.setup.outputs.directory-path }}/test-results/ total_tests=$(xmllint --xpath 'sum(//testsuite/@tests)' $junit_xml_path) failures=$(xmllint --xpath 'sum(//testsuite/@failures)' $junit_xml_path) errors=$(xmllint --xpath 'sum(//testsuite/@errors)' $junit_xml_path) skipped=$(xmllint --xpath 'sum(//testsuite/@skipped)' $junit_xml_path) passed=$((total_tests - failures - errors - skipped)) - - # Check for failures or errors - if [ "$failures" -gt 0 ] || [ "$errors" -gt 0 ]; then - echo "## Summary for splunk ${{ matrix.splunk.version }}${{ secrets.OTHER_TA_REQUIRED_CONFIGS }} ${{ env.TEST_TYPE }} test report" >> $GITHUB_STEP_SUMMARY - echo "| Total Tests | Passed Tests | Failed Tests | Errored Tests | Skipped Tests |" >> $GITHUB_STEP_SUMMARY - echo "| ----------- | ------------ | ------------ | ------------- | ------------- |" >> $GITHUB_STEP_SUMMARY - echo "| $total_tests | $passed | $failures | $errors | $skipped |" >> $GITHUB_STEP_SUMMARY - echo "### Link to html test report: ${{steps.test_report.outputs.url_html}}" >> $GITHUB_STEP_SUMMARY - - else - echo "All tests passed successfully. No failures or errors to report." - fi + echo "splunk ${{ matrix.splunk.version }}${{ secrets.OTHER_TA_REQUIRED_CONFIGS }} ${{ env.TEST_TYPE }} |$total_tests |$passed |$failures |$errors |${{steps.test_report.outputs.url_html}}" > summary.txt + - name: Upload-${{ matrix.splunk.version }}-${{ matrix.sc4s.version }}-${{ env.TEST_TYPE }} + uses: actions/upload-artifact@v4 + if: ${{ !cancelled() }} + with: + name: summary-scripted-input-${{ matrix.splunk.version }}-${{ secrets.OTHER_TA_REQUIRED_CONFIGS }} + path: summary.txt - name: pull diag from s3 bucket if: ${{ failure() && steps.test_report.outputs.conclusion == 'failure' }} @@ -1497,6 +1488,23 @@ jobs: path: | ${{ needs.setup.outputs.directory-path }}/diag* + Scripted-input-tests-report: + needs: run-knowledge-tests + runs-on: ubuntu-latest + if: success() || failure() + steps: + - name: Download all summaries + uses: actions/download-artifact@v4 + with: + pattern: summary-requirement* + - name: Combine summaries into a table + run: | + echo "| Job | Total Tests | Passed | Failed | errors | Report Link" >> $GITHUB_STEP_SUMMARY + echo "| ---------- | ----------- | ------ | ------ | ------ | ------ |" >> $GITHUB_STEP_SUMMARY + for file in summary-requirement*/summary.txt; do + cat "$file" >> $GITHUB_STEP_SUMMARY + done + run-ui-tests: if: ${{ !cancelled() && needs.build.result == 'success' && needs.test-inventory.outputs.ui == 'true' && needs.setup-workflow.outputs.execute-ui-labeled == 'true' }} needs: @@ -1719,18 +1727,16 @@ jobs: path: "${{ needs.setup.outputs.directory-path }}/test-results/*.xml" reporter: java-junit - name: Parse JUnit XML - id: parse-junit if: ${{ !cancelled() }} run: | - apt-get install -y libxml2-utils || true + apt-get install -y libxml2-utils junit_xml_path="${{ needs.setup.outputs.directory-path }}/test-results/*.xml" - ls ${{ needs.setup.outputs.directory-path }}/test-results/ total_tests=$(xmllint --xpath 'sum(//testsuite/@tests)' $junit_xml_path) failures=$(xmllint --xpath 'sum(//testsuite/@failures)' $junit_xml_path) errors=$(xmllint --xpath 'sum(//testsuite/@errors)' $junit_xml_path) skipped=$(xmllint --xpath 'sum(//testsuite/@skipped)' $junit_xml_path) passed=$((total_tests - failures - errors - skipped)) - echo "splunk ${{ matrix.splunk.version }}${{ secrets.OTHER_TA_REQUIRED_CONFIGS }} ${{ matrix.browser }} ${{ matrix.vendor-version.image }} ${{ matrix.marker }} test report |$total_tests |$passed |$failures |$errors |${{steps.test_report.outputs.url_html}}" > summary.txt + echo "splunk ${{ matrix.splunk.version }}${{ secrets.OTHER_TA_REQUIRED_CONFIGS }} ${{ matrix.browser }} ${{ matrix.vendor-version.image }} ${{ matrix.marker }} |$total_tests |$passed |$failures |$errors |${{steps.test_report.outputs.url_html}}" > summary.txt - name: Upload-artifact-for-github-summary uses: actions/upload-artifact@v4 if: ${{ !cancelled() }} @@ -1986,12 +1992,10 @@ jobs: path: "${{ needs.setup.outputs.directory-path }}/test-results/*.xml" reporter: java-junit - name: Parse JUnit XML - id: parse-junit if: ${{ !cancelled() }} run: | - apt-get install -y libxml2-utils || true + apt-get install -y libxml2-utils junit_xml_path="${{ needs.setup.outputs.directory-path }}/test-results/*.xml" - ls ${{ needs.setup.outputs.directory-path }}/test-results/ total_tests=$(xmllint --xpath 'sum(//testsuite/@tests)' $junit_xml_path) failures=$(xmllint --xpath 'sum(//testsuite/@failures)' $junit_xml_path) errors=$(xmllint --xpath 'sum(//testsuite/@errors)' $junit_xml_path) @@ -2246,27 +2250,23 @@ jobs: name: splunk ${{ matrix.splunk.version }}${{ secrets.OTHER_TA_REQUIRED_CONFIGS }} ${{ env.TEST_TYPE }} ${{ matrix.vendor-version.image }} ${{ steps.os-name-version.outputs.os-name }} ${{ steps.os-name-version.outputs.os-version }} test report path: "${{ needs.setup.outputs.directory-path }}/test-results/*.xml" reporter: java-junit - - name: Job summary + - name: Parse JUnit XML if: ${{ !cancelled() }} run: | - apt-get install -y libxml2-utils || true + apt-get install -y libxml2-utils junit_xml_path="${{ needs.setup.outputs.directory-path }}/test-results/*.xml" total_tests=$(xmllint --xpath 'sum(//testsuite/@tests)' $junit_xml_path) failures=$(xmllint --xpath 'sum(//testsuite/@failures)' $junit_xml_path) errors=$(xmllint --xpath 'sum(//testsuite/@errors)' $junit_xml_path) skipped=$(xmllint --xpath 'sum(//testsuite/@skipped)' $junit_xml_path) passed=$((total_tests - failures - errors - skipped)) - - # Check for failures or errors - if [ "$failures" -gt 0 ] || [ "$errors" -gt 0 ]; then - echo "## Summary for splunk ${{ matrix.splunk.version }}${{ secrets.OTHER_TA_REQUIRED_CONFIGS }} ${{ env.TEST_TYPE }} test report" >> $GITHUB_STEP_SUMMARY - echo "| Total Tests | Passed Tests | Failed Tests | Errored Tests | Skipped Tests |" >> $GITHUB_STEP_SUMMARY - echo "| ----------- | ------------ | ------------ | ------------- | ------------- |" >> $GITHUB_STEP_SUMMARY - echo "| $total_tests | $passed | $failures | $errors | $skipped |" >> $GITHUB_STEP_SUMMARY - echo "### Link to html test report: ${{steps.test_report.outputs.url_html}}" >> $GITHUB_STEP_SUMMARY - else - echo "All tests passed successfully. No failures or errors to report." - fi + echo "splunk ${{ matrix.splunk.version }}${{ secrets.OTHER_TA_REQUIRED_CONFIGS }} ${{ env.TEST_TYPE }} |$total_tests |$passed |$failures |$errors |${{steps.test_report.outputs.url_html}}" > summary.txt + - name: Upload-${{ matrix.splunk.version }}-${{ matrix.sc4s.version }}-${{ env.TEST_TYPE }} + uses: actions/upload-artifact@v4 + if: ${{ !cancelled() }} + with: + name: summary-ko-${{ matrix.splunk.version }}-${{ secrets.OTHER_TA_REQUIRED_CONFIGS }} + path: summary.txt - name: pull diag from s3 bucket if: ${{ failure() && steps.test_report.outputs.conclusion == 'failure' }} run: | @@ -2279,6 +2279,23 @@ jobs: path: | ${{ needs.setup.outputs.directory-path }}/diag* + scripted-input-tests-report: + needs: run-knowledge-tests + runs-on: ubuntu-latest + if: success() || failure() + steps: + - name: Download all summaries + uses: actions/download-artifact@v4 + with: + pattern: summary-scripted-* + - name: Combine summaries into a table + run: | + echo "| Job | Total Tests | Passed | Failed | errors | Report Link" >> $GITHUB_STEP_SUMMARY + echo "| ---------- | ----------- | ------ | ------ | ------ | ------ |" >> $GITHUB_STEP_SUMMARY + for file in summary-ko*/summary.txt; do + cat "$file" >> $GITHUB_STEP_SUMMARY + done + pre-publish: if: ${{ !cancelled() }} # The following line will rename 'pre-publish' to 'pre-publish-not_main_pr' when PR is created towards main branch From 8e3a09b7770762741304b900274d1fc506fdc25e Mon Sep 17 00:00:00 2001 From: Harshil Gajera Date: Thu, 22 Aug 2024 15:43:03 +0530 Subject: [PATCH 65/73] ci: updating workflow --- .github/workflows/reusable-build-test-release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/reusable-build-test-release.yml b/.github/workflows/reusable-build-test-release.yml index 4cd65e8e9..7b15dbc92 100644 --- a/.github/workflows/reusable-build-test-release.yml +++ b/.github/workflows/reusable-build-test-release.yml @@ -1488,7 +1488,7 @@ jobs: path: | ${{ needs.setup.outputs.directory-path }}/diag* - Scripted-input-tests-report: + Requirement-input-tests-report: needs: run-knowledge-tests runs-on: ubuntu-latest if: success() || failure() From 7e924802669e2a34132689685bc13a071f9d59e1 Mon Sep 17 00:00:00 2001 From: Harshil Gajera Date: Thu, 22 Aug 2024 18:05:32 +0530 Subject: [PATCH 66/73] ci: add dependency --- .../workflows/reusable-build-test-release.yml | 32 +++++++++---------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/.github/workflows/reusable-build-test-release.yml b/.github/workflows/reusable-build-test-release.yml index 7b15dbc92..2668427d9 100644 --- a/.github/workflows/reusable-build-test-release.yml +++ b/.github/workflows/reusable-build-test-release.yml @@ -73,7 +73,7 @@ on: permissions: contents: read packages: read -concurrency: +concurrency: group: ${{ github.head_ref || github.run_id }} cancel-in-progress: true jobs: @@ -303,7 +303,7 @@ jobs: with: extra_args: -x .github/workflows/exclude-patterns.txt --json --only-verified version: 3.77.0 - + semgrep: runs-on: ubuntu-latest name: security-sast-semgrep @@ -378,7 +378,7 @@ jobs: matrix: python-version: - "3.7" - permissions: + permissions: actions: read deployments: read contents: read @@ -422,7 +422,7 @@ jobs: skipped=$(xmllint --xpath 'sum(//testsuite/@skipped)' $junit_xml_path) passed=$((total_tests - failures - errors - skipped)) - echo "| Total Tests | Passed Tests | Failed Tests | Errored Tests | Skipped Tests |" >> $GITHUB_STEP_SUMMARY + echo "| Total Tests | Passed | Failed | Errors | Skipped |" >> $GITHUB_STEP_SUMMARY echo "| ----------- | ------------ | ------------ | ------------- | ------------- |" >> $GITHUB_STEP_SUMMARY echo "| $total_tests | $passed | $failures | $errors | $skipped |" >> $GITHUB_STEP_SUMMARY - uses: actions/upload-artifact@v4 @@ -442,7 +442,7 @@ jobs: matrix: python-version: - "3.9" - permissions: + permissions: actions: read deployments: read contents: read @@ -795,7 +795,7 @@ jobs: - build - test-inventory if: ${{ !cancelled() && needs.build.result == 'success' && needs.test-inventory.outputs.requirement_test == 'true' }} - permissions: + permissions: actions: read deployments: read contents: read @@ -1019,7 +1019,7 @@ jobs: SPLUNK_VERSION_BASE: ${{ matrix.splunk.version }}${{ secrets.OTHER_TA_REQUIRED_CONFIGS }} TEST_TYPE: "knowledge" TEST_ARGS: "" - permissions: + permissions: actions: read deployments: read contents: read @@ -1253,7 +1253,7 @@ jobs: pattern: summary-ko* - name: Combine summaries into a table run: | - echo "| Job | Total Tests | Passed | Failed | errors | Report Link" >> $GITHUB_STEP_SUMMARY + echo "| Job | Total Tests | Passed | Failed | Errors | Report Link" >> $GITHUB_STEP_SUMMARY echo "| ---------- | ----------- | ------ | ------ | ------ | ------ |" >> $GITHUB_STEP_SUMMARY for file in summary-ko*/summary.txt; do cat "$file" >> $GITHUB_STEP_SUMMARY @@ -1284,7 +1284,7 @@ jobs: ARGO_NAMESPACE: ${{ needs.setup.outputs.argo-namespace }} TEST_TYPE: "requirement_test" TEST_ARGS: "" - permissions: + permissions: actions: read deployments: read contents: read @@ -1489,9 +1489,9 @@ jobs: ${{ needs.setup.outputs.directory-path }}/diag* Requirement-input-tests-report: - needs: run-knowledge-tests + needs: run-requirement-tests runs-on: ubuntu-latest - if: success() || failure() + if: ${{ !cancelled() }} steps: - name: Download all summaries uses: actions/download-artifact@v4 @@ -1758,7 +1758,7 @@ jobs: UI-tests-report: needs: run-ui-tests runs-on: ubuntu-latest - if: success() || failure() + if: ${{ !cancelled() }} steps: - name: Download all summaries uses: actions/download-artifact@v4 @@ -2001,7 +2001,7 @@ jobs: errors=$(xmllint --xpath 'sum(//testsuite/@errors)' $junit_xml_path) skipped=$(xmllint --xpath 'sum(//testsuite/@skipped)' $junit_xml_path) passed=$((total_tests - failures - errors - skipped)) - echo "splunk ${{ matrix.splunk.version }}${{ secrets.OTHER_TA_REQUIRED_CONFIGS }} ${{ matrix.marker }} ${{ matrix.vendor-version.image }} test report |$total_tests |$passed |$failures |$errors |${{steps.test_report.outputs.url_html}}" > summary.txt + echo "splunk ${{ matrix.splunk.version }}${{ secrets.OTHER_TA_REQUIRED_CONFIGS }} ${{ matrix.marker }} ${{ matrix.vendor-version.image }} |$total_tests |$passed |$failures |$errors |${{steps.test_report.outputs.url_html}}" > summary.txt - name: Upload-artifact-for-github-summary uses: actions/upload-artifact@v4 if: ${{ !cancelled() }} @@ -2023,7 +2023,7 @@ jobs: Modinput-tests-report: needs: run-modinput-tests runs-on: ubuntu-latest - if: success() || failure() + if: ${{ !cancelled() }} steps: - name: Download all summaries uses: actions/download-artifact@v4 @@ -2061,7 +2061,7 @@ jobs: ARGO_NAMESPACE: ${{ needs.setup.outputs.argo-namespace }} SPLUNK_VERSION_BASE: ${{ matrix.splunk.version }}${{ secrets.OTHER_TA_REQUIRED_CONFIGS }} TEST_TYPE: "scripted_inputs" - permissions: + permissions: actions: read deployments: read contents: read @@ -2280,7 +2280,7 @@ jobs: ${{ needs.setup.outputs.directory-path }}/diag* scripted-input-tests-report: - needs: run-knowledge-tests + needs: run-scripted-input-tests-full-matrix runs-on: ubuntu-latest if: success() || failure() steps: From 0825d9ff55e701717d0cecbcaf246b8f9516dccf Mon Sep 17 00:00:00 2001 From: Harshil Gajera Date: Thu, 22 Aug 2024 18:22:43 +0530 Subject: [PATCH 67/73] ci: add dependency --- .github/workflows/reusable-build-test-release.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/reusable-build-test-release.yml b/.github/workflows/reusable-build-test-release.yml index 2668427d9..da998dab6 100644 --- a/.github/workflows/reusable-build-test-release.yml +++ b/.github/workflows/reusable-build-test-release.yml @@ -1491,7 +1491,7 @@ jobs: Requirement-input-tests-report: needs: run-requirement-tests runs-on: ubuntu-latest - if: ${{ !cancelled() }} + if: success() || failure() steps: - name: Download all summaries uses: actions/download-artifact@v4 @@ -1758,7 +1758,7 @@ jobs: UI-tests-report: needs: run-ui-tests runs-on: ubuntu-latest - if: ${{ !cancelled() }} + if: success() || failure() steps: - name: Download all summaries uses: actions/download-artifact@v4 @@ -2023,7 +2023,7 @@ jobs: Modinput-tests-report: needs: run-modinput-tests runs-on: ubuntu-latest - if: ${{ !cancelled() }} + if: success() || failure() steps: - name: Download all summaries uses: actions/download-artifact@v4 From cc711066c4c2eecddce0c36f934a77b3dd1203ec Mon Sep 17 00:00:00 2001 From: Harshil Gajera Date: Tue, 27 Aug 2024 10:46:38 +0530 Subject: [PATCH 68/73] ci: updating workflow --- .../workflows/reusable-build-test-release.yml | 49 +++++-------------- 1 file changed, 13 insertions(+), 36 deletions(-) diff --git a/.github/workflows/reusable-build-test-release.yml b/.github/workflows/reusable-build-test-release.yml index da998dab6..099b20726 100644 --- a/.github/workflows/reusable-build-test-release.yml +++ b/.github/workflows/reusable-build-test-release.yml @@ -343,29 +343,6 @@ jobs: ucc_modinput_tests="false" fi echo "ucc_modinput_tests=$ucc_modinput_tests" >> "$GITHUB_OUTPUT" - - name: job summary - run: | - echo "| Test-Types to be executed |" >> $GITHUB_STEP_SUMMARY - echo "| ------------- |" >> $GITHUB_STEP_SUMMARY - if ${{ steps.testset.outputs.unit == 'true' }}; then - echo "| Unit-python3.7 |" >> $GITHUB_STEP_SUMMARY - echo "| Unit-python3.9 |" >> $GITHUB_STEP_SUMMARY - fi - if ${{ steps.testset.outputs.knowledge == 'true' }}; then - echo "| Knowledge |" >> $GITHUB_STEP_SUMMARY - fi - if ${{ steps.testset.outputs.ui == 'true' }}; then - echo "| UI |" >> $GITHUB_STEP_SUMMARY - fi - if ${{ steps.testset.outputs.modinput_functional == 'true' }}; then - echo "| Modinput |" >> $GITHUB_STEP_SUMMARY - fi - if ${{ steps.testset.outputs.scripted_inputs == 'true' }}; then - echo "| Scripted Input |" >> $GITHUB_STEP_SUMMARY - fi - if ${{ steps.testset.outputs.requirement_test == 'true' }}; then - echo "| Requirement |" >> $GITHUB_STEP_SUMMARY - fi run-unit-tests: name: test-unit-python3-${{ matrix.python-version }} @@ -1223,7 +1200,7 @@ jobs: errors=$(xmllint --xpath 'sum(//testsuite/@errors)' $junit_xml_path) skipped=$(xmllint --xpath 'sum(//testsuite/@skipped)' $junit_xml_path) passed=$((total_tests - failures - errors - skipped)) - echo "splunk ${{ matrix.splunk.version }}${{ secrets.OTHER_TA_REQUIRED_CONFIGS }} ${{ env.TEST_TYPE }} |$total_tests |$passed |$failures |$errors |${{steps.test_report.outputs.url_html}}" > summary.txt + echo "splunk ${{ matrix.splunk.version }}${{ secrets.OTHER_TA_REQUIRED_CONFIGS }} ${{ env.TEST_TYPE }} |$total_tests |$passed |$failures |$errors | $skipped |${{steps.test_report.outputs.url_html}}" > summary.txt - name: Upload-${{ matrix.splunk.version }}-${{ matrix.sc4s.version }}-${{ env.TEST_TYPE }} uses: actions/upload-artifact@v4 if: ${{ !cancelled() }} @@ -1253,8 +1230,8 @@ jobs: pattern: summary-ko* - name: Combine summaries into a table run: | - echo "| Job | Total Tests | Passed | Failed | Errors | Report Link" >> $GITHUB_STEP_SUMMARY - echo "| ---------- | ----------- | ------ | ------ | ------ | ------ |" >> $GITHUB_STEP_SUMMARY + echo "| Job | Total Tests | Passed | Failed | Errors| Skipped | Report Link" >> $GITHUB_STEP_SUMMARY + echo "| ---------- | ----------- | ------ | ------ | ------ | ------- | ------ |" >> $GITHUB_STEP_SUMMARY for file in summary-ko*/summary.txt; do cat "$file" >> $GITHUB_STEP_SUMMARY done @@ -1468,7 +1445,7 @@ jobs: errors=$(xmllint --xpath 'sum(//testsuite/@errors)' $junit_xml_path) skipped=$(xmllint --xpath 'sum(//testsuite/@skipped)' $junit_xml_path) passed=$((total_tests - failures - errors - skipped)) - echo "splunk ${{ matrix.splunk.version }}${{ secrets.OTHER_TA_REQUIRED_CONFIGS }} ${{ env.TEST_TYPE }} |$total_tests |$passed |$failures |$errors |${{steps.test_report.outputs.url_html}}" > summary.txt + echo "splunk ${{ matrix.splunk.version }}${{ secrets.OTHER_TA_REQUIRED_CONFIGS }} ${{ env.TEST_TYPE }} |$total_tests |$passed |$failures |$errors |$skipped |${{steps.test_report.outputs.url_html}}" > summary.txt - name: Upload-${{ matrix.splunk.version }}-${{ matrix.sc4s.version }}-${{ env.TEST_TYPE }} uses: actions/upload-artifact@v4 if: ${{ !cancelled() }} @@ -1499,8 +1476,8 @@ jobs: pattern: summary-requirement* - name: Combine summaries into a table run: | - echo "| Job | Total Tests | Passed | Failed | errors | Report Link" >> $GITHUB_STEP_SUMMARY - echo "| ---------- | ----------- | ------ | ------ | ------ | ------ |" >> $GITHUB_STEP_SUMMARY + echo "| Job | Total Tests | Passed | Failed | Errors| Skipped | Report Link" >> $GITHUB_STEP_SUMMARY + echo "| ---------- | ----------- | ------ | ------ | ------ | ------- | ------ |" >> $GITHUB_STEP_SUMMARY for file in summary-requirement*/summary.txt; do cat "$file" >> $GITHUB_STEP_SUMMARY done @@ -1766,8 +1743,8 @@ jobs: pattern: summary-ui* - name: Combine summaries into a table run: | - echo "| Job | Total Tests | Passed | Failed | errors | Report Link" >> $GITHUB_STEP_SUMMARY - echo "| ---------- | ----------- | ------ | ------ | ------ | ----- |" >> $GITHUB_STEP_SUMMARY + echo "| Job | Total Tests | Passed | Failed | Errors| Skipped | Report Link" >> $GITHUB_STEP_SUMMARY + echo "| ---------- | ----------- | ------ | ------ | ------ | ------- | ------ |" >> $GITHUB_STEP_SUMMARY for file in summary-ui-*/summary.txt; do cat "$file" >> $GITHUB_STEP_SUMMARY done @@ -2001,7 +1978,7 @@ jobs: errors=$(xmllint --xpath 'sum(//testsuite/@errors)' $junit_xml_path) skipped=$(xmllint --xpath 'sum(//testsuite/@skipped)' $junit_xml_path) passed=$((total_tests - failures - errors - skipped)) - echo "splunk ${{ matrix.splunk.version }}${{ secrets.OTHER_TA_REQUIRED_CONFIGS }} ${{ matrix.marker }} ${{ matrix.vendor-version.image }} |$total_tests |$passed |$failures |$errors |${{steps.test_report.outputs.url_html}}" > summary.txt + echo "splunk ${{ matrix.splunk.version }}${{ secrets.OTHER_TA_REQUIRED_CONFIGS }} ${{ matrix.marker }} ${{ matrix.vendor-version.image }} |$total_tests |$passed |$failures |$errors | $skipped |${{steps.test_report.outputs.url_html}}" > summary.txt - name: Upload-artifact-for-github-summary uses: actions/upload-artifact@v4 if: ${{ !cancelled() }} @@ -2031,8 +2008,8 @@ jobs: pattern: summary-modinput* - name: Combine summaries into a table run: | - echo "| Job | Total Tests | Passed | Failed | Errors| Report Link" >> $GITHUB_STEP_SUMMARY - echo "| ---------- | ----------- | ------ | ------ | ------ | ------ |" >> $GITHUB_STEP_SUMMARY + echo "| Job | Total Tests | Passed | Failed | Errors| Skipped | Report Link" >> $GITHUB_STEP_SUMMARY + echo "| ---------- | ----------- | ------ | ------ | ------ | ------- | ------ |" >> $GITHUB_STEP_SUMMARY for file in summary-modinput-*/summary.txt; do cat "$file" >> $GITHUB_STEP_SUMMARY done @@ -2290,8 +2267,8 @@ jobs: pattern: summary-scripted-* - name: Combine summaries into a table run: | - echo "| Job | Total Tests | Passed | Failed | errors | Report Link" >> $GITHUB_STEP_SUMMARY - echo "| ---------- | ----------- | ------ | ------ | ------ | ------ |" >> $GITHUB_STEP_SUMMARY + echo "| Job | Total Tests | Passed | Failed | Errors| Skipped | Report Link" >> $GITHUB_STEP_SUMMARY + echo "| ---------- | ----------- | ------ | ------ | ------ | ------- | ------ |" >> $GITHUB_STEP_SUMMARY for file in summary-ko*/summary.txt; do cat "$file" >> $GITHUB_STEP_SUMMARY done From c398670306d3c11eb0dd7beb41043ca191ad5f3a Mon Sep 17 00:00:00 2001 From: Harshil Gajera Date: Wed, 28 Aug 2024 11:48:36 +0530 Subject: [PATCH 69/73] ci: reverting debug changes --- .github/workflows/build-test-release.yaml | 7 ------- .github/workflows/reusable-build-test-release.yml | 2 +- 2 files changed, 1 insertion(+), 8 deletions(-) diff --git a/.github/workflows/build-test-release.yaml b/.github/workflows/build-test-release.yaml index c217127dd..951c557f3 100644 --- a/.github/workflows/build-test-release.yaml +++ b/.github/workflows/build-test-release.yaml @@ -23,13 +23,6 @@ jobs: - uses: apache/skywalking-eyes@v0.6.0 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - name: job summary - run: | - echo "| First Header | Second Header |" >> $GITHUB_STEP_SUMMARY - echo "| ------------- | ------------- |" >> $GITHUB_STEP_SUMMARY - echo "| Content Cell | Content Cell |" >> $GITHUB_STEP_SUMMARY -#| Content Cell | Content Cell | - pre-commit: diff --git a/.github/workflows/reusable-build-test-release.yml b/.github/workflows/reusable-build-test-release.yml index 099b20726..dd489fea7 100644 --- a/.github/workflows/reusable-build-test-release.yml +++ b/.github/workflows/reusable-build-test-release.yml @@ -1713,7 +1713,7 @@ jobs: errors=$(xmllint --xpath 'sum(//testsuite/@errors)' $junit_xml_path) skipped=$(xmllint --xpath 'sum(//testsuite/@skipped)' $junit_xml_path) passed=$((total_tests - failures - errors - skipped)) - echo "splunk ${{ matrix.splunk.version }}${{ secrets.OTHER_TA_REQUIRED_CONFIGS }} ${{ matrix.browser }} ${{ matrix.vendor-version.image }} ${{ matrix.marker }} |$total_tests |$passed |$failures |$errors |${{steps.test_report.outputs.url_html}}" > summary.txt + echo "splunk ${{ matrix.splunk.version }}${{ secrets.OTHER_TA_REQUIRED_CONFIGS }} ${{ matrix.browser }} ${{ matrix.vendor-version.image }} ${{ matrix.marker }} |$total_tests |$passed |$failures |$errors |$skipped |${{steps.test_report.outputs.url_html}}" > summary.txt - name: Upload-artifact-for-github-summary uses: actions/upload-artifact@v4 if: ${{ !cancelled() }} From c62bf727650a66f61b5a04d90e203a497254fc66 Mon Sep 17 00:00:00 2001 From: Harshil Gajera Date: Wed, 28 Aug 2024 12:34:10 +0530 Subject: [PATCH 70/73] ci: lint changes --- .github/workflows/build-test-release.yaml | 1 - .github/workflows/reusable-build-test-release.yml | 1 - 2 files changed, 2 deletions(-) diff --git a/.github/workflows/build-test-release.yaml b/.github/workflows/build-test-release.yaml index 951c557f3..ddc75c4bd 100644 --- a/.github/workflows/build-test-release.yaml +++ b/.github/workflows/build-test-release.yaml @@ -24,7 +24,6 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - pre-commit: runs-on: ubuntu-latest steps: diff --git a/.github/workflows/reusable-build-test-release.yml b/.github/workflows/reusable-build-test-release.yml index eab95726b..61463f8b9 100644 --- a/.github/workflows/reusable-build-test-release.yml +++ b/.github/workflows/reusable-build-test-release.yml @@ -205,7 +205,6 @@ jobs: echo "$test_type""_labeled: ${EXECUTE_LABELED["$test_type"]}" done - validate-pr-title: name: Validate PR title if: github.event_name == 'pull_request' From 6c4c03c91822f8c129a8bb0628e30d63b1a7f454 Mon Sep 17 00:00:00 2001 From: Harshil Gajera Date: Thu, 29 Aug 2024 11:56:24 +0530 Subject: [PATCH 71/73] revert: testing ci workfloe --- .github/workflows/build-test-release.yaml | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build-test-release.yaml b/.github/workflows/build-test-release.yaml index ddc75c4bd..8eaa33f0e 100644 --- a/.github/workflows/build-test-release.yaml +++ b/.github/workflows/build-test-release.yaml @@ -24,7 +24,16 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + test-skip: + if: false + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + pre-commit: + needs: + - compliance-copyrights + if: ${{ success() || failure() }} runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 @@ -38,7 +47,8 @@ jobs: publish: needs: - compliance-copyrights - - pre-commit +# if: ${{ always() }} + if: ${{always() && needs.compliance-copyrights.result != 'skipped'}} runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 From 7fd6a484a8451a94cafb8fae3d1a87cf34c95f8b Mon Sep 17 00:00:00 2001 From: Harshil Gajera Date: Thu, 29 Aug 2024 11:57:42 +0530 Subject: [PATCH 72/73] revert: testing ci workfloe --- .github/workflows/build-test-release.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/build-test-release.yaml b/.github/workflows/build-test-release.yaml index 8eaa33f0e..aa8fc45a4 100644 --- a/.github/workflows/build-test-release.yaml +++ b/.github/workflows/build-test-release.yaml @@ -17,6 +17,7 @@ permissions: jobs: compliance-copyrights: + if: false runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 From f004573e4cab05b200072b7bb29dddbc26c3480c Mon Sep 17 00:00:00 2001 From: Harshil Gajera Date: Thu, 29 Aug 2024 11:58:33 +0530 Subject: [PATCH 73/73] revert: testing ci workfloe --- .github/workflows/build-test-release.yaml | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/.github/workflows/build-test-release.yaml b/.github/workflows/build-test-release.yaml index aa8fc45a4..009e47d29 100644 --- a/.github/workflows/build-test-release.yaml +++ b/.github/workflows/build-test-release.yaml @@ -16,7 +16,14 @@ permissions: statuses: write jobs: + test-skip: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + compliance-copyrights: + needs: + - test-skip if: false runs-on: ubuntu-latest steps: @@ -25,11 +32,6 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - test-skip: - if: false - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 pre-commit: needs: