Kinook Software Forum

Kinook Software Forum (https://www.kinook.com/Forum/index.php)
-   [VBP] General Discussion (https://www.kinook.com/Forum/forumdisplay.php?f=2)
-   -   Continuous integration (https://www.kinook.com/Forum/showthread.php?t=4640)

ChrisF 09-01-2010 08:32 AM

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!

kinook 09-01-2010 08:37 AM

See the step's vbld_StepDone script event code (show the step properties dialog and click the Script Editor button).

ChrisF 09-01-2010 08:56 AM

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?

kinook 09-01-2010 09:51 AM

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.

ChrisF 09-01-2010 10:33 AM

Thanks!

ChrisF 09-23-2010 10:24 AM

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.

kinook 09-23-2010 10:28 AM

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

ChrisF 09-23-2010 10:41 AM

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.

kinook 09-23-2010 10:43 AM

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.

ChrisF 09-23-2010 10:48 AM

Ok I'll play with that. I really want to guarantee a full build at 1:00am+, regardless of what happened before.

ChrisF 10-01-2010 11:31 AM

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?

kinook 10-01-2010 12:10 PM

Conditionally build the step that checks the 2nd folder only if %NEED_TO_BUILD% equals no.

ChrisF 10-01-2010 12:28 PM

Can't it be any simpler than that! :) Thanks!


All times are GMT -5. The time now is 04:23 AM.


Copyright © 1999-2023 Kinook Software, Inc.