From 275ac110a553ef1370eb29ed215bdc7a841206e9 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Thibaut=20VAR=C3=88NE?= Date: Thu, 21 Jun 2018 18:39:41 +0200 Subject: [PATCH] phase1: remove redundant git steps and document MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Based on buildbot documentation and the contents of `buildbot/steps/source/git.py' Signed-off-by: Thibaut VARÈNE --- phase1/master.cfg | 26 +++++--------------------- 1 file changed, 5 insertions(+), 21 deletions(-) diff --git a/phase1/master.cfg b/phase1/master.cfg index c856cf3..a184f4b 100644 --- a/phase1/master.cfg +++ b/phase1/master.cfg @@ -482,24 +482,18 @@ for target in targets: doStepIf = IsMakeCleanRequested(tuple[0]) )) - # switch to branch - factory.addStep(ShellCommand( - name = "switchbranch", - description = "Checking out Git branch", - command = "if [ -d .git ]; then git fetch && git checkout '%s'; else exit 0; fi" % repo_branch, - haltOnFailure = True, - doStepIf = IsNoTaggingRequested, - locks = NetLockDl, - )) - # check out the source - # method clean runs 'git clean -d -f', method fresh runs 'git clean -d -f x'. Only works with mode='full' + # Git() runs: + # if repo doesn't exist: 'git clone repourl' + # method 'clean' runs 'git clean -d -f', method fresh runs 'git clean -d -f x'. Only works with mode='full' + # 'git fetch -t repourl branch; git reset --hard revision' factory.addStep(Git( repourl = repo_url, branch = repo_branch, mode = 'full', method = 'clean', locks = NetLockDl, + haltOnFailure = True, )) # update remote refs @@ -510,16 +504,6 @@ for target in targets: haltOnFailure = True )) - # fetch tags - factory.addStep(ShellCommand( - name = "fetchtag", - description = "Fetching Git tags", - command = ["git", "fetch", "--tags", "--", repo_url], - haltOnFailure = True, - doStepIf = IsTaggingRequested, - locks = NetLockDl, - )) - # switch to tag factory.addStep(ShellCommand( name = "switchtag", -- 2.30.2