batch command execution through jenkins not extracting files though it extracts when run as bat file -


i have written below batch script in jenkins. when run bat file in jenkins server workspace same folder, runs without issues. when run through jenkins using "execute windows batch command" not extracting. prints line "about copy from" relevant paths , keeps executing there. nothing printed in console output , nothing extracted. below script.

echo %cd% /d %%p in ("%cd%\setups\*") rmdir "%%p" /s /q   call mvn org.apache.maven.plugins:maven-dependency-plugin:2.4:get -drepourl=http://10.101.2.23:8081/nexus/content/repositories/releases/ -dartifact=test:update-service:1.0.3 -ddest=setups/services/update-service.jar call mvn org.apache.maven.plugins:maven-dependency-plugin:2.4:get -drepourl=http://10.101.2.23:8081/nexus/content/repositories/releases/ -dartifact=test:installer-prerequisites:1.0.0 -ddest=setups/prerequisites/installer-prerequisites.zip -dpackaging=zip  echo came after downloads  /r %%i in (*.zip) (   echo copy %%~dpi %%~fi call :unzipfile "%%~dpi" "%%~fi" echo called unzip on %%i del /s /q "%%~fi" )  exit /b  :unzipfile <extractto> <newzipfile>     setlocal     set vbs="%temp%\_.vbs"     if exist "%vbs%" del /f /q "%vbs%"      >"%vbs%" echo set fso = createobject("scripting.filesystemobject")     >>"%vbs%" echo if not fso.folderexists("%~1")     >>"%vbs%" echo fso.createfolder("%~1")     >>"%vbs%" echo end if     >>"%vbs%" echo set objshell = createobject("shell.application")     >>"%vbs%" echo set filesinzip=objshell.namespace("%~2").items     >>"%vbs%" echo objshell.namespace("%~1").copyhere(filesinzip)     >>"%vbs%" echo set fso = nothing     >>"%vbs%" echo set objshell = nothing     cscript //nologo "%vbs%"     if exist "%vbs%" del /f /q "%vbs%"     endlocal 

this works fine when run bat file. please advice.

below jenkins workspace path :

c:\program files (x86)\jenkins\jobs\installer\workspace\setups 

check permissions of zip file , make sure readable user jenkins runs under.


Comments

Popular posts from this blog

javascript - Laravel datatable invalid JSON response -

java - Exception in thread "main" org.springframework.context.ApplicationContextException: Unable to start embedded container; -

sql server 2008 - My Sql Code Get An Error Of Msg 245, Level 16, State 1, Line 1 Conversion failed when converting the varchar value '8:45 AM' to data type int -