Hi guys i have a parameter build structure. there are two parameters Environment and Tag
When environment is selected as stage and a particular TAG is selected, i want the script to jump to that location based on the path mentioned in script but it runs into the default environment on its own the script is attached here, can you guys please help me in figuring out what seems to be the problem -- You received this message because you are subscribed to the Google Groups "Jenkins Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/groups/opt_out.
@ECHO off setlocal echo %Environment% echo %Tag% SET dt=%date:~-4,4%%date:~-10,2%%date:~-7,2%_%time:~0,2%%time:~3,2%%time:~6,2% cd c:\ IF %Environment% == "Test" goto Test IF %Environment% == "Stage" goto Stage IF %Environment% == "Production" goto Prod :Test echo Test exit set direc=%date:~-4,4%%date:~-10,2%%date:~-7,2%_%time:~0,2%%time:~3,2%%time:~6,2%_T rmdir c:\%Environment% /s /q mkdir %Environment% cd c:\%Environment% mkdir code mkdir ear svn up <<Local Path>> svn export --force <<Local Path>> C:\%Environment%\code\ --username mayank.jhawar --password Sapient123 cd "C:\Tibco\tra\5.7\bin" buildear -x -v CLEStubs.projlib -ear /Deployment/EDI856ASN.archive -o c:\%Environment%\ear\cv.ear -p C:\%Environment%\Code\ echo ear_created cd "<<Local Path>>\" mkdir %direc% echo dir_created cd %direc% xcopy "C:\%Environment%\Code\*.*" "<<Local Path>>\%direc%\" /e /i /h echo file_copied svn add "<<Local Path>>\%direc%" echo svn_added svn commit "<<Local Path>>\%direc%" -m "Testing" --username mayank.jhawar --password Sapient123 echo svn_committed echo exiting exit :Stage echo Stage set direc=%date:~-4,4%%date:~-10,2%%date:~-7,2%_%time:~0,2%%time:~3,2%%time:~6,2%_S rmdir c:\%Environment% /s /q mkdir %Environment% cd c:\%Environment% svn up <<Local Path>>\ ::svn checkout <<SVN Path>>Tag/%Tag%/ C:\%Environment%\ --username mayank.jhawar --password Sapient123 ::cd "C:\Tibco\tra\5.7\bin" ::buildear -x -v CLEStubs.projlib -ear /Deployment/EDI856ASN.archive -o c:\%Environment%\ear\cv.ear -p C:\%Environment%\Code\ cd "<<Local Path>>" mkdir %direc% cd %direc% xcopy "<<Local Path>>\%Tag%\*.*" "<<Local Path>>\%direc%\ /e /i /h svn add "<<Local Path>>\%direc%" svn commit "<<Local Path>>\%direc%" -m "Testing" --username mayank.jhawar --password Sapient123 exit :Prod echo Prod set direc=%date:~-4,4%%date:~-10,2%%date:~-7,2%_%time:~0,2%%time:~3,2%%time:~6,2%_P rmdir c:\%Environment% /s /q mkdir %Environment% cd c:\%Environment% svn up <<Local Path>>\ ::svn checkout<<SVN Path>>Tag/%Tag%/ C:\%Environment%\ --username mayank.jhawar --password Sapient123 ::cd "C:\Tibco\tra\5.7\bin" ::buildear -x -v CLEStubs.projlib -ear /Deployment/EDI856ASN.archive -o c:\%Environment%\ear\cv.ear -p C:\%Environment%\Code\ cd "<<Local Path>>" mkdir %direc% cd %direc% xcopy "<<Local Path>>\%Tag%\*.*" "<<Local Path>>\%direc%\ /e /i /h svn add "<<Local Path>>\%direc%" svn commit "<<Local Path>>\%direc%" -m "Testing" --username mayank.jhawar --password Sapient123 exit
