xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Wei Liu <wei.liu2@citrix.com>
To: Xen-devel <xen-devel@lists.xenproject.org>
Cc: Wei Liu <wei.liu2@citrix.com>, Doug Goldstein <cardoe@cardoe.com>
Subject: [PATCH 1/4] automation: introduce CONTAINER_NO_PULL for containerize
Date: Mon, 19 Nov 2018 21:30:59 +0000	[thread overview]
Message-ID: <20181119213102.8939-2-wei.liu2@citrix.com> (raw)
In-Reply-To: <20181119213102.8939-1-wei.liu2@citrix.com>

Signed-off-by: Wei Liu <wei.liu2@citrix.com>
---
 automation/build/README.md      | 3 +++
 automation/scripts/containerize | 8 +++++---
 2 files changed, 8 insertions(+), 3 deletions(-)

diff --git a/automation/build/README.md b/automation/build/README.md
index f6cfd46f1e..d8c8a18e33 100644
--- a/automation/build/README.md
+++ b/automation/build/README.md
@@ -52,6 +52,9 @@ understands.
 
 - CONTAINER_UID0: This specifies whether root is used inside the container.
 
+- CONTAINER_NO_PULL: If set to 1, the script will not pull from docker hub.
+  This is useful when testing container locally.
+
 - XEN_CONFIG_EXPERT: If this is defined in your shell it will be
   automatically passed through to the container.
 
diff --git a/automation/scripts/containerize b/automation/scripts/containerize
index aa08274eba..a3e5d79c70 100755
--- a/automation/scripts/containerize
+++ b/automation/scripts/containerize
@@ -42,9 +42,11 @@ tty -s && termint=t
 # Fetch the latest version of the container in hub.docker.com,
 # unless it's a newly created local copy.
 #
-einfo "*** Ensuring ${CONTAINER} is up to date"
-docker pull ${CONTAINER} > /dev/null ||     \
-    die "Failed to update docker container"
+if [[ "_${CONTAINER_NO_PULL}" != "_1" ]]; then
+    einfo "*** Ensuring ${CONTAINER} is up to date"
+    docker pull ${CONTAINER} > /dev/null ||     \
+        die "Failed to update docker container"
+fi
 
 if hash greadlink > /dev/null 2>&1; then
     READLINK=greadlink
-- 
2.11.0


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

  reply	other threads:[~2018-11-19 21:31 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-19 21:30 [PATCH 0/4] automation: QEMU-based smoke test Wei Liu
2018-11-19 21:30 ` Wei Liu [this message]
2018-11-20 16:35   ` [PATCH 1/4] automation: introduce CONTAINER_NO_PULL for containerize Doug Goldstein
2018-11-19 21:31 ` [PATCH 2/4] automation: stash default config file for artifact extraction Wei Liu
2018-11-20 16:38   ` Doug Goldstein
2018-11-19 21:31 ` [PATCH 3/4] automation: also specify xen binary as artifact on x86_64 Wei Liu
2018-11-20 16:39   ` Doug Goldstein
2018-11-20 17:35   ` Andrew Cooper
2018-11-20 18:21     ` Wei Liu
2018-11-19 21:31 ` [PATCH 4/4] automation: add qemu smoke test Wei Liu
2018-11-20 16:41   ` Doug Goldstein
2018-11-20 16:47     ` Wei Liu
2018-11-19 21:40 ` [PATCH 0/4] automation: QEMU-based " Wei Liu

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=20181119213102.8939-2-wei.liu2@citrix.com \
    --to=wei.liu2@citrix.com \
    --cc=cardoe@cardoe.com \
    --cc=xen-devel@lists.xenproject.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).