diff --git a/tcp_tests/managers/jenkins/__init__.py b/tcp_tests/managers/jenkins/__init__.py
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/tcp_tests/managers/jenkins/__init__.py
diff --git a/tcp_tests/managers/jenkins/client.py b/tcp_tests/managers/jenkins/client.py
new file mode 100644
index 0000000..f781305
--- /dev/null
+++ b/tcp_tests/managers/jenkins/client.py
@@ -0,0 +1,65 @@
+import time
+
+import jenkins
+
+from devops.helpers import helpers
+
+
+class JenkinsClient(object):
+
+    def __init__(self, host=None, username=None, password=None):
+        host = host or 'http://172.16.44.33:8081'
+        username = username or 'admin'
+        password = password or 'r00tme'
+        self.__client = jenkins.Jenkins(
+            host,
+            username=username,
+            password=password)
+
+    def jobs(self):
+        return self.__client.get_jobs()
+
+    def find_jobs(self, name):
+        return filter(lambda x: name in x['fullname'], self.jobs())
+
+    def job_info(self, name):
+        return self.__client.get_job_info(name)
+
+    def list_builds(self, name):
+        return self.job_info(name).get('builds')
+
+    def build_info(self, name, build_id):
+        return self.__client.get_build_info(name, build_id)
+
+    def job_params(self, name):
+        job = self.job_info(name)
+        job_params = next(
+            p for p in job['property'] if
+            'hudson.model.ParametersDefinitionProperty' == p['_class'])
+        job_params = job_params['parameterDefinitions']
+        return job_params
+
+    def make_defults_params(self, name):
+        job_params = self.job_params(name)
+        def_params = dict(
+            [(j['name'], j['defaultParameterValue']['value'])
+             for j in job_params])
+        return def_params
+
+    def run_build(self, name, params=None):
+        params = params or self.make_defults_params(name)
+        self.__client.build_job(name, params)
+        time.sleep(10)  # wait while jobs started:
+        build_id = self.job_info(name)['lastBuild']['number']
+        return name, build_id
+
+    def wait_end_of_build(self, name, build_id, timeout=600):
+
+        def building():
+            return not self.build_info(name, build_id)['building']
+
+        helpers.wait(
+            building,
+            timeout=timeout,
+            timeout_msg='Timeout waiting, job {0} are not finished "{1}" build'
+                        ' still'.format(name, build_id))
