Setting up buildbot on my local Mac has proved to be more difficult than I first realized. hwine has helped me out by modifying and sharing a script that helps to setup a new buildbot project called new-project.sh, and combining that with the create-staging-master script that can be found on the How To Setup a Personal Development Master, I think buildbot will be all setup on in my local dev environment pretty soon! However, I have run into some issues, which I already emailed hwine about, but I will rephrase them here.
- Downloaded new-project.sh and create-staging-master to ~/
- ./new-projects.sh Buildbot
- cd Buildbot; source bin/activate
cd buildbot-configs; ./test-masters.sh
- All tests passed
- cd ~
- Modify create-staging-master so that "my $basedir = '/builds/buildbot';" becomes "my $basedir = '/Users';" on line 39
sudo perl create-staging-master –username=jzeller –master-kind=build –config-only
This creates a new directory at ~/build1 which contains config.json
- More on this below, but I think the config.json file needs to be at ~/Buildbot/buildbot instead. However, when you run the script with the parameter –master-dir set to either Buildbot/ or Buildbot/buildbot, it complains that the directory already exists.
- This creates a new directory at ~/build1 which contains config.json
- Now that I want to see if it all works, I am trying to follow the Does It Work? section in the How To Setup a Personal Development Master wiki.
cd $BASEDIR/master; ln -sf ../buildbot-configs/mozilla/universal_master_sqlite.cfg; cd -
- Since $BASEDIR is not set by the 2 scripts you sent over, and the create-master.sh script in the Create a Build Master section sets it to /builds/buildbot/$USERNAME/build1, I go ahead and set it to BASEDIR=/Users/jzeller/Buildbot/buildbot
Again: cd $BASEDIR/master; ln -sf ../buildbot-configs/mozilla/universal_master_sqlite.cfg; cd -
- Successful… tried with BASEDIR=/Users/jzeller/Buildbot/ and it failed because there was no master directory in ~/Buildbot
- When attempting from ~/Buildbot/buildbot, this fails with: make: *** No rule to make target `checkconfig'. Stop.
- After speaking with aki (check scrollback on mozbuild), it seems as though the Makefile I had in ~/Buildbot/buildbot was just dev utils
- aki pointed me to the Makefile.master in buildbot-configs and I cp'd it to ~/Buildbot/buildbot and modified BUILDBOT=$(PWD)/bin/buildbot to be BUILDBOT=$(PWD)/../bin/buildbot
Again: make checkconfig
Fails in a different way:
(Buildbot)localhost:buildbot jzeller$ make checkconfig
cd master && /Users/jzeller/Buildbot/buildbot/../bin/buildbot checkconfig
Traceback (most recent call last):
File "/Users/jzeller/Buildbot/lib/python2.6/site-packages/buildbot-0.8.2-py2.6.egg/buildbot/scripts/runner.py", line 1042, in doCheckConfig
File "/Users/jzeller/Buildbot/lib/python2.6/site-packages/buildbot-0.8.2-py2.6.egg/buildbot/scripts/checkconfig.py", line 18, in __init__
File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/shutil.py", line 84, in copy
File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/shutil.py", line 50, in copyfile
with open(src, 'rb') as fsrc:
IOError: [Errno 2] No such file or directory: '/Users/jzeller/Buildbot/buildbot/master/master.cfg'
make: *** [checkconfig] Error 1
- (Buildbot)localhost:buildbot jzeller$ make checkconfig
I realized that the master.cfg found in ~/Buildbot/buildbot may be a faulty sym link, so I modified the command from step 10 and reran it with an absolute path: cd $BASEDIR/master; ln -sf /Users/jzeller/Buildbot/buildbot-configs/mozilla/universal_master_sqlite.cfg; cd -
- This gets the same Traceback as above
- Fails in a different way:
I am stuck at the make checkconfig step here, SO CLOSE. Here are a few other questions off the bat:
- config.json surely goes somewhere within the Buildbot base directory, but I am not sure where this would be appropriate. I attempted to set the –master-dir parameter to either Buildbot/ or Buildbot/buildbot, it complains that the directory already exists.
- aki is saying that I may have an easier time recreating the master, rather than modifying configs, however I am not sure how that relates to using these 2 scripts, new-project.sh and create-staging-master in tandum.
So for the moment this is where I am stuck, and I will be attempting to tackle this more on Friday.