summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWill Holland <william.holland@codethink.co.uk>2015-09-23 12:25:31 +0100
committerWill Holland <william.holland@codethink.co.uk>2015-09-23 12:25:31 +0100
commit1bde6e0d46172b23beaa0c1e1d54fa1355d60e9c (patch)
treee00402676ec602cb0b6be2a36b331ac0a3293be2
parent79a8374fa8bdb2b94777089c110f27872228b099 (diff)
downloadciatlib-1bde6e0d46172b23beaa0c1e1d54fa1355d60e9c.tar.gz
Remove old files in wrong dir
-rw-r--r--__init__.py2
-rw-r--r--common.py10
-rw-r--r--master.py60
3 files changed, 0 insertions, 72 deletions
diff --git a/__init__.py b/__init__.py
deleted file mode 100644
index ccfe4e7..0000000
--- a/__init__.py
+++ /dev/null
@@ -1,2 +0,0 @@
-import common
-import master
diff --git a/common.py b/common.py
deleted file mode 100644
index 7a70a8b..0000000
--- a/common.py
+++ /dev/null
@@ -1,10 +0,0 @@
-def log(logfile,component,msg):
- ''' write message to log file with timestamp and script name '''
- import datetime
- _component = str(component)
- _msg = str(msg)
- dt = str(datetime.datetime.now()).split('.')[0]
- to_log = "[%s][%s] %s" % (dt, _component, _msg)
- log_file = open(LOGFILE,'a')
- log_file.write('%s\n' % to_log)
- log_file.close()
diff --git a/master.py b/master.py
deleted file mode 100644
index 0c43c91..0000000
--- a/master.py
+++ /dev/null
@@ -1,60 +0,0 @@
-from buildbot.process.factory import BuildFactory
-from buildbot.steps.shell import ShellCommand
-from buildbot.plugins import util
-from buildbot.plugins import steps
-Property = util.Property
-Git = steps.Git
-
-class Column:
-
- def add_get_definitions(self):
- ''' add a step fetch definitions '''
-
- default_ref = "cu010-trove/br6/firehose-test-1"
- sha = Property("sha",default=default_ref)
- get_defns_cmd = ['sh','get_definitions.sh',sha]
- shell_cmd = ShellCommand(command=get_defns_cmd,
- timeout=self.timeout)
- self.factory.addStep(shell_cmd)
-
- def format_cmd(self):
- ''' a buildbot shell command to pass the properties to trigger '''
-
- util_properties = []
- for property in self.properties:
- name = property[0]
- default_str = property[1]
- util_property = Property(name,default=default_str)
- util_properties.append(util_property)
- cmd = ['sh',self.trigger]+util_properties
- return ShellCommand(command=cmd,
- timeout=self.timeout)
-
- def __init__(self,
- name,
- source_repo,
- category,
- trigger,
- slavenames,
- properties,
- timeout=1200,
- get_definitions=False):
- ''' A worker in CIAT Orchestration which appears as a column in the
- buildbot waterfall '''
-
- self.name = name
- self.source_repo = source_repo
- self.category = category
- self.trigger = 'triggers/%s' % trigger
- self.slavenames = slavenames
- self.properties = properties
- self.timeout = timeout
- self.get_definitions = get_definitions
- self.factory = BuildFactory()
- self.factory.addStep(Git(
- repourl=self.source_repo,
- mode='incremental'))
- if self.get_definitions:
- self.add_get_definitions()
- self.cmd = self.format_cmd()
- self.factory.addStep(self.cmd)