~psivaa/uci-engine/lander-jenkins-sub-charm-with-plugin

« back to all changes in this revision

Viewing changes to charms/precise/lander-jenkins/hooks/hooks.py

  • Committer: Parameswaran Sivatharman
  • Date: 2014-04-13 17:43:52 UTC
  • Revision ID: para.siva@canonical.com-20140413174352-7qwq92p2fm0qmoyw
Include plugins in lander-jenkins-sub charm pep8 fixes

Show diffs side-by-side

added added

removed removed

Lines of Context:
21
21
NUM_EXECUTORS_LINE = '  <numExecutors>{}</numExecutors>\n'
22
22
PLUGIN_LOCAL = os.path.join(os.environ['CHARM_DIR'], 'files/plugins')
23
23
 
 
24
 
24
25
def juju_info(msg, level='INFO'):
25
26
    core.hookenv.log(msg, level)
26
27
 
164
165
            plugin_file = os.path.join(JENKINS_HOME, 'plugins', plugin_file)
165
166
            cmd = ['wget', '-O', plugin_file, url]
166
167
            subprocess.check_call(cmd)
167
 
        
168
 
        
 
168
 
169
169
        cmd = ['chown', '-R', '{}.{}'.format(JENKINS_USER, JENKINS_GROUP),
170
170
               plugin_file]
171
171
        subprocess.check_call(cmd)