diff mbox series

[yocto-autobuilder-helper] prepare-shared-repos: Add tag for separate gits

Message ID 20251017-contrib-mathieu-oe-core-tag-v1-1-9ed5059cde28@bootlin.com
State New
Headers show
Series [yocto-autobuilder-helper] prepare-shared-repos: Add tag for separate gits | expand

Commit Message

Mathieu Dubois-Briand Oct. 17, 2025, 8:20 a.m. UTC
As poky is no longer used, add tags for openembedded-core, bitbake and
meta-yocto. We continue to use the same poky-ci-archive repo.

Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com>
---
PLEASE DO NOT MERGE!

Only merge this once oe-core and bitbake master branches have been
pushed on poky-ci-archive, as we need to bypass push checks to do that.
---
 scripts/prepare-shared-repos | 3 ++-
 scripts/utils.py             | 5 +++--
 2 files changed, 5 insertions(+), 3 deletions(-)


---
base-commit: 63f4e3954ff26cfd753c3c21f094b751978dda3e
change-id: 20251017-contrib-mathieu-oe-core-tag-4c244fa417d3

Best regards,

Comments

Mathieu Dubois-Briand Oct. 18, 2025, 1:39 p.m. UTC | #1
On Fri Oct 17, 2025 at 10:20 AM CEST, Mathieu Dubois-Briand wrote:
> As poky is no longer used, add tags for openembedded-core, bitbake and
> meta-yocto. We continue to use the same poky-ci-archive repo.
>
> Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com>
> ---
> PLEASE DO NOT MERGE!
>
> Only merge this once oe-core and bitbake master branches have been
> pushed on poky-ci-archive, as we need to bypass push checks to do that.
> ---

I confirm this is now ready to merge on my side.
diff mbox series

Patch

diff --git a/scripts/prepare-shared-repos b/scripts/prepare-shared-repos
index a510a4fd0cf4..8ffc2c501571 100755
--- a/scripts/prepare-shared-repos
+++ b/scripts/prepare-shared-repos
@@ -17,6 +17,7 @@  import tempfile
 import utils
 
 poky_tag_remote = "git@push.yoctoproject.org:poky-ci-archive"
+tagged_repos = {"bitbake", "oecore", "meta-yocto"}
 
 parser = utils.ArgParser(description='Iterates over a set of repositories in a json file and sets up a shared directory containing them.')
 
@@ -55,7 +56,7 @@  with tempfile.TemporaryDirectory(prefix="shared-repo-temp-", dir="/home/pokybuil
             utils.fetchgitrepo(tempdir, repo, repos[repo], stashdir, depth=1)
         if args.publish_dir:
             utils.publishrepo(tempdir, repo, args.publish_dir)
-        if repo == "poky" and args.tag:
+        if repo in tagged_repos and args.tag:
             utils.taggitrepo(tempdir, repo, repos[repo], poky_tag_remote, args.tag)
 
     utils.printheader("Creating shared src tarball")
diff --git a/scripts/utils.py b/scripts/utils.py
index efc7c991181e..a4de27e71722 100644
--- a/scripts/utils.py
+++ b/scripts/utils.py
@@ -283,10 +283,11 @@  def fetchgitrepo(clonedir, repo, params, stashdir, depth=None):
 def taggitrepo(clonedir, repo, params, tagremote, tagname):
     sharedrepo = "%s/%s" % (clonedir, repo)
     revision = params["revision"]
+    tag = f"{repo}/{tagname}"
     print("Creating tag...")
-    subprocess.check_call(["git", "tag", tagname, revision], cwd=sharedrepo)
+    subprocess.check_call(["git", "tag", tag, revision], cwd=sharedrepo)
     print("Pushing tag...")
-    subprocess.check_call(["git", "push", tagremote, tagname], cwd=sharedrepo)
+    subprocess.check_call(["git", "push", tagremote, tag], cwd=sharedrepo)
 
 def publishrepo(clonedir, repo, publishdir):
     sharedrepo = "%s/%s" % (clonedir, repo)