<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
</head>
<body bgcolor="#ffffff" text="#000000">
Dear All,<br>
<br>
Bob is taking shape, he can now build images, package and upload the
results. I have not yet posted this to squeak-dev, because I havent got
time to handle a flood of enquireys just yet.<br>
<br>
Would anyone be willing to see if they can write the code to generate
one click images?<br>
<br>
cheers<br>
<br>
Keith<br>
<br>
====================<br>
Public Bob Server<br>
<br>
Bob is now running at bob.warwick.st where he has 160Gb of space
available for building in.<br>
His work is visible via <a class="moz-txt-link-freetext" href="http://bob.warwick.st">http://bob.warwick.st</a> and
<a class="moz-txt-link-freetext" href="ftp://squeak@bob.warwick.st">ftp://squeak@bob.warwick.st</a> (password is the same as the swiki).<br>
<br>
At present it is necessary to be able to see what Bob is doing because
Bob is not clever enough to spot or terminate builds that get stuck.
(An OSProcess waitForCommand:withTimeout: would be useful). Secondly it
is useful to debug as builds progress by enabling the stepping option.
Thirdly some builds are not YET entirely unattended (e.g. squeak-dev).<br>
<br>
To make this possible there is a vnc server running which allows remote
monitoring of Bob and the images which it launches. VNC is running on
display 1 (port 5901) password is the same as the squeak swiki (for
now).<br>
<br>
Bob can monitor squeaksource repositories rss feed and keep up to date
with changes in Monticello repositories, currently:<br>
<br>
1) &nbsp;&nbsp; "Packages" - where the published packages, and dependencies are
maintained.<br>
2)&nbsp;&nbsp;&nbsp; "Bob" - where build tasks, and build definitions are maintained.<br>
3)&nbsp;&nbsp;&nbsp;&nbsp; He also monitors "Mantis" for changes every 15 minutes.<br>
<br>
Every 3 Minutes, he runs all the build tasks. <br>
<br>
Each of the build tasks checks to see if any of their input images have
changed. Input images are usually in the form of a zip file as uploaded
to the final destination server (<a class="moz-txt-link-abbreviated" href="ftp://ftp.squeak.org">ftp.squeak.org</a>)<br>
<br>
This design, allows multiple Bob instances to run collaboratively in a
distributed fashion. Each Bob selects which builds it wants to make,
and whether or not it is responsible for doing the final upload. Thus
the Bob instances co-orperate, using the "creationTime" on the zip
files as a build triggering signal, as one uploads its completed build
zip, another downloads that zip for its own tasks.<br>
<br>
Installing Bob<br>
==========<br>
Bob will be a downloadable image, built by himself!<br>
<br>
Bob - Repositories/Packages<br>
====================<br>
<br>
Rio/File-Kernel<br>
Rio/File-Base - provides file handling<br>
Logging/Logging - provides logging front end<br>
Logging/SimpleLog - provides logging back end<br>
Sake/Sake - provides tasks and dependencies between builds<br>
Sake/Sake-Scheduler - periodic task execution<br>
Packages/Packages-Library - all the current package dependency
definitions<br>
Sake/Sake-Bob - the top level bob tasks<br>
Bob/Bob-Releases - user defined build tasks for official releases<br>
Bob/Bob-SomeProduct - user defined bob build tasks for your own
products (public)<br>
YourRepo/Bob-YourBuilds - user defined bob build tasks for your own
products (private - run bob yourself).<br>
<br>
Bob - Server Configuration <br>
===================<br>
<br>
All local configuration is done in class BobConfig, so if you are
running your own Bob build/test server you can save and load all local
settings as a class file out of BobConfig.<br>
<br>
examples:<br>
<small><br>
BobConfig class &gt;&gt; #configBaseDir<br>
<br>
&nbsp;&nbsp;&nbsp; ^ '/bob' asDirectory</small><br>
<br>
<small>BobConfig class &gt;&gt; #configVm<br>
<br>
&nbsp;&nbsp;&nbsp; "the mac vm doesnt like to be opened via a symbolic link"<br>
&nbsp;&nbsp;&nbsp; <br>
&nbsp;&nbsp;&nbsp; ^ '/bob/vm/Squeak\ 3.8.20beta1U.app/Contents/MacOS/Squeak\ VM\ Opt'</small><br>
<br>
etc etc etc....<br>
<br>
Bob - Build Customization<br>
===================<br>
<br>
Your image builds will be defined as subclasses of BobBuildImage, and
can be packaged and managed in the squeaksource/Bob repository. If a
Bob server instance is aware of your package, then he may do your
building for you. He will watch the Bob repository rss feed for
changes, and will respond accordingly.<br>
<br>
Defining a Build a) Metadata b) build script<br>
=================================<br>
<br>
Each build has a series of meta data methods, one per build number, e.g:<br>
<br>
<small>build0000<br>
<br>
&nbsp;&nbsp;&nbsp; info name: 'Squeak3.10.2-build'.<br>
&nbsp;&nbsp;&nbsp; info when: '2009-02-21T00:19:28.182+00:00'.<br>
&nbsp;&nbsp;&nbsp; <br>
&nbsp;&nbsp;&nbsp; info by: 'kph'.<br>
&nbsp;&nbsp;&nbsp; info image: '<a class="moz-txt-link-freetext" href="ftp://ftp.squeak.org/3.10/Squeak3.10.2*basic.zip">ftp://ftp.squeak.org/3.10/Squeak3.10.2*basic.zip</a>'.<br>
&nbsp;&nbsp;&nbsp; <br>
&nbsp;&nbsp;&nbsp; info stepping: true.<br>
&nbsp;&nbsp;&nbsp; info release: false.<br>
<br>
&nbsp;&nbsp;&nbsp; info upload:
'<a class="moz-txt-link-freetext" href="ssh://updates@squeakfoundation.org/var/www/files/3.11/3.10.2-build/">ssh://updates@squeakfoundation.org/var/www/files/3.11/3.10.2-build/</a>'.<br>
&nbsp;&nbsp;&nbsp; <br>
&nbsp;&nbsp;&nbsp; info comment: 'testing'.&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; <br>
<br>
&nbsp;&nbsp;&nbsp; "The code that follows is the central part of the script that is
used to build the image"<br>
""""""<br>
&nbsp;&nbsp;&nbsp; Installer install: 'Tasks'.<br>
""""""<br>
&nbsp;&nbsp;&nbsp; "self halt."<br>
&nbsp;&nbsp;&nbsp; Squeak310MakeBuildCandidate taskBuild run.</small><br>
&nbsp;&nbsp;&nbsp; <br>
The above method defines metadata which tells bob, what the build is
called, when to run it, where to obtain the starting image, whether to
put "self halts" in at convenient places for debugging, and where to
upload the results.<br>
<br>
When To Build - info when:<br>
=====================<br>
code in #isBuildNeeded articulates rules which allow you to.<br>
<br>
1) Build once at a specific time.<br>
2) Build if a specific file (specified as a url with wildcards
accepted) has changed.<br>
3) Build if the starting image zip file (specified as a url with
wildcards accepted) has changed.<br>
4) Build periodically every x, minutes/days.<br>
5) Build with a new explicit build number change<br>
6) Do not build.<br>
<br>
The rules are evaluated as follows:<br>
a) If the output directory does not exist do not build (6) ***<br>
b) If "info when" = false or #dont then do not build. (6)<br>
c) If "info when" is a time that is not up yet then do not build. (1)<br>
d) If "info when" is a file match whose file is not found then do not
build. (2)<br>
e) If "info image" zip file match is not found then do not build. (3)<br>
f) If the "info when" is a file match has changed since he last build,
then a new build is needed. (2)<br>
g) If the "info image" zip&nbsp; has changed since he last build, then a new
build is needed. (3)<br>
h) If the build number has changed a new build is needed. (5)<br>
i) If "info when" is a duration, build if the given time has passed
since the previous build. (4)<br>
j) When "info when" is a time, if the previous build is the same or
more modern do not build (1)<br>
<br>
If you run your own bob server he will attempt to build ALL of the
defined tasks EVERY 3 minutes or so.<br>
<br>
So your primary way for indicating which of the builds you want is to
create the output directory (option a) marked *** above.<br>
<br>
What To Build - #theScript<br>
====================<br>
<br>
<small>theScript<br>
<br>
&nbsp;&nbsp;&nbsp; script reset.<br>
&nbsp;&nbsp;&nbsp; <br>
&nbsp;&nbsp;&nbsp;&nbsp; self<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; scriptTranscriptLogToFileLoad; <br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; scriptTranscriptLogToFileStart;<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; scriptAddLPF;<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; scriptAddInfoScript;<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; scriptTranscriptLogToFileStop;<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; scriptSaveImageAndQuit: true</small><br>
<br>
<br>
The script is assembled using pre-prepared chunks like those above. You
can define #theScript for your builds.<br>
#scriptAddInfoScript, incorporates the script elements that are
appended to the metadata method.<br>
The script that this generates is written out and fed as an input to
the chosen image.<br>
<br>
e,g.<br>
<br>
<small><small><small>"self halt." HTTPSocket httpFileIn:
'installer.pbwiki.com/f/TranscriptToFile.cs'.<br>
!"self halt." Preferences setPreference: #logTranscriptToFile toValue:
true.<br>
!"self halt." HTTPSocket httpFileIn: 'installer.pbwiki.com/f/LPF.st'.<br>
!&nbsp;&nbsp;&nbsp; Installer install: 'Tasks'.<br>
<br>
!<br>
&nbsp;&nbsp;&nbsp; Squeak310MakeBuildCandidate taskBuild run.<br>
&nbsp;&nbsp;&nbsp; <br>
<br>
!"self halt." Preferences setPreference: #logTranscriptToFile toValue:
false.<br>
! | image resuming |<br>
"self halt."<br>
SystemVersion newVersion: 'Squeak3.10.2-build'.<br>
SystemVersion current date: '2009-02-21T02:03:58.358+00:00'
asDateAndTime.<br>
image := SmalltalkImage current.<br>
image cleanUpAllExcept: #(ChangeSet).<br>
resuming := image saveAs: '090221-0203_Squeak3.10.2-build.image'.<br>
resuming ifFalse: [ image snapshot: false andQuit: true ].<br>
<br>
!</small></small></small><br>
<br>
Note that when you write these script snippets they are expected to
have "self halt." in them at strategic points. If the "info stepping"
flag is set to true then these are uncommented.<br>
<br>
What To Build - Build order #dependsOn:<br>
==============================<br>
<br>
The tasks are run in an order which suits all of the dependencies
explicitly stated.<br>
<br>
self dependsOn: { BobBuild310Build build }<br>
<br>
Manually Running the build:<br>
=====================<br>
<br>
[ BobBuild taskBuildAll run ] fork.<br>
<br>
and if immediate uploading is turned off, #configUploadImmediately, a
manual upload can be performed later via.<br>
<br>
BobBuild310Dev upload run.<br>
<br>
<br>
<br>
<br>
</body>
</html>