Skip to content

Commit

Permalink
jenkins,win: fix buildpulse for rebased PRs (#3676)
Browse files Browse the repository at this point in the history
  • Loading branch information
StefanStojanovic authored Apr 22, 2024
1 parent 4899b53 commit 6043cf7
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion jenkins/scripts/windows/buildpulse.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -94,15 +94,21 @@ echo "GIT_URL set to %GIT_URL%."
:: 6.Send results to BuildPulse
echo "Sending data to BuildPulse."

:: Set TREE_SHA from the current repo to process rebased branches
:: GIT_COMMIT is different from TREE_SHA for rebased branches
for /f %%i in ('git rev-parse HEAD') do set TREE_SHA=%%i
echo "TREE_SHA set to %TREE_SHA%."

:: Add available tags for easier navigation in BuildPulse
set "TAGS=%NODE_NAME% %nodes% v%NODEJS_MAJOR_VERSION%"
if defined NODEJS_VERSION (
set "TAGS=%TAGS% v%NODEJS_VERSION%"
)
echo "TAGS set to %TAGS%."

:: Edit BUILD_URL to enable better grouping in BuildPulse
set "BUILD_URL_BACKUP=%BUILD_URL%"
for /f "usebackq delims=" %%i in (`powershell -File "%~dp0modify-build-url.ps1" -BUILD_URL "%BUILD_URL%"`) do set "BUILD_URL=%%i"
%TEST_REPORTER_PATH% submit %1 --account-id %BUILDPULSE_ACCOUNT_ID% --repository-id %BUILDPULSE_REPOSITORY_ID% --tags "%TAGS%"
%TEST_REPORTER_PATH% submit %1 --account-id %BUILDPULSE_ACCOUNT_ID% --repository-id %BUILDPULSE_REPOSITORY_ID% --tree %TREE_SHA% --tags "%TAGS%"
set "BUILD_URL=%BUILD_URL_BACKUP%"
exit /b 0

0 comments on commit 6043cf7

Please sign in to comment.