launchpad-reviewers team mailing list archive
-
launchpad-reviewers team
-
Mailing list archive
-
Message #28299
[Merge] ~cjwatson/launchpad:cibuildbehaviour-fix-git-arguments into launchpad:master
Colin Watson has proposed merging ~cjwatson/launchpad:cibuildbehaviour-fix-git-arguments into launchpad:master.
Commit message:
Fix git arguments passed to CI builds
Requested reviews:
Launchpad code reviewers (launchpad-reviewers)
For more details, see:
https://code.launchpad.net/~cjwatson/launchpad/+git/launchpad/+merge/418544
`CIBuildBehaviour` was passing the commit ID to builders using the fictitious `commit_sha1` argument. Since this is just intended to be passed to `git checkout`, it doesn't make sense to invent a new name for it; it can just use the same `git_path` argument that's used for passing branch and tag names to other build types.
This also requires https://code.launchpad.net/~cjwatson/launchpad-buildd/+git/launchpad-buildd/+merge/418543 in order to work properly (though it can land first since CI builds are currently broken due to this pair of issues anyway).
--
Your team Launchpad code reviewers is requested to review the proposed merge of ~cjwatson/launchpad:cibuildbehaviour-fix-git-arguments into launchpad:master.
diff --git a/lib/lp/code/model/cibuildbehaviour.py b/lib/lp/code/model/cibuildbehaviour.py
index 7cd13a0..4f9d92e 100644
--- a/lib/lp/code/model/cibuildbehaviour.py
+++ b/lib/lp/code/model/cibuildbehaviour.py
@@ -115,7 +115,7 @@ class CIBuildBehaviour(BuilderProxyMixin, BuildFarmJobBehaviourBase):
self, build.distro_arch_series, None, logger=logger))
args["jobs"] = stages
args["git_repository"] = build.git_repository.git_https_url
- args["commit_sha1"] = build.commit_sha1
+ args["git_path"] = build.commit_sha1
args["private"] = build.is_private
return args
diff --git a/lib/lp/code/model/tests/test_cibuildbehaviour.py b/lib/lp/code/model/tests/test_cibuildbehaviour.py
index 9e3b904..091c7be 100644
--- a/lib/lp/code/model/tests/test_cibuildbehaviour.py
+++ b/lib/lp/code/model/tests/test_cibuildbehaviour.py
@@ -274,8 +274,8 @@ class TestAsyncCIBuildBehaviour(StatsMixin, TestCIBuildBehaviourBase):
"archives": Equals(expected_archives),
"arch_tag": Equals("i386"),
"build_url": Equals(canonical_url(job.build)),
- "commit_sha1": Equals(job.build.commit_sha1),
"fast_cleanup": Is(True),
+ "git_path": Equals(job.build.commit_sha1),
"git_repository": Equals(job.build.git_repository.git_https_url),
"jobs": Equals([[("test", 0)]]),
"private": Is(False),