~gary/charms/oneiric/buildbot-master/dynamic-relationship

« back to all changes in this revision

Viewing changes to hooks/start

  • Committer: Brad Crittenden
  • Date: 2012-02-03 14:21:51 UTC
  • mfrom: (8.1.11 wip)
  • Revision ID: bac@canonical.com-20120203142151-1xdzrpqismvjefpm
[r=gary_poster] Fix config-changed to save state and only modify items that have changed.  More helpers and tests.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
#!/usr/bin/python
2
2
 
3
 
from helpers import command, Config, run
4
 
 
5
 
log = command('juju-log')
 
3
from helpers import (
 
4
    command,
 
5
    get_config,
 
6
    log,
 
7
    run,
 
8
    )
6
9
 
7
10
# Log the fact that we're about to begin the start step.
8
11
log('--> start')
9
12
 
10
 
config = Config()
11
 
buildbot_dir =  config['installdir']
12
 
run('buildbot', 'start', buildbot_dir)
 
13
config = get_config()
 
14
buildbot_dir =  config.get('installdir')
 
15
# Actually starting the buildbot happens in config-changed.
13
16
run('open-port', '8010/TCP')
14
17
 
15
18
# Log the fact that the start step is done.