diff mbox series

[yocto-autobuilder2,v2,2/3] builders: Add poky-ci-archive tag in build properties

Message ID 20250909-contrib-mathieu-build_props-v2-2-14b809f99dfa@bootlin.com
State New
Headers show
Series runconfig: Add build configuration as properties | expand

Commit Message

Mathieu Dubois-Briand Sept. 9, 2025, 2:31 p.m. UTC
Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com>
---
 builders.py                                             | 10 +++++++++-
 ...0001-builders-Do-not-create-tags-during-builds.patch | 17 +++++++++++++----
 2 files changed, 22 insertions(+), 5 deletions(-)
diff mbox series

Patch

diff --git a/builders.py b/builders.py
index e4763d5325aa..0fa6e0035385 100644
--- a/builders.py
+++ b/builders.py
@@ -307,6 +307,12 @@  def create_parent_builder_factory(buildername, waitname):
         ],
         haltOnFailure=True,
         name="Prepare shared repositories"))
+    factory.addStep(steps.SetProperty(
+        property="poky-ci-archive_tag", value=createBuildTag))
+    tagurl = util.Interpolate('https://git.yoctoproject.org/poky-ci-archive/log/?h=%(kw:tag)s',
+                              tag=createBuildTag)
+    factory.addStep(steps.SetProperty(
+        property="poky-ci-archive_url", value=tagurl))
     factory.addStep(steps.SetProperty(
         property="sharedrepolocation",
         value=util.Interpolate("{}/%(prop:buildername)s-%(prop:buildnumber)s".format(config.sharedrepodir))
@@ -358,7 +364,9 @@  def create_parent_builder_factory(buildername, waitname):
             "milestone_number": util.Property("milestone_number"),
             "rc_number": util.Property("rc_number"),
             "yp_build_revision": util.Property("yp_build_revision"),
-            "yp_build_branch": util.Property("yp_build_branch")
+            "yp_build_branch": util.Property("yp_build_branch"),
+            "poky-ci-archive_tag": util.Property("poky-ci-archive_tag"),
+            "poky-ci-archive_url": util.Property("poky-ci-archive_url")
         }
 
         for repo in config.buildertorepos[buildername]:
diff --git a/docker/yocto-autobuilder2_patches/0001-builders-Do-not-create-tags-during-builds.patch b/docker/yocto-autobuilder2_patches/0001-builders-Do-not-create-tags-during-builds.patch
index 65b428caa1fc..8448e58e3ad6 100644
--- a/docker/yocto-autobuilder2_patches/0001-builders-Do-not-create-tags-during-builds.patch
+++ b/docker/yocto-autobuilder2_patches/0001-builders-Do-not-create-tags-during-builds.patch
@@ -5,14 +5,14 @@  Subject: [PATCH 1/2] builders: Do not create tags during builds
 
 Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com>
 ---
- builders.py | 1 -
- 1 file changed, 1 deletion(-)
+ builders.py | 7 -------
+ 1 file changed, 7 deletions(-)
 
 diff --git a/builders.py b/builders.py
-index b4c08fa1f29c..4e10bdceedb2 100644
+index 0fa6e0035385..a264a9ec5c7e 100644
 --- a/builders.py
 +++ b/builders.py
-@@ -284,7 +284,6 @@ def create_parent_builder_factory(buildername, waitname):
+@@ -303,16 +303,9 @@ def create_parent_builder_factory(buildername, waitname):
              util.Interpolate("%(prop:builddir)s/layerinfo.json"),
              util.Interpolate("{}/%(prop:buildername)s-%(prop:buildnumber)s".format(config.sharedrepodir)),
              "-p", get_publish_dest,
@@ -20,6 +20,15 @@  index b4c08fa1f29c..4e10bdceedb2 100644
          ],
          haltOnFailure=True,
          name="Prepare shared repositories"))
+-    factory.addStep(steps.SetProperty(
+-        property="poky-ci-archive_tag", value=createBuildTag))
+-    tagurl = util.Interpolate('https://git.yoctoproject.org/poky-ci-archive/log/?h=%(kw:tag)s',
+-                              tag=createBuildTag)
+-    factory.addStep(steps.SetProperty(
+-        property="poky-ci-archive_url", value=tagurl))
+     factory.addStep(steps.SetProperty(
+         property="sharedrepolocation",
+         value=util.Interpolate("{}/%(prop:buildername)s-%(prop:buildnumber)s".format(config.sharedrepodir))
 -- 
 2.39.5