[asterisk-scf-commits] asterisk-scf/integration/testsuite.git branch "review" updated.

Commits to the Asterisk SCF project code repositories asterisk-scf-commits at lists.digium.com
Wed Jun 1 16:15:13 CDT 2011


branch "review" has been updated
       via  8607ad6c34fb073ac6e6ec2ce7d4644eb6b20040 (commit)
      from  c9b2ce9797cd5878e5a6b1ea9e5372efa1fe567e (commit)

Summary of changes:
 remote.py |    9 +++++----
 1 files changed, 5 insertions(+), 4 deletions(-)


- Log -----------------------------------------------------------------
commit 8607ad6c34fb073ac6e6ec2ce7d4644eb6b20040
Author: Darren Sessions <dsessions at digium.com>
Date:   Wed Jun 1 16:15:11 2011 -0500

    minor tweak to chown the directories on the build machine so that they work properly with the bamboo agent.

diff --git a/remote.py b/remote.py
index 57e5860..c41ac75 100755
--- a/remote.py
+++ b/remote.py
@@ -33,6 +33,8 @@ class RemoteManagement(object):
     def __init__(self):
         if not os.path.exists('%s/tmp' % cwd):
             os.makedirs('%s/tmp' % cwd)
+        if not os.path.exists('%s/artifacts' % cwd):
+            os.makedirs('%s/artifacts' % cwd)
 
     def listProcesses(self):
         list = {}
@@ -87,17 +89,13 @@ class RemoteManagement(object):
     def stop(self, data):
         if not 'plugin' in data and not 'label' in data:
             return {'success':False,'msg':'A plugin name and label must be provided to stop a process.'}
-
         if not 'subprocess' in processList[data['plugin']][data['label']]:
             return {'success':False,'msg':'Process information does not exist for "%s" in the "%s" process list.' % (data['label'], data['plugin'])}
-
         p = processList[data['plugin']][data['label']]['subprocess']
-
         try:
             os.kill(p.pid, 9)
         except:
             return {'success':False,"msg":"Unable to kill pid # %d" % pid}
-
         return {'success':True}
 
     def shutdown(self, plugin):
@@ -179,6 +177,9 @@ class RemoteManagement(object):
         if not os.path.exists("%s" % dn):
             return {'success':False,'msg':'The %s path does not exist.' % dn}
         os.chdir('%s/tmp' % cwd)
+        results = self.run('remote', 'archiveDir', [self._which('chown'), '-R', 'bamboo:bamboo', '%s' % dn], True)
+        if results['success'] == False:
+            return results
         results = self.run('remote', 'archiveDir', [self._which('tar'), '-cvf', 'tmp.tar', '%s' % dn], True)
         if results['success'] == False:
             return results

-----------------------------------------------------------------------


-- 
asterisk-scf/integration/testsuite.git



More information about the asterisk-scf-commits mailing list