[yocto] [yocto-autobuilder][PATCH 2/2] publish build artifacts for wic images

Bill Randle william.c.randle at intel.com
Wed Jul 6 13:16:40 PDT 2016


Publish the wic images created by the nightly-wic build so they are
available for QA testing.

[YOCTO #9397]

Signed-off-by: Bill Randle <william.c.randle at intel.com>
---
 buildset-config.controller/nightly-wic.conf        |  8 ++---
 .../autobuilder/buildsteps/PublishArtifacts.py     | 35 ++++++++++++++++------
 2 files changed, 28 insertions(+), 15 deletions(-)

diff --git a/buildset-config.controller/nightly-wic.conf b/buildset-config.controller/nightly-wic.conf
index 7d2ae88..27584cb 100644
--- a/buildset-config.controller/nightly-wic.conf
+++ b/buildset-config.controller/nightly-wic.conf
@@ -19,10 +19,6 @@ steps: [{'SetDest':{}},
         {'BuildImages':{'images':'core-image-sato'}},
         {'CreateWicImages':{'wic_img_type':'directdisk', 'target_img':'core-image-sato'}},
         {'CreateWicImages':{'wic_img_type':'directdisk-gpt', 'target_img':'core-image-sato'}},
-        {'CreateWicImages':{'wic_img_type':'mkefidisk', 'target_img':'core-image-sato'}}]
-
-
-
-
-
+        {'CreateWicImages':{'wic_img_type':'mkefidisk', 'target_img':'core-image-sato'}},
+        {'PublishArtifacts': {'artifacts': ['qemux86-64', 'genericx86-64']}}]
 
diff --git a/lib/python2.7/site-packages/autobuilder/buildsteps/PublishArtifacts.py b/lib/python2.7/site-packages/autobuilder/buildsteps/PublishArtifacts.py
index 952a458..f9df16c 100644
--- a/lib/python2.7/site-packages/autobuilder/buildsteps/PublishArtifacts.py
+++ b/lib/python2.7/site-packages/autobuilder/buildsteps/PublishArtifacts.py
@@ -174,7 +174,14 @@ class PublishArtifacts(ShellCommand):
                     artifact_name, deploy_image_dir = self.getDeployNames(artifact, buildername)
                     command += self.generateMD5cmd(artifact, deploy_image_dir)
                     command=command+"mkdir -p " + DEST + "/" + QEMU_PUBLISH_DIR + "/" + artifact_name + ";"
-                    command=command+"cp -R --no-dereference --preserve=links " + \
+                    if "-wic" in buildername:
+                        deploy_image_dir += "/*/*/build";
+                        command=command+"cp --no-dereference --preserve=links " + \
+                                    deploy_image_dir + "/*\.direct " + \
+                                    deploy_image_dir + "/*\.direct.md5sum " + \
+                                    DEST + "/" + QEMU_PUBLISH_DIR + "/" + artifact_name + ";"
+                    else:
+                        command=command+"cp -R --no-dereference --preserve=links " + \
                                     deploy_image_dir + \
                                     "/*" + artifact + "* " + DEST + "/" + QEMU_PUBLISH_DIR + "/" + artifact_name + ";"
                 elif "mpc8315e" in artifact:
@@ -213,18 +220,26 @@ class PublishArtifacts(ShellCommand):
                        "genericx86-64" in artifact:
                         command = command+"echo 'Skipping copy of genericx86-64.'; "
                     else:
-                        command=command+"mkdir -p " + DEST + "/"+ MACHINE_PUBLISH_DIR +"/" + artifact_name + ";"
-                        if "beagle" in artifact:
-                            command=command+"cp -R --no-dereference --preserve=links " + \
+                        command += self.generateMD5cmd(artifact, deploy_image_dir)
+                        if "-wic" in buildername:
+                            deploy_image_dir += "/*/*/build";
+                            command=command+"mkdir -p " + DEST + "/" + MACHINE_PUBLISH_DIR + "/" + artifact_name + ";"
+                            command=command+"cp --no-dereference --preserve=links " + \
+                                    deploy_image_dir + "/*\.direct " + \
+                                    deploy_image_dir + "/*\.direct.md5sum " + \
+                                    DEST + "/" + MACHINE_PUBLISH_DIR + "/" + artifact_name + ";"
+                        else:
+                            command=command+"mkdir -p " + DEST + "/"+ MACHINE_PUBLISH_DIR +"/" + artifact_name + ";"
+                            if "beagle" in artifact:
+                                command=command+"cp -R --no-dereference --preserve=links " + \
                                              deploy_image_dir + \
                                              "/*Image* " + DEST + "/" + MACHINE_PUBLISH_DIR +"/" + artifact_name + ";"
-                            command=command+"cp -R --no-dereference --preserve=links " + \
+                                command=command+"cp -R --no-dereference --preserve=links " + \
                                              deploy_image_dir + \
                                              "/u-boot* " + DEST + "/" + MACHINE_PUBLISH_DIR +"/" + artifact_name + ";"
-                        command=command+"cp -R --no-dereference --preserve=links " + \
+                            command=command+"cp -R --no-dereference --preserve=links " + \
                                          deploy_image_dir + \
                                          "/*"+artifact+"* " + DEST + "/" + MACHINE_PUBLISH_DIR +"/" + artifact_name + ";"
-                    command += self.generateMD5cmd(artifact, deploy_image_dir)
             self.command = command
         else:
             self.command = "echo 'Skipping Step.'"
@@ -241,8 +256,10 @@ class PublishArtifacts(ShellCommand):
         artifact_name = artifact
         if "-lsb" in buildername:
             artifact_name = artifact_name + "-lsb"
-        if artifact_name is "md5sums":
-            deploy_dir_image = os.path.join(self.tmpdir, "deploy/images/")
+        if "-wic" in buildername:
+            deploy_dir_image = os.path.join(os.path.join(self.tmpdir, "deploy/wic_images/"), artifact)
+        elif artifact_name is "md5sums":
+            deploy_dir_image = os.path.join(self.tmpdir, "deploy/images/")
         else:
             if self.layerversion_core is not None and int(self.layerversion_core) > 2:
                 deploy_dir_image = os.path.join(os.path.join(self.tmpdir, "deploy/images/"), artifact)
-- 
2.5.5




More information about the yocto mailing list