From 0c55523b87d5c8f27751aec91d88ae806d15c9d6 Mon Sep 17 00:00:00 2001 From: Vikrant Puppala Date: Tue, 28 Apr 2026 07:16:17 +0000 Subject: [PATCH] Fix main CI: JFrog mirror bypass and Windows pwsh parse error Two CI workflows on main were failing: 1. runIntegrationTests.yml was caching ~/.m2, which restored a stale settings.xml on top of the JFrog-configured one written by the preceding Configure maven step. Maven then bypassed the mirror and tried to hit Maven Central directly, which the protected runner cannot reach. Narrow the cache path to ~/.m2/repository so settings.xml is preserved. 2. loggingTesting.yml's Get JFrog OIDC token and Configure maven steps used bash syntax (if [ ... ], heredoc) but had no shell directive. On Windows runners the default shell is pwsh, which fails to parse the bash if statement. Pin both steps to shell: bash. Co-authored-by: Isaac Signed-off-by: Vikrant Puppala --- .github/workflows/loggingTesting.yml | 2 ++ .github/workflows/runIntegrationTests.yml | 6 +++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/.github/workflows/loggingTesting.yml b/.github/workflows/loggingTesting.yml index 13093ba21..b364f6e02 100644 --- a/.github/workflows/loggingTesting.yml +++ b/.github/workflows/loggingTesting.yml @@ -44,6 +44,7 @@ jobs: java-version: '21' - name: Get JFrog OIDC token + shell: bash run: | set -euo pipefail @@ -70,6 +71,7 @@ jobs: echo "JFrog OIDC token obtained successfully" - name: Configure maven + shell: bash run: | set -euo pipefail diff --git a/.github/workflows/runIntegrationTests.yml b/.github/workflows/runIntegrationTests.yml index 7142b0a27..681302a6a 100644 --- a/.github/workflows/runIntegrationTests.yml +++ b/.github/workflows/runIntegrationTests.yml @@ -85,7 +85,11 @@ jobs: echo "Maven configured to use JFrog registry" - uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4 with: - path: ~/.m2 + # Cache only the local repository — caching ~/.m2 itself would + # restore a stale settings.xml on top of the JFrog-configured one + # written above, causing Maven to bypass the mirror and hit Maven + # Central directly. + path: ~/.m2/repository key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }} restore-keys: ${{ runner.os }}-m2 - name: Create .pem file from secret