]> Frank Brehm's Git Trees - profitbricks/jenkins-build-scripts.git/commitdiff
Revert "OFFICE-797: adding submodule handling"
authorMathias Klette <mathias.klette@profitbricks.com>
Tue, 3 Jan 2012 12:44:11 +0000 (13:44 +0100)
committerMathias Klette <mathias.klette@profitbricks.com>
Tue, 3 Jan 2012 12:44:11 +0000 (13:44 +0100)
This reverts commit 2c972c45ca8abd783fb0a06a7e769ecac8c2f852.

debian_build.py
lib/git_helper.py

index f042b00afafb55f6d052d6f3a2c51d2103e18117..5e6e26147fc3dc7a9ccf8edd8a10e7a9eb459dd7 100755 (executable)
@@ -269,13 +269,6 @@ if __name__ == '__main__':
         logger_loud_error('git checkout %s was not successfull' % GIT_UPSTREAM_BRANCH)
         exit_error()
 
-    # now let's update submodules
-    if git_helper.git_checkout_submodule():
-        logger.info('git submodule completed')
-    else:
-        logger_loud_error('git submodule failed')
-        exit_error()
-
     # we need to make sure our jenkins config is used, so let's delete any 
     # other config available in repository that might be prefered 
     cleanup_files = ('.gbp.conf', 'debian/gbp.conf', '.git/gbp.conf')
index fb3d74ebcaf54a5a85d100b55020ebd296e72c3d..f6020b548ebf5a3a40f344e88bef600345746806 100644 (file)
@@ -151,54 +151,6 @@ def git_checkout_branch(branch_name):
     )
     return True
 
-def git_checkout_submodule():
-    """
-    Initialize and update any submodules which are used in the repository.
-    Git wont throw any errors when no submodules are used, so we can do it 
-    every time.
-    """
-    cmd = [GIT, 'submodule', 'init']
-    cmdobj = subprocess.Popen(
-            cmd,
-            shell=False,
-            close_fds=True,
-            stdout=subprocess.PIPE,
-            stderr=subprocess.STDOUT,
-            env={'':''},
-            cwd=os.getcwd()
-    )
-    ret = cmdobj.wait()
-    out = cmdobj.stdout.read()
-    msg = '%s returned %s: ' % (' '.join(cmd), ret, out)
-
-    if ret:
-        logger.error(msg)
-        return False
-    else:
-        logger.info(msg)
-
-    cmd = [GIT, 'submodule', 'update']
-    cmdobj = subprocess.Popen(
-            cmd,
-            shell=False,
-            close_fds=True,
-            stdout=subprocess.PIPE,
-            stderr=subprocess.STDOUT,
-            env={'':''},
-            cwd=os.getcwd()
-    )
-    ret = cmdobj.wait()
-    out = cmdobj.stdout.read()
-    msg = '%s returned %s: ' % (' '.join(cmd), ret, out)
-
-    if ret:
-        logger.error(msg)
-        return False
-    else:
-        logger.info(msg)
-
-    return True
-
 def git_repo_has_branch(name):
     r = git.repo.Repo()
     for branch in r.branches: