]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
workunit: allow tag to override sha1
authorLoic Dachary <ldachary@redhat.com>
Sun, 6 Dec 2015 11:30:13 +0000 (12:30 +0100)
committerLoic Dachary <ldachary@redhat.com>
Fri, 11 Dec 2015 11:34:04 +0000 (12:34 +0100)
The sha1 for the workunit task is always set by the suite.py task. The
tag must be checked before the sha1 othewise it cannot be used to
override the sha1.

Signed-off-by: Loic Dachary <loic@dachary.org>
(cherry picked from commit 7de33f082e7d7108036912d9ce2076fd309d6cd2)

tasks/workunit.py

index 548fc5898b8118b3b8940d5989bb63f0a76a0e63..943456b73283bcd442c8790ce9ebf662b4e94a32 100644 (file)
@@ -69,10 +69,10 @@ def task(ctx, config):
     misc.deep_merge(config, overrides.get('workunit', {}))
 
     refspec = config.get('branch')
-    if refspec is None:
-        refspec = config.get('sha1')
     if refspec is None:
         refspec = config.get('tag')
+    if refspec is None:
+        refspec = config.get('sha1')
     if refspec is None:
         refspec = 'HEAD'