Today, I just started integrating wyBuild into my continuous integration environment and am running into something peculiar.
First, heres a brief description of the CI setup: I'm using TeamCity to monitor a SVN repository for changes. It then kicks off a few NAnt scripts to do the build, unit tests, compile a setup program (NSIS) and deploy to AWS/S3.
I inserted a new step in the CI process to invoke wyBuild.exe with my .wyp project, /bu and /bwu as command-line arguments. You'll notice I don't have an -add yet, I'll be working on that next.
Here is the specific NAnt call if you're interested:<exec program="wybuild.exe" commandline="tzchanger.wyp /bu /bwu" workingdir="Update" basedir="${environment::get-variable('WYHome')}" />
When this tasks kicks off, everything seems to be running as expected and the following is output to stdout:[22:07:27]: [exec] wyUpdate built successfully.[22:07:28]: [exec] Updates built successfully.
However, wyBuild doesn't terminate. Task manager shows the wybuild process using 98 - 100% CPU. I've let the app sit for about 10 minutes with out it terminating.
A thread dump of wyBuild in this state shows:Thread id=1972 priority=8 state=Wait reason=UserRequest at [Internal thisFrame, 'M-->U', System.Windows.Forms.UnsafeNativeMethods::PeekMessage] at System.Windows.Forms.Application+ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(System.Int32 dwComponentID, System.Int32 reason, System.Int32 pvLoopData) at System.Windows.Forms.Application+ThreadContext.RunMessageLoopInner(System.Int32 reason, System.Windows.Forms.ApplicationContext context) at System.Windows.Forms.Application+ThreadContext.RunMessageLoop(System.Int32 reason, System.Windows.Forms.ApplicationContext context) at System.Windows.Forms.SendKeys.Flush() at System.Windows.Forms.SendKeys.Send(System.String keys, System.Windows.Forms.Control control, System.Boolean wait) at System.Windows.Forms.SendKeys.SendWait(System.String keys) at wyBuild.Program.Main(System.String args)
Now, I will say that I can invoke the nant script on the build machine interactively and wyBuild does it's thing and terminates gracefully in under a second. So, I think the issue is when wyBuild is running in an environment without a shell or windowing service; such as a NT service.
On a side note, when I installed wyBuild on the build machine today, the installer asked for my key. When I ran wyBuild, it didn't recognize that I had already entered the key and wanted me to enter it again.