I have now committed the fix - this can be downloaded from 
http://ccnetlive...thoughtworks.com/CCNet-builds/1.4.4/ (any build from 
1.4.4.70 onwards).


Craig




________________________________
From: Fyodor Koryazhkin <[email protected]>
To: [email protected]
Sent: Wednesday, 27 May, 2009 10:34:08 PM
Subject: [ccnet-user] Re: Building from command line


Hi Craig,
Thank you! I am glad to be some kind of helpful!
Wish you a good luck in your job.

Regards

Fyodor.


On Wed, May 27, 2009 at 1:25 PM, Craig & Sammi Sutherland 
<[email protected]> wrote:

Hi Fyodor,
 
I’ve tracked down what is happening here – you’ve found a bug in 1.4.4 (and 
probably the other versions as well). Basically doing a force build from the 
command line starts the integration process. When the build has finished, the 
process is not automatically stopped!
 
Since this is a small fix that won’t impact any other areas, I will add it to 
the 1.4...4 release (and future releases).
 
 
Craig
 
From:[email protected] [mailto:[email protected]] On Behalf 
Of Craig & Sammi Sutherland
Sent: Wednesday, 27 May 2009 7:27 p.m. 

To: [email protected]
Subject: [ccnet-user] Re: Building from command line
 
Hi Fyodor,
 
Thank you, I now understand the problem, and more importantly, I can reproduce 
it.
 
I’ll take into it sometime and see if I figure out what is happening.
 
 
Craig
 
From:[email protected] [mailto:[email protected]] On Behalf 
Of Fyodor Koryazhkin
Sent: Wednesday, 27 May 2009 6:41 p.m. 

To: [email protected]
Subject: [ccnet-user] Re: Building from command line
 
Hi Craig,

The scenario I test:
I open cmd window on Windows xp. Then I type following command line: start 
"WindowTitle" /wait ccnet.exe -config:path_to_config_file 
-project:project_name. The config file has two empty projects that do nothing 
for testing purposes. So the ccnet command window opens showing build messages 
and after build finishes the window stays up waiting for the next integration 
but I expect it to close to return command to the initial cmd.
I attach screenshot.
Thank you

Fyodor
On Wed, May 27, 2009 at 9:18 AM, Craig & Sammi Sutherland 
<[email protected]> wrote:
Hi Fyodor,
 
I’m a bit confused here – ccnet does not have a “start /wait” syntax – where is 
this coming from?
 
I’ve checked the code for ccnet.exe – when ccnet starts with a project 
specified, it performs a force build and then exits. If there is an exception, 
then it returns 1, otherwise it returns 0. It does not check that a build was 
successful or not. Also the only time it pauses is when there has been an 
exception – otherwise it just runs and terminates immediately.
 
 
Craig
 
From:[email protected] [mailto:[email protected]] On Behalf 
Of Fyodor Koryazhkin
Sent: Wednesday, 27 May 2009 6:07 p.m.

To: [email protected]
Subject: [ccnet-user] Re: Building from command line
 
Hi,
Thank you for a response.
I did try -noerrorpause option. This option allows the window to close in the 
case of the error in config file but in the case of success the window does not 
close. And if the ccnet was run from the batch file with following syntax 
"start /wait....." there is no indication of success or failuer since the cmd 
window still waiting for a response. And ccnet comand window is alive forever

Hence the switch autoclose:true will be welcome. In this case a return code of 
0 in the case of success and other in the case of error will be very 
appreciated too. This will allow to work with errorlevel environment in batch 
process.

Ruben,
I guess that the switch -project:projectname already suppose to run ccnet once 
and to build specfied project and then exit to allow to use ccnet again. If the 
window stays up and was launched with default remoting option then the second 
widow with the same settings cannot be launched - there is an exception of 
creating second socket on the same port.
The problem of leaving window up in the case of error or exception in config 
file may be resolved by adding System.readline() in that flow. Thus user can 
read exception and error on the screen (they are written in the log file 
anyway) and by pressing any key on the time he choose eliminate the window 
preparing system for consequitive launch. I think that this behavior is much 
strait forward but autoclose:true also should work. This will allow creating of 
very rich building system based on batch processing or even some custom UI 
layer.

Thank you

Fyodor
On Tue, May 26, 2009 at 11:55 PM, Craig & Sammi Sutherland 
<[email protected]> wrote:
Have you tried using –noerrorpause from the command line?
 
http://confluence.public.thoughtworks.org/display/CCNET/The+Server+Console+Application
 
 
Craig
 
From:[email protected] [mailto:[email protected]] On Behalf 
Of Ruben Willems
Sent: Wednesday, 27 May 2009 6:10 a.m.
To: [email protected]
Subject: [ccnet-user] Re: Building from command line
 
Hi


just to make sure I understand it :
° you run ccnet with the following : ccnet.exe -config:configfile 
-project:projectname
° and when ccnet is done, the command window does not close?

if this is so, it is by design, there was a request made once :
when starting ccnet console by clicking via the shortcut on the desktop,
and there is a config problem, the command window goes away.
Thus one can not read the error.

and this was/is a very good item that needed to be addressed.


Now, we can foresee a setting, let's autoclose, that will close the command 
window when ccnet has done.

so the syntax would be : 
ccnet.exe -config:configfile -project:projectname -autoclose:true

autoclose would be default false


Would this be a solution for your situation?



with kind regards
Ruben Willems
On Mon, May 25, 2009 at 10:49 AM, fyodorkor <[email protected]> wrote:

Hi,
I am currently using version 1.4.2.14 and testing 1.4.4. (They both
have the same behavior)
I am trying to launch CruiseControl through cmd window with paramaters
-config:configfile -project:projectname to build only a specific
project. After the project finishes building the ccnet process does
not terminate leaving cmd window up. So there is no indication that
the build process succeeded.
Is this a bug or I miss something in ccnet.exe configuration.

The full command line is: start "Title" /wait <path_to_ccnet.exe> -
config:<path_to_config_file> -project:<project_name>

Thank you

Fyodor

Reply via email to