From ff2db306da264419ef4da941c67b7095c983a4f9 Mon Sep 17 00:00:00 2001 From: Raido Kaju Date: Tue, 22 Oct 2024 15:08:28 +0300 Subject: [PATCH 01/22] feat: add central server allure reports --- .github/workflows/build.yaml | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index f69954b1af..ad7a691290 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -155,6 +155,41 @@ jobs: with: name: CS System Test screenshots path: src/central-server/admin-service/ui-system-test/build/reports/test-automation/selenide-failures/*.png + - name: Load test report history + uses: actions/checkout@v4 + if: always() + continue-on-error: true + with: + ref: allure-gh-pages + path: allure-reports + + - name: Build test report + uses: simple-elf/allure-report-action@v1.9 + if: always() + with: + gh_pages: allure-reports + subfolder: central-server/ui-system-test + allure_history: allure-history + allure_results: src/central-server/admin-service/ui-system-test/build/allure-results + + - name: Publish test report + uses: peaceiris/actions-gh-pages@v4 + if: always() + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + publish_branch: allure-gh-pages + publish_dir: allure-history + - name: Add link to the report as a comment + uses: actions/github-script@v7 + if: always() + with: + script: | + github.rest.issues.createComment({ + issue_number: context.issue.number, + owner: context.repo.owner, + repo: context.repo.repo, + body: 'Central Server Allure report: https://nordic-institute.github.io/X-Road/central-server/ui-system-test/${{ github.run_number }}' + }) RunSSSystemTests: name: Run Security Server system tests needs: BuildAndPackageWithUnitTests From ed200f6b161ecec0f0d99c719ffa51679d8b8540 Mon Sep 17 00:00:00 2001 From: Raido Kaju Date: Tue, 22 Oct 2024 15:55:30 +0300 Subject: [PATCH 02/22] feat: add allure report publishing to Security Server and E2E --- .github/workflows/build.yaml | 69 ++++++++++++++++++++++++++++++++++++ 1 file changed, 69 insertions(+) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index ad7a691290..089b1319d7 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -255,6 +255,41 @@ jobs: src/security-server/system-test/build/ss-container-logs/ src/security-server/system-test/build/ca-container-logs/ src/security-server/system-test/build/reports/test-automation/selenide-failures/*.png + - name: Load test report history + uses: actions/checkout@v4 + if: always() + continue-on-error: true + with: + ref: allure-gh-pages + path: allure-reports + + - name: Build test report + uses: simple-elf/allure-report-action@v1.9 + if: always() + with: + gh_pages: allure-reports + subfolder: security-server/system-test + allure_history: allure-history + allure_results: src/security-server/system-test/build/allure-results + + - name: Publish test report + uses: peaceiris/actions-gh-pages@v4 + if: always() + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + publish_branch: allure-gh-pages + publish_dir: allure-history + - name: Add link to the report as a comment + uses: actions/github-script@v7 + if: always() + with: + script: | + github.rest.issues.createComment({ + issue_number: context.issue.number, + owner: context.repo.owner, + repo: context.repo.repo, + body: 'Security Server Allure report: https://nordic-institute.github.io/X-Road/security-server/system-test/${{ github.run_number }}' + }) RunE2ETests: name: Run E2E tests needs: BuildAndPackageWithUnitTests @@ -334,3 +369,37 @@ jobs: name: E2E report path: | src/security-server/e2e-test/build/allure-report/ + - name: Load test report history + uses: actions/checkout@v4 + if: always() + continue-on-error: true + with: + ref: allure-gh-pages + path: allure-reports + + - name: Build test report + uses: simple-elf/allure-report-action@v1.9 + if: always() + with: + gh_pages: allure-reports + subfolder: e2e + allure_history: allure-history + allure_results: src/security-server/e2e-test/build/allure-results + - name: Publish test report + uses: peaceiris/actions-gh-pages@v4 + if: always() + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + publish_branch: allure-gh-pages + publish_dir: allure-history + - name: Add link to the report as a comment + uses: actions/github-script@v7 + if: always() + with: + script: | + github.rest.issues.createComment({ + issue_number: context.issue.number, + owner: context.repo.owner, + repo: context.repo.repo, + body: 'E2E Allure report: https://nordic-institute.github.io/X-Road/e2e/${{ github.run_number }}' + }) From 5d4ca9833f40d9e3f87f9427a10cecb3f20eea12 Mon Sep 17 00:00:00 2001 From: Raido Kaju Date: Mon, 4 Nov 2024 11:55:03 +0200 Subject: [PATCH 03/22] chore: address review comments --- .github/workflows/build.yaml | 39 ++++++++++++------------------------ 1 file changed, 13 insertions(+), 26 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 089b1319d7..4d31d503aa 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -179,17 +179,6 @@ jobs: github_token: ${{ secrets.GITHUB_TOKEN }} publish_branch: allure-gh-pages publish_dir: allure-history - - name: Add link to the report as a comment - uses: actions/github-script@v7 - if: always() - with: - script: | - github.rest.issues.createComment({ - issue_number: context.issue.number, - owner: context.repo.owner, - repo: context.repo.repo, - body: 'Central Server Allure report: https://nordic-institute.github.io/X-Road/central-server/ui-system-test/${{ github.run_number }}' - }) RunSSSystemTests: name: Run Security Server system tests needs: BuildAndPackageWithUnitTests @@ -279,17 +268,6 @@ jobs: github_token: ${{ secrets.GITHUB_TOKEN }} publish_branch: allure-gh-pages publish_dir: allure-history - - name: Add link to the report as a comment - uses: actions/github-script@v7 - if: always() - with: - script: | - github.rest.issues.createComment({ - issue_number: context.issue.number, - owner: context.repo.owner, - repo: context.repo.repo, - body: 'Security Server Allure report: https://nordic-institute.github.io/X-Road/security-server/system-test/${{ github.run_number }}' - }) RunE2ETests: name: Run E2E tests needs: BuildAndPackageWithUnitTests @@ -392,14 +370,23 @@ jobs: github_token: ${{ secrets.GITHUB_TOKEN }} publish_branch: allure-gh-pages publish_dir: allure-history - - name: Add link to the report as a comment - uses: actions/github-script@v7 - if: always() + CreateAllureLinks: + name: Create Allure links + needs: [RunCSSystemTests, RunSSSystemTests, RunE2ETests] + runs-on: ubuntu-22.04 + steps: + - name: Generate links table with: script: | github.rest.issues.createComment({ issue_number: context.issue.number, owner: context.repo.owner, repo: context.repo.repo, - body: 'E2E Allure report: https://nordic-institute.github.io/X-Road/e2e/${{ github.run_number }}' + body: `## Allure reports + | Test suite | Report URL | + |-----------------|------------| + | Central Server | [Link](https://nordic-institute.github.io/X-Road/central-server/ui-system-test/${{ github.run_number }}) | + | Security Server | [Link](https://nordic-institute.github.io/X-Road/security-server/system-test/${{ github.run_number }}) | + | E2E | [Link](https://nordic-institute.github.io/X-Road/e2e/${{ github.run_number }}) | + ` }) From 83123fe5937b6c8fe2136084dc43c629c8d4f394 Mon Sep 17 00:00:00 2001 From: Raido Kaju Date: Mon, 4 Nov 2024 12:04:53 +0200 Subject: [PATCH 04/22] chore: add back missing `uses` for new script job --- .github/workflows/build.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 4d31d503aa..d0ef058d0b 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -374,6 +374,7 @@ jobs: name: Create Allure links needs: [RunCSSystemTests, RunSSSystemTests, RunE2ETests] runs-on: ubuntu-22.04 + uses: actions/github-script@v7 steps: - name: Generate links table with: From 70579532e3346dbde9f6192f654085b965fc31b4 Mon Sep 17 00:00:00 2001 From: Raido Kaju Date: Mon, 4 Nov 2024 12:26:24 +0200 Subject: [PATCH 05/22] chore: correct `uses` location --- .github/workflows/build.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index d0ef058d0b..ecdefafbfd 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -374,9 +374,9 @@ jobs: name: Create Allure links needs: [RunCSSystemTests, RunSSSystemTests, RunE2ETests] runs-on: ubuntu-22.04 - uses: actions/github-script@v7 steps: - name: Generate links table + uses: actions/github-script@v7 with: script: | github.rest.issues.createComment({ From f07b732548a42185b1122350b80a07395ba798d6 Mon Sep 17 00:00:00 2001 From: Raido Kaju Date: Mon, 4 Nov 2024 13:42:01 +0200 Subject: [PATCH 06/22] chore: fix markup --- .github/workflows/build.yaml | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index ecdefafbfd..7562bc5e2b 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -383,11 +383,12 @@ jobs: issue_number: context.issue.number, owner: context.repo.owner, repo: context.repo.repo, - body: `## Allure reports - | Test suite | Report URL | - |-----------------|------------| - | Central Server | [Link](https://nordic-institute.github.io/X-Road/central-server/ui-system-test/${{ github.run_number }}) | - | Security Server | [Link](https://nordic-institute.github.io/X-Road/security-server/system-test/${{ github.run_number }}) | - | E2E | [Link](https://nordic-institute.github.io/X-Road/e2e/${{ github.run_number }}) | - ` + body: `## Allure reports for run #{{ github.run_number }} + + | Test suite | Report URL | + |-----------------|------------| + | Central Server | Report | + | Security Server | Report | + | E2E | Report | + ` }) From 118ed982f02281b8440fd05176a56c889e45f155 Mon Sep 17 00:00:00 2001 From: Raido Kaju Date: Mon, 4 Nov 2024 14:24:53 +0200 Subject: [PATCH 07/22] chore: skip sonar task if SONAR_TOKEN is missing --- src/build.gradle | 1 + 1 file changed, 1 insertion(+) diff --git a/src/build.gradle b/src/build.gradle index fc0f75bec2..ffc7a4c7cb 100644 --- a/src/build.gradle +++ b/src/build.gradle @@ -261,3 +261,4 @@ tasks.register("installGitHooks", Copy) { } assemble.dependsOn installGitHooks tasks.sonar.dependsOn testCodeCoverageReport +tasks.sonar.onlyIf { System.env['SONAR_TOKEN'] != null } From 88594ba91f0ccc707ae32746d322e314810ed267 Mon Sep 17 00:00:00 2001 From: Raido Kaju Date: Mon, 4 Nov 2024 14:33:54 +0200 Subject: [PATCH 08/22] feat: add artifact links to allure reports table --- .github/workflows/build.yaml | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 7562bc5e2b..b1a8062bc5 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -99,6 +99,8 @@ jobs: name: Run Central Server system tests needs: BuildAndPackageWithUnitTests runs-on: ubuntu-22.04 + outputs: + cs-artifacts-url: ${{ steps.cs-artifacts-step.outputs.artifact-url }} services: registry: image: registry:2 @@ -150,6 +152,7 @@ jobs: path: src/central-server/admin-service/ui-system-test/build/test-results/**/TEST-*.xml reporter: java-junit - name: Upload CS screenshots + id: cs-artifacts-step if: failure() uses: actions/upload-artifact@v4 with: @@ -182,6 +185,8 @@ jobs: RunSSSystemTests: name: Run Security Server system tests needs: BuildAndPackageWithUnitTests + outputs: + ss-artifacts-url: ${{ steps.ss-artifacts-step.outputs.artifact-url }} runs-on: ubuntu-22.04 services: registry: @@ -235,6 +240,7 @@ jobs: run: sudo chown -R $USER src/security-server/system-test/build/ss-container-logs/ && sudo chown -R $USER src/security-server/system-test/build/ca-container-logs/ if: failure() - name: Upload SS report + id: ss-artifacts-step uses: actions/upload-artifact@v4 if: failure() with: @@ -272,6 +278,8 @@ jobs: name: Run E2E tests needs: BuildAndPackageWithUnitTests runs-on: ubuntu-22.04 + outputs: + e2e-artifacts-url: ${{ steps.e2e-artifacts-step.outputs.artifact-url }} services: registry: image: registry:2 @@ -341,6 +349,7 @@ jobs: path: src/security-server/e2e-test/build/test-results/**/TEST-*.xml reporter: java-junit - name: Upload E2E report + id: e2e-artifacts-step uses: actions/upload-artifact@v4 if: failure() with: @@ -383,12 +392,12 @@ jobs: issue_number: context.issue.number, owner: context.repo.owner, repo: context.repo.repo, - body: `## Allure reports for run #{{ github.run_number }} + body: `## Allure reports for run #${{ github.run_number }} - | Test suite | Report URL | - |-----------------|------------| - | Central Server | Report | - | Security Server | Report | - | E2E | Report | + | Test suite | Report URL | Artifacts | + |-----------------|------------|-----------| + | Central Server | Report | Artifacts | + | Security Server | Report | Artifacts | + | E2E | Report | Artifacts | ` }) From 20a5c62cf1bc25571dfe499f3df0d0b30f6f0fd5 Mon Sep 17 00:00:00 2001 From: Raido Kaju Date: Tue, 5 Nov 2024 14:26:44 +0200 Subject: [PATCH 09/22] chore: test artifact URL output --- .github/workflows/build.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index b1a8062bc5..e4627075f7 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -158,6 +158,8 @@ jobs: with: name: CS System Test screenshots path: src/central-server/admin-service/ui-system-test/build/reports/test-automation/selenide-failures/*.png + - name: CS report artifact URL + run: echo 'Artifact URL is ${{ steps.cs-artifacts-step.outputs.artifact-url }}' - name: Load test report history uses: actions/checkout@v4 if: always() From 019e3307e932974c325e7f6b4a6f7c15807aab8f Mon Sep 17 00:00:00 2001 From: Raido Kaju Date: Tue, 5 Nov 2024 15:20:37 +0200 Subject: [PATCH 10/22] chore: always upload CS artifacts --- .github/workflows/build.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index e4627075f7..4e7df6cdf6 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -153,7 +153,7 @@ jobs: reporter: java-junit - name: Upload CS screenshots id: cs-artifacts-step - if: failure() + if: always() uses: actions/upload-artifact@v4 with: name: CS System Test screenshots From f1cd06c954ee0145d64374dcca197b4c4acbcef1 Mon Sep 17 00:00:00 2001 From: Raido Kaju Date: Tue, 5 Nov 2024 15:22:18 +0200 Subject: [PATCH 11/22] chore: remove # from infront of run --- .github/workflows/build.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 4e7df6cdf6..c4f7d3e529 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -394,7 +394,7 @@ jobs: issue_number: context.issue.number, owner: context.repo.owner, repo: context.repo.repo, - body: `## Allure reports for run #${{ github.run_number }} + body: `## Allure reports for run ${{ github.run_number }} | Test suite | Report URL | Artifacts | |-----------------|------------|-----------| From e48cd6fd0438d768984f2c33aec4fc2c6fb0d04a Mon Sep 17 00:00:00 2001 From: Raido Kaju Date: Wed, 6 Nov 2024 09:27:25 +0200 Subject: [PATCH 12/22] chore: try SS artifacts --- .github/workflows/build.yaml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index c4f7d3e529..0af313b30b 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -153,13 +153,11 @@ jobs: reporter: java-junit - name: Upload CS screenshots id: cs-artifacts-step - if: always() + if: failure() uses: actions/upload-artifact@v4 with: name: CS System Test screenshots path: src/central-server/admin-service/ui-system-test/build/reports/test-automation/selenide-failures/*.png - - name: CS report artifact URL - run: echo 'Artifact URL is ${{ steps.cs-artifacts-step.outputs.artifact-url }}' - name: Load test report history uses: actions/checkout@v4 if: always() @@ -244,7 +242,7 @@ jobs: - name: Upload SS report id: ss-artifacts-step uses: actions/upload-artifact@v4 - if: failure() + if: always() with: name: SS System Test report path: | @@ -252,6 +250,8 @@ jobs: src/security-server/system-test/build/ss-container-logs/ src/security-server/system-test/build/ca-container-logs/ src/security-server/system-test/build/reports/test-automation/selenide-failures/*.png + - name: SS report artifact URL + run: echo 'Artifact URL is ${{ steps.ss-artifacts-step.outputs.artifact-url }}' - name: Load test report history uses: actions/checkout@v4 if: always() From 2ab5ff45fd2b9a9996a00bbefd566fddd8d130f7 Mon Sep 17 00:00:00 2001 From: Raido Kaju Date: Wed, 6 Nov 2024 10:09:35 +0200 Subject: [PATCH 13/22] chore: fix file rights --- .github/workflows/build.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 0af313b30b..2e876b9dc9 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -238,7 +238,7 @@ jobs: reporter: java-junit - name: Fix system-test build dir permissions run: sudo chown -R $USER src/security-server/system-test/build/ss-container-logs/ && sudo chown -R $USER src/security-server/system-test/build/ca-container-logs/ - if: failure() + if: always() - name: Upload SS report id: ss-artifacts-step uses: actions/upload-artifact@v4 From db5cf2c0e85a98fc0890f497558a611831678704 Mon Sep 17 00:00:00 2001 From: Raido Kaju Date: Wed, 6 Nov 2024 14:46:59 +0200 Subject: [PATCH 14/22] chore: test conditional in body --- .github/workflows/build.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 2e876b9dc9..bdb8b36268 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -390,6 +390,7 @@ jobs: uses: actions/github-script@v7 with: script: | + let centralServerLinks = github.rest.issues.createComment({ issue_number: context.issue.number, owner: context.repo.owner, @@ -398,7 +399,7 @@ jobs: | Test suite | Report URL | Artifacts | |-----------------|------------|-----------| - | Central Server | Report | Artifacts | + | Central Server | Report | ${needs.RunCSSystemTests.outputs.cs-artifacts-url !== '' ? 'Artifacts' : 'N/A'} | | Security Server | Report | Artifacts | | E2E | Report | Artifacts | ` From 6e337d127a3a6ff23eb5d19cb197ea94f2cdc4eb Mon Sep 17 00:00:00 2001 From: Raido Kaju Date: Thu, 7 Nov 2024 09:49:35 +0200 Subject: [PATCH 15/22] chore: search for `needs` inside the context --- .github/workflows/build.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index bdb8b36268..2f91d58842 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -399,7 +399,7 @@ jobs: | Test suite | Report URL | Artifacts | |-----------------|------------|-----------| - | Central Server | Report | ${needs.RunCSSystemTests.outputs.cs-artifacts-url !== '' ? 'Artifacts' : 'N/A'} | + | Central Server | Report | ${context.needs.RunCSSystemTests.outputs.cs-artifacts-url !== '' ? 'Artifacts' : 'N/A'} | | Security Server | Report | Artifacts | | E2E | Report | Artifacts | ` From 1b99be7ee857a73cdde95aa9ad4d6550129efe9b Mon Sep 17 00:00:00 2001 From: Raido Kaju Date: Thu, 7 Nov 2024 10:35:29 +0200 Subject: [PATCH 16/22] chore: log out context --- .github/workflows/build.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 2f91d58842..33ed27cf45 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -390,7 +390,7 @@ jobs: uses: actions/github-script@v7 with: script: | - let centralServerLinks = + console.log(context); github.rest.issues.createComment({ issue_number: context.issue.number, owner: context.repo.owner, From 6fee9c619f413f7948c9d4dc88b834999eddf54e Mon Sep 17 00:00:00 2001 From: Raido Kaju Date: Thu, 7 Nov 2024 11:36:56 +0200 Subject: [PATCH 17/22] chore: try to extract needs into const --- .github/workflows/build.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 33ed27cf45..b34998922b 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -390,7 +390,7 @@ jobs: uses: actions/github-script@v7 with: script: | - console.log(context); + const csArtifactsUrl = `\${{ needs.RunCSSystemTests.outputs.cs-artifacts-url }}`; github.rest.issues.createComment({ issue_number: context.issue.number, owner: context.repo.owner, @@ -399,7 +399,7 @@ jobs: | Test suite | Report URL | Artifacts | |-----------------|------------|-----------| - | Central Server | Report | ${context.needs.RunCSSystemTests.outputs.cs-artifacts-url !== '' ? 'Artifacts' : 'N/A'} | + | Central Server | Report | ${csArtifactUrl !== '' ? 'Artifacts' : 'N/A'} | | Security Server | Report | Artifacts | | E2E | Report | Artifacts | ` From 855947603f2ea0bc6be82e328b59e0932068ba64 Mon Sep 17 00:00:00 2001 From: Raido Kaju Date: Thu, 7 Nov 2024 12:21:58 +0200 Subject: [PATCH 18/22] chore: possibly incorrect syntax for newer files --- .github/workflows/build.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index b34998922b..525ff04866 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -390,7 +390,7 @@ jobs: uses: actions/github-script@v7 with: script: | - const csArtifactsUrl = `\${{ needs.RunCSSystemTests.outputs.cs-artifacts-url }}`; + const csArtifactsUrl = `${{ needs.RunCSSystemTests.outputs.cs-artifacts-url }}`; github.rest.issues.createComment({ issue_number: context.issue.number, owner: context.repo.owner, From b8dc8a9ce5492a23a3743f1ee525bb667f2faa94 Mon Sep 17 00:00:00 2001 From: Raido Kaju Date: Fri, 8 Nov 2024 11:59:13 +0200 Subject: [PATCH 19/22] chore: fix typo --- .github/workflows/build.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 525ff04866..d38c6cbd2f 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -399,7 +399,7 @@ jobs: | Test suite | Report URL | Artifacts | |-----------------|------------|-----------| - | Central Server | Report | ${csArtifactUrl !== '' ? 'Artifacts' : 'N/A'} | + | Central Server | Report | ${csArtifactsUrl !== '' ? 'Artifacts' : 'N/A'} | | Security Server | Report | Artifacts | | E2E | Report | Artifacts | ` From 94dcc3c854dfb2f063a577132b85959bb2fa625b Mon Sep 17 00:00:00 2001 From: Raido Kaju Date: Fri, 8 Nov 2024 15:51:44 +0200 Subject: [PATCH 20/22] feat: add artifacts url check to SS and E2E tests --- .github/workflows/build.yaml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index d38c6cbd2f..c7e96ebdc6 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -391,6 +391,8 @@ jobs: with: script: | const csArtifactsUrl = `${{ needs.RunCSSystemTests.outputs.cs-artifacts-url }}`; + const ssArtifactsUrl = `${{ needs.RunSSSystemTests.outputs.cs-artifacts-url }}`; + const e2eArtifactsUrl = `${{ needs.RunE2ETests.outputs.cs-artifacts-url }}`; github.rest.issues.createComment({ issue_number: context.issue.number, owner: context.repo.owner, @@ -400,7 +402,7 @@ jobs: | Test suite | Report URL | Artifacts | |-----------------|------------|-----------| | Central Server | Report | ${csArtifactsUrl !== '' ? 'Artifacts' : 'N/A'} | - | Security Server | Report | Artifacts | - | E2E | Report | Artifacts | + | Security Server | Report | ${ssArtifactsUrl !== '' ? 'Artifacts' : 'N/A'} | + | E2E | Report | ${e2eArtifactsUrl !== '' ? 'Artifacts' : 'N/A'} | ` }) From cd18eed298c2c00b0f0bc150934afd811cc3a683 Mon Sep 17 00:00:00 2001 From: Raido Kaju Date: Mon, 11 Nov 2024 11:20:05 +0200 Subject: [PATCH 21/22] chore: fix output names for SS and E2E tests --- .github/workflows/build.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index c7e96ebdc6..801cb3a08e 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -391,8 +391,8 @@ jobs: with: script: | const csArtifactsUrl = `${{ needs.RunCSSystemTests.outputs.cs-artifacts-url }}`; - const ssArtifactsUrl = `${{ needs.RunSSSystemTests.outputs.cs-artifacts-url }}`; - const e2eArtifactsUrl = `${{ needs.RunE2ETests.outputs.cs-artifacts-url }}`; + const ssArtifactsUrl = `${{ needs.RunSSSystemTests.outputs.ss-artifacts-url }}`; + const e2eArtifactsUrl = `${{ needs.RunE2ETests.outputs.e2e-artifacts-url }}`; github.rest.issues.createComment({ issue_number: context.issue.number, owner: context.repo.owner, From fe9bdf2236c196d6aacb5da0e3d4d06cfd8f770b Mon Sep 17 00:00:00 2001 From: Raido Kaju Date: Mon, 11 Nov 2024 14:12:17 +0200 Subject: [PATCH 22/22] feat: add container logs to CS artifacts --- .github/workflows/build.yaml | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 801cb3a08e..8af417560d 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -151,13 +151,19 @@ jobs: name: Central Server system test path: src/central-server/admin-service/ui-system-test/build/test-results/**/TEST-*.xml reporter: java-junit - - name: Upload CS screenshots + - name: Fix ui-system-test build dir permissions + run: sudo chown -R $USER src/central-server/admin-service/ui-system-test/build/cs-container-logs/ && sudo chown -R $USER src/central-server/admin-service/ui-system-test/build/ca-container-logs/ + if: always() + - name: Upload CS report id: cs-artifacts-step - if: failure() uses: actions/upload-artifact@v4 + if: always() with: - name: CS System Test screenshots - path: src/central-server/admin-service/ui-system-test/build/reports/test-automation/selenide-failures/*.png + name: CS System Test report + path: | + src/central-server/admin-service/ui-system-test/cs-container-logs/ + src/central-server/admin-service/ui-system-test/ca-container-logs/ + src/central-server/admin-service/ui-system-test/reports/test-automation/selenide-failures/*.png - name: Load test report history uses: actions/checkout@v4 if: always()