public inbox for isar-users@googlegroups.com
 help / color / mirror / Atom feed
* [PATCH v2] scripts/ci_build.sh installs required commands
@ 2022-12-24 10:07 Roberto A. Foglietta
  2022-12-24 15:47 ` Roberto A. Foglietta
  0 siblings, 1 reply; 4+ messages in thread
From: Roberto A. Foglietta @ 2022-12-24 10:07 UTC (permalink / raw)
  To: isar-users

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

Hi all,

CI build requires some commands in order to operate properly and some of these
are checked to be in the executable path but nothing more. This fix the issue
installing them at the beginning of the script.

v2: typos fixed

patch sent by elastic mail and went in moderation as usual, here in attachment.

Best regards, R-

[-- Attachment #2: v2-0001-scripts-ci_build.sh-installs-required-commands.patch --]
[-- Type: text/x-patch, Size: 1396 bytes --]

From 46ae757d7f90ea817f3087f9e350253b1cfa1a69 Mon Sep 17 00:00:00 2001
From: "Roberto A. Foglietta" <roberto.foglietta@gmail.com>
Date: Sat, 24 Dec 2022 11:01:08 +0100
Subject: [PATCH v2] scripts/ci_build.sh installs required commands

CI build requires some commands in order to operate properly and some of these
are checked to be in the executable path but nothing more. This fix the issue
installing them at the beginning of the script.

v2: typos fixed

Signed-off-by: Roberto A. Foglietta <roberto.foglietta@gmail.com>
---
 scripts/ci_build.sh | 12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)

diff --git a/scripts/ci_build.sh b/scripts/ci_build.sh
index fa7208c..e897942 100755
--- a/scripts/ci_build.sh
+++ b/scripts/ci_build.sh
@@ -14,10 +14,18 @@ export PATH=$PATH:/sbin
 # Go to Isar root
 cd "$(dirname "$0")/.."
 
+for i in virtualenv umoci skopeo reprepro quilt; do
+	if ! command -v $i > /dev/null; then
+	    if [ "$updated" == "1" ]; then
+                sudo apt-get update -qq
+	    fi
+	    sudo apt install -y $i
+	    updated=1
+	fi
+done
+
 # install avocado in virtualenv in case it is not there already
 if ! command -v avocado > /dev/null; then
-    sudo apt-get update -qq
-    sudo apt-get install -y virtualenv
     rm -rf /tmp/avocado_venv
     virtualenv --python python3 /tmp/avocado_venv
     source /tmp/avocado_venv/bin/activate
-- 
2.34.1


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2022-12-25 15:39 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-12-24 10:07 [PATCH v2] scripts/ci_build.sh installs required commands Roberto A. Foglietta
2022-12-24 15:47 ` Roberto A. Foglietta
2022-12-25 11:28   ` Roberto A. Foglietta
2022-12-25 15:38     ` Roberto A. Foglietta

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox