phase1: manually fetch remote Git refs
[buildbot.git] / phase1 / master.cfg
index e73f31dd8e7fd7aa679c5c14a5328eaae9ffd885..b9bbf1214839ee08e410e7a3c48c1b66473f0632 100644 (file)
@@ -206,6 +206,7 @@ def GetVersionPrefix(props):
 c['builders'] = []
 
 dlLock = locks.SlaveLock("slave_dl")
+tagLock = locks.MasterLock("make_tag")
 
 checkBuiltin = re.sub('[\t\n ]+', ' ', """
        checkBuiltin() {
@@ -309,7 +310,8 @@ for target in targets:
                path = home_dir+'/source.git',
                env = {'GNUPGHOME': gpg_home},
                haltOnFailure = True,
-               doStepIf = IsTaggingRequested
+               doStepIf = IsTaggingRequested,
+               locks = [tagLock.access('exclusive')]
        ))
 
        # switch to branch
@@ -328,6 +330,14 @@ for target in targets:
                mode = 'incremental',
                method = 'clean'))
 
+       # update remote refs
+       factory.addStep(ShellCommand(
+               name = "fetchrefs",
+               description = "Fetching Git remote refs",
+               command = ["git", "fetch", "origin", "+refs/heads/%s:refs/remotes/origin/%s" %(repo_branch, repo_branch)],
+               haltOnFailure = True
+       ))
+
        # fetch tags
        factory.addStep(ShellCommand(
                name = "fetchtag",