Blob Blame History Raw
From 8e926f0c4967e392f105dcebcfa756e58ad81f93 Mon Sep 17 00:00:00 2001
From: Vadim Rutkovsky <vrutkovs@redhat.com>
Date: Sep 21 2016 17:44:35 +0000
Subject: container-build: use correct parameter for git branch


Signed-off-by: Vadim Rutkovsky <vrutkovs@redhat.com>

---

diff --git a/src/pyrpkg/__init__.py b/src/pyrpkg/__init__.py
index e6105b1..282a59f 100644
--- a/src/pyrpkg/__init__.py
+++ b/src/pyrpkg/__init__.py
@@ -2453,7 +2453,8 @@ class Commands(object):
         git_uri = re.sub(r"^git\+ssh", "git", self.push_url)
         git_uri = re.sub("^ssh", "git", git_uri)
         git_uri = re.sub("[^/]+@", "", git_uri)
-        git_ref = self.branch_merge
+        git_ref = self.commithash
+        git_branch = self.branch_merge
         user = self.user
         component = self.module_name
         docker_target = self.target
@@ -2465,6 +2466,7 @@ class Commands(object):
         build = osbs.create_build(
             git_uri=git_uri,
             git_ref=git_ref,
+            git_branch=git_branch,
             user=user,
             component=component,
             target=docker_target,
@@ -2529,7 +2531,7 @@ class Commands(object):
 
             task_opts = {}
             for key in ('scratch', 'name', 'version', 'release',
-                        'yum_repourls'):
+                        'yum_repourls', 'git_branch'):
                 if key in opts:
                     task_opts[key] = opts[key]
             priority = opts.get("priority", None)
diff --git a/src/pyrpkg/cli.py b/src/pyrpkg/cli.py
index 09dca49..a38b79d 100755
--- a/src/pyrpkg/cli.py
+++ b/src/pyrpkg/cli.py
@@ -1084,7 +1084,8 @@ see API KEY section of copr-cli(1) man page.
 
         opts = {"scratch": self.args.scratch,
                 "quiet": self.args.q,
-                "yum_repourls": self.args.repo_url}
+                "yum_repourls": self.args.repo_url,
+                "git_branch": self.cmd.branch_merge}
 
         section_name = "%s.container-build" % self.name
         err_msg = "Missing {option} option in [{plugin.section}] section. "\