Merge lp:~abentley/charms/precise/juju-reports/charm-bundle-test-token into lp:~juju-qa/charms/precise/juju-reports/trunk

Proposed by Aaron Bentley
Status: Merged
Merged at revision: 41
Proposed branch: lp:~abentley/charms/precise/juju-reports/charm-bundle-test-token
Merge into: lp:~juju-qa/charms/precise/juju-reports/trunk
Diff against target: 42 lines (+8/-2)
2 files modified
config.yaml (+4/-0)
hooks/common.py (+4/-2)
To merge this branch: bzr merge lp:~abentley/charms/precise/juju-reports/charm-bundle-test-token
Reviewer Review Type Date Requested Status
Curtis Hovey (community) code Approve
Review via email: mp+230351@code.launchpad.net

Commit message

Add charm-bundle-test-token config option.

Description of the change

This branch implements a charm-bundle-test-token config value, so that the juju-reports machine can trigger builds of charm-bundle-test.

To post a comment you must log in.
Revision history for this message
Curtis Hovey (sinzui) wrote :

Thank you.

review: Approve (code)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'config.yaml'
--- config.yaml 2014-07-18 20:19:59 +0000
+++ config.yaml 2014-08-11 16:43:59 +0000
@@ -48,3 +48,7 @@
48 type: string48 type: string
49 default: ""49 default: ""
50 description: "The secret key to use for the s3 bucket."50 description: "The secret key to use for the s3 bucket."
51 charm-bundle-test-token:
52 type: string
53 default: ""
54 description: "The build token for the charm-bundle-test job."
5155
=== modified file 'hooks/common.py'
--- hooks/common.py 2014-07-22 16:35:33 +0000
+++ hooks/common.py 2014-08-11 16:43:59 +0000
@@ -34,7 +34,7 @@
34 return os.path.join(PROJECT_DIR, 'resources/{}.template'.format(name))34 return os.path.join(PROJECT_DIR, 'resources/{}.template'.format(name))
3535
3636
37def install_ini(mongo_url, gh_token, jujuci_url):37def install_ini(mongo_url, gh_token, jujuci_url, token):
38 config = ConfigParser()38 config = ConfigParser()
39 path = get_template_path(INI)39 path = get_template_path(INI)
40 if not os.path.exists(path):40 if not os.path.exists(path):
@@ -43,6 +43,7 @@
43 config.set('app:main', 'mongo.url', mongo_url)43 config.set('app:main', 'mongo.url', mongo_url)
44 config.set('app:main', 'gh_token', gh_token)44 config.set('app:main', 'gh_token', gh_token)
45 config.set('app:main', 'jujuci.url', jujuci_url)45 config.set('app:main', 'jujuci.url', jujuci_url)
46 config.set('app:main', 'charm_bundle_test_token', token)
46 config.set('app:main', 'home', HOME)47 config.set('app:main', 'home', HOME)
47 config.write(open(get_ini_path(), 'w'))48 config.write(open(get_ini_path(), 'w'))
48 return config49 return config
@@ -257,7 +258,8 @@
257 if mongo_url == '':258 if mongo_url == '':
258 hookenv.log('No mongodb set up.')259 hookenv.log('No mongodb set up.')
259 return260 return
260 ini = install_ini(mongo_url, config['gh-token'], config['jujuci-url'])261 ini = install_ini(mongo_url, config['gh-token'], config['jujuci-url'],
262 config['charm-bundle-test-token'])
261 configure_s3(config)263 configure_s3(config)
262 for key in ['lp-key', 'lp-oauth', 'gh-token']:264 for key in ['lp-key', 'lp-oauth', 'gh-token']:
263 if config[key] == '':265 if config[key] == '':

Subscribers

People subscribed via source and target branches

to all changes: