Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

jenkins,win: fix buildpulse for rebased PRs #3676

Merged
merged 1 commit into from
Apr 22, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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