All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Randle, William C" <william.c.randle@intel.com>
To: "joshua.g.lock@linux.intel.com" <joshua.g.lock@linux.intel.com>,
	"yocto@yoctoproject.org" <yocto@yoctoproject.org>
Subject: Re: [yocto-autobuilder][PATCH 2/2] publish build artifacts for wic images
Date: Thu, 14 Jul 2016 14:49:58 +0000	[thread overview]
Message-ID: <1468507798.3100.47.camel@intel.com> (raw)
In-Reply-To: <1468489117.2701.4.camel@linux.intel.com>

[-- Attachment #1: Type: text/plain, Size: 6963 bytes --]

On Thu, 2016-07-14 at 10:38 +0100, Joshua G Lock wrote:

On Wed, 2016-07-06 at 13:16 -0700, Bill Randle wrote:


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@intel.com<mailto:william.c.randle@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 I'm reading this patch correctly this change moves the addition of
generateMD5cmd() to the command string into the else block of the
"layerversion_yoctobsp < 2" check, whereas before it was appended
regardless after the if/else statement. Was that change intentional?

Regards,

Joshua



Yes, it was intentional. If the layerversion is < 2 and you're expecting genericx86_64, that's not a supported configuration, so there is no image to run a md5sum on. We also want to run the md5sum calculation before we copy artifacts, rather than after, so that the md5sum files are included in the copy.

    -Bill



+                        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)


[-- Attachment #2: Type: text/html, Size: 16469 bytes --]

  reply	other threads:[~2016-07-14 14:50 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-07-06 20:16 [yocto-autobuilder][PATCH 0/2] publish wic images Bill Randle
2016-07-06 20:16 ` [yocto-autobuilder][PATCH 1/2] PublishArtifacts.py: create md5sum files in same dir as artifacts Bill Randle
2016-07-06 20:16 ` [yocto-autobuilder][PATCH 2/2] publish build artifacts for wic images Bill Randle
2016-07-14  9:38   ` Joshua G Lock
2016-07-14 14:49     ` Randle, William C [this message]
2016-07-13 21:10 ` [yocto-autobuilder][PATCH 0/2] publish " Randle, William C
2016-07-14 15:53 ` Joshua G Lock

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1468507798.3100.47.camel@intel.com \
    --to=william.c.randle@intel.com \
    --cc=joshua.g.lock@linux.intel.com \
    --cc=yocto@yoctoproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.