bamboo build still in progress windows batch script completed..

directfn_devops April 22, 2020

Dears

Bamboo server not complete build ans still in progress even the script task to run the batch script completed.Please advice

 

this is my script:

@[deleted] off
REM ----- [ REQUEST ADMIN PRIVILEDGES :: DO NOT MODIFY THIS SECTION ] -----

:: BatchGotAdmin
::-------------------------------------
REM --> Check for permissions
>nul 2>&1 "%SYSTEMROOT%\system32\cacls.exe" "%SYSTEMROOT%\system32\config\system"

REM --> If error flag set, we do not have admin.
if '%errorlevel%' NEQ '0' (
echo Requesting administrative privileges...
goto UACPrompt
) else ( goto gotAdmin )

:UACPrompt
echo Set UAC = CreateObject^("Shell.Application"^) > "%temp%\getadmin.vbs"
set params = %*:"="
echo UAC.ShellExecute "cmd.exe", "/c %~s0 %params%", "", "runas", 1 >> "%temp%\getadmin.vbs"

"%temp%\getadmin.vbs"
del "%temp%\getadmin.vbs"
exit /B

:gotAdmin
pushd "%CD%"
CD /D "%~dp0"
::--------------------------------------
::ENTER YOUR CODE BELOW:

NET SESSION >nul 2>&1

IF %ERRORLEVEL% EQU 0 (
ECHO Administrator PRIVILEGES Detected!
ECHO ===========================================================
) ELSE (
echo WARNING : Administrator Privileges NOT Detected!
)

REM ----- [ REQUEST ADMIN PRIVILEDGES :: DO NOT MODIFY THIS SECTION ] -----
REM ----- [ ACTUAL CODE STARTS FROM HERE ] -----

@[deleted] Installing [npm modules for tests]
@[deleted] ===========================================================
call npm install

@[deleted] Installing [selenium-standalone server]
@[deleted] ===========================================================
call npm install selenium-standalone@latest -g

@[deleted] Installing [gecko driver]
@[deleted] ===========================================================
call npm install geckodriver -g

@[deleted] Installing [chrome driver]
@[deleted] ===========================================================
call selenium-standalone install --drivers.chrome.version=2.43 -g --drivers.chrome.baseURL=https://chromedriver.storage.googleapis.com

@[deleted] Starting [Selenium-standalone server]
@[deleted] ===========================================================
call selenium-standalone start

call exit 0;

 

 

1 comment

Jimmy Seddon
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
April 22, 2020

Hi @directfn_devops,

I have seem so signals get crossed before.  Is this the only time that it has happened or do you see this consistently every time you run this build.

What tasks happen after this one has finished, it might be worth looking at what comes next to see if there is something that is hanging starting the next task.

I hope that helps!

-Jimmy

directfn_devops April 22, 2020

Hi Jimmy

This is happening every time from this command "call selenium-standalone start ".. is there any way to start selenium in background in windows.

 

Regards

Raveendra

Jimmy Seddon
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
April 22, 2020

A little outside my realm of expertise, but a quick search on Google suggests that you should be able to pass a '--headless'  argument to the chrome driver options, and that should run selenium-standalone as a background task.

I hope that helps!

-Jimmy

Comment

Log in or Sign up to comment
TAGS
AUG Leaders

Atlassian Community Events