Relative paths in remote agent capabilities are incorrectly referenced to agent's directory after upgrade

お困りですか?

アトラシアン コミュニティをご利用ください。

コミュニティに質問

症状

An agent has a capability where it finds and runs "Ruby.exe" at a relative path (Ex. : ".\3rdParty\ruby\bin\ruby.exe") from within the existing Perforce workspace directory which is different for each plan - (Ex.: D:\views\<NAME-OF-PERFORCE-WORKSPACE>). After upgrading from Bamboo 4.4.4 to Bamboo 5.3, this relative path gets incorrectly mapped to remote agent's directory (Ex.: "C:\_remote_agent_directory\.\3rdParty\ruby\bin\ruby.exe" instead of staying at: "D:\views\<NAME-OF-PERFORCE-WORKSPACE>\.\3rdParty\ruby\bin\ruby.exe"), which causes all the builds set up with this capability to fail.

原因

Library used by Bamboo 4.4.4 to spawn external processes adds the following decoration for each invocation:

cmd /C /A call actual-command

The same library is used by Bamboo 5.3 but it only adds that decoration for ".bat" and ".cmd" scripts. So a native Windows call gets executed which fails if the command name is not just a command name but "directory/command-name".

回避策

Add a "ruby.bat" script to the same directory where "ruby.exe" exists with the following content: 

@ECHO OFF
IF NOT "%~f0" == "~f0" GOTO :WinNT
ECHO.This version of Ruby has not been built with support for Windows 95/98/Me.
GOTO :EOF
:WinNT
@"%~dp0ruby.exe" %*

Then alter the _WorkspaceRuby_ to be:

.\3rdParty\Ruby\win32\bin\ruby.bat
最終更新日: 2014 年 2 月 3 日

この内容はお役に立ちましたか?

はい
いいえ
この記事についてのフィードバックを送信する
Powered by Confluence and Scroll Viewport.