Kinook Software Forum

Go Back   Kinook Software Forum > Visual Build Professional > [VBP] General Discussion
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Rate Thread Display Modes
  #1  
Old 09-01-2010, 08:32 AM
ChrisF ChrisF is online now
Registered User
 
Join Date: 12-09-2009
Posts: 67
Continuous integration

I'm playing with the ContinuousIntegration.bld file from the sample folder, and using Starteam in my case. I see where the script knows that it has not run yet, and so it sets a NEED_TO_BUILD macro to true. After the first build, it runs a Starteam History command for missing and out-of-date files, but I don't see where it uses this information to set the NEED_TO_BUILD macro to either true or false. When I test it, it always builds, regardless if any check ins were done so I'm confused. Thanks!
Reply With Quote
  #2  
Old 09-01-2010, 08:37 AM
kinook kinook is online now
Administrator
 
Join Date: 03-06-2001
Location: Colorado
Posts: 6,034
See the step's vbld_StepDone script event code (show the step properties dialog and click the Script Editor button).
Reply With Quote
  #3  
Old 09-01-2010, 08:56 AM
ChrisF ChrisF is online now
Registered User
 
Join Date: 12-09-2009
Posts: 67
So it does the following (pseudo-code)

if has-missing-files OR has-out-of-date-files OR last-build-failed
NEED_TO_BUILD = yes

correct?

I call a *.bld script to build of course. Does that script have to explicitly return a "true" bool it passes build, or does it just automagically do that?
Reply With Quote
  #4  
Old 09-01-2010, 09:51 AM
kinook kinook is online now
Administrator
 
Join Date: 03-06-2001
Location: Colorado
Posts: 6,034
Quote:
Originally posted by ChrisF
So it does the following (pseudo-code)

if has-missing-files OR has-out-of-date-files OR last-build-failed
NEED_TO_BUILD = yes

correct?
Yes.

Quote:
I call a *.bld script to build of course. Does that script have to explicitly return a "true" bool it passes build, or does it just automagically do that?
The exit code of the chained project instance will automatically be set (and handled by the VisBuildPro Project action) based on success/failure of the build.
Reply With Quote
  #5  
Old 09-01-2010, 10:33 AM
ChrisF ChrisF is online now
Registered User
 
Join Date: 12-09-2009
Posts: 67
Thanks!
Reply With Quote
  #6  
Old 09-23-2010, 10:24 AM
ChrisF ChrisF is online now
Registered User
 
Join Date: 12-09-2009
Posts: 67
A follow up question.

I do a full build (check out everything, build everything) at 1:00am every day. I want the full build to happen at exactly the same time everyday. If that build passes, I just want to do incremental builds subsequently for the remainder of the day. Then the cycle repeats daily.

How can I ensure that the incremental builds do not overlap with the full build? In other words, it's conceivable that an incremental build starts at 11:59pm and run for 1.5 hours.
Reply With Quote
  #7  
Old 09-23-2010, 10:28 AM
kinook kinook is online now
Administrator
 
Join Date: 03-06-2001
Location: Colorado
Posts: 6,034
If you're using a continuously running build like the sample, it won't start one build while another is building. If you're using another method like a scheduled task, you could use the technique shown in the SingleInstance.bld sample to ensure only one build runs at a given time.
http://www.kinook.com/VisBuildPro/Ma...ancesample.htm
Reply With Quote
  #8  
Old 09-23-2010, 10:41 AM
ChrisF ChrisF is online now
Registered User
 
Join Date: 12-09-2009
Posts: 67
I'm doing a hybrid of both.

To ensure a build at 1:00am, I have to do a scheduled task. To do subsequent builds, I do a continuous integration build, per your sample file.
Reply With Quote
  #9  
Old 09-23-2010, 10:43 AM
kinook kinook is online now
Administrator
 
Join Date: 03-06-2001
Location: Colorado
Posts: 6,034
You could either modify your continuous integration build to also build after 1am if no builds today, or use the single instance technique in the continuous and scheduled builds.
Reply With Quote
  #10  
Old 09-23-2010, 10:48 AM
ChrisF ChrisF is online now
Registered User
 
Join Date: 12-09-2009
Posts: 67
Ok I'll play with that. I really want to guarantee a full build at 1:00am+, regardless of what happened before.
Reply With Quote
  #11  
Old 10-01-2010, 11:31 AM
ChrisF ChrisF is online now
Registered User
 
Join Date: 12-09-2009
Posts: 67
The continuous integration example checks the repository (Starteam in my case) for any changes and then runs a build if any. In my case I don't want to check the whole repository, but only two folders, say Folder1 and Folder2. I know I can set up two different steps to check each folder, but how can I OR the results of each step? Or is there yet a better way?
Reply With Quote
  #12  
Old 10-01-2010, 12:10 PM
kinook kinook is online now
Administrator
 
Join Date: 03-06-2001
Location: Colorado
Posts: 6,034
Conditionally build the step that checks the 2nd folder only if %NEED_TO_BUILD% equals no.
Reply With Quote
  #13  
Old 10-01-2010, 12:28 PM
ChrisF ChrisF is online now
Registered User
 
Join Date: 12-09-2009
Posts: 67
Can't it be any simpler than that! Thanks!
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



All times are GMT -5. The time now is 12:43 PM.


Copyright © 1999-2023 Kinook Software, Inc.