Use Dos command to pull/deploy version from cc.net

When using Cruisecontrol.net + EAserver, we want to use pull instead of push style to deploy packages upto EAServer. Because the Cruisecontrol stores all the build result into the artifacts folder, what we need is a dos command can pull the specific version then deploy to EAServer. Here is the command I created:


@echo off
set artifacts_dir=\\ccnet\Work_Dir\Artifacts\my_project
cls
echo *****************************************
echo Please type in the version to deploy:
echo *****************************************
set /p version_number=
echo *****************************************
echo Starting to deploy %version_number%
echo *****************************************
if  "%version_number%"=="" goto help

pause

call jagtool -local delete Package:MyPackage
call jagtool -local deploy -type jagjar -jagjartype Package  %artifacts_dir%\%version_number%\jar\MyPackage.jar

pause



exit /b

:help
echo You need to specify the version to deploy
pause

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s