From mboxrd@z Thu Jan 1 00:00:00 1970 X-GM-THRID: 6550672688539500544 X-Received: by 2002:a2e:8086:: with SMTP id i6-v6mr477267ljg.14.1525250381666; Wed, 02 May 2018 01:39:41 -0700 (PDT) X-BeenThere: isar-users@googlegroups.com Received: by 2002:a19:f608:: with SMTP id x8-v6ls1090048lfe.15.gmail; Wed, 02 May 2018 01:39:41 -0700 (PDT) X-Google-Smtp-Source: AB8JxZoCvvQ1zXSbkxI1Bw2RxzO4pkoDHUyYZ17+cZtxZVrOe+zziM1o9Dbwq3XRvNt2gsfqsuXs X-Received: by 2002:a19:20ce:: with SMTP id g197-v6mr999737lfg.34.1525250381060; Wed, 02 May 2018 01:39:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1525250381; cv=none; d=google.com; s=arc-20160816; b=IJvKynKGDIRbajcKA5gR85f7FGGW3El07h/LUb/Fl3nCSk8hNytGaLSwBjjQg75kgP 3HmjAP00Y/IgNpO4G6tW8D4uM46YgjHRyC3aGA4SpMeSP2r1ue2C46I06v2UdjHe+B7N F9l8TCTdxa8LfoDx/zt2t96n0vox7QhnVf8AoqdWsiF2LK4E//bhdduufm6GOtePhLkX iPzx96zJBFhIWJUV5jRqCnPTBBNoYCwkWE+jhnreHyzxON9QiE8KQ8aus76Niu7sWzJG ngjMGrSidgfUx3pHxi3W1eVvyZ2ZqfTLKYoTI5FOCOuM+yCQoXPsFuhFYv3WPhTlmYv2 2mDA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date:arc-authentication-results; bh=qrguHv8MjwNAO1I2xhEIy/BGaNwjhmfyY4CZFI9WKYc=; b=fKW07LAhPhvn7eVSPgIF6CPdqkrVkf0itMo6ueCM7Nh0XVZE0SwRDexljFdmFpSn/k ax45hRoSBRj2VXgol8Th4bseyqRH7BjdM0R1pI3eiTxKt9u+0U18qs7XG5J9v2rPPoWU d7lDqx43W4G5VJIsfEF1V+eV+u1M6HwiHHRc50vMfFJ8h+AqmRR0d76k3Ym5hTAZio3J dkXSmh1bPMnfw0GDuwMQ59hLhfSUDRxcZ94MCD785rEh/hkvlDjQMdMAIdvaJpwpNI25 q3SHZ9cLqpPxpnCLF+MA6xUUYiQXmvr3CcVr7njlfJIfIxfdjVVirg2NxM2Kp25k2/EH 8m+w== ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=pass (google.com: domain of henning.schild@siemens.com designates 192.35.17.14 as permitted sender) smtp.mailfrom=henning.schild@siemens.com Return-Path: Received: from david.siemens.de (david.siemens.de. [192.35.17.14]) by gmr-mx.google.com with ESMTPS id n5-v6si457011ljj.5.2018.05.02.01.39.40 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 02 May 2018 01:39:41 -0700 (PDT) Received-SPF: pass (google.com: domain of henning.schild@siemens.com designates 192.35.17.14 as permitted sender) client-ip=192.35.17.14; Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of henning.schild@siemens.com designates 192.35.17.14 as permitted sender) smtp.mailfrom=henning.schild@siemens.com Received: from mail3.siemens.de (mail3.siemens.de [139.25.208.14]) by david.siemens.de (8.15.2/8.15.2) with ESMTPS id w428deOY019455 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 2 May 2018 10:39:40 +0200 Received: from md1pvb1c.ad001.siemens.net (md1pvb1c.ad001.siemens.net [139.25.68.40]) by mail3.siemens.de (8.15.2/8.15.2) with ESMTP id w428de46018947; Wed, 2 May 2018 10:39:40 +0200 Date: Wed, 2 May 2018 10:39:39 +0200 From: Henning Schild To: Alexander Smirnov Cc: Subject: Re: [PATCH 3/3] scripts/ci_build: Make CI script more generic Message-ID: <20180502103939.5424b37f@md1pvb1c.ad001.siemens.net> In-Reply-To: <20180501175511.26145-4-asmirnov@ilbers.de> References: <20180501175511.26145-1-asmirnov@ilbers.de> <20180501175511.26145-4-asmirnov@ilbers.de> X-Mailer: Claws Mail 3.15.0-dirty (GTK+ 2.24.31; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-TUID: uFPXuI6ItkiL Am Tue, 1 May 2018 20:55:11 +0300 schrieb Alexander Smirnov : > Make this script more generic, so it could be used by any CI and by > user as well. Also add parameter to specify build folder. > > Usage: > ci_build [-v] -b BUILD_DIR > > And this command will build all the default Isar images. > > Signed-off-by: Alexander Smirnov > --- > scripts/ci_build.sh | 66 > ++++++++++++++++++++++++++++++++++++++++++++--------- 1 file changed, > 55 insertions(+), 11 deletions(-) > > diff --git a/scripts/ci_build.sh b/scripts/ci_build.sh > index e941f8c..6b5871e 100755 > --- a/scripts/ci_build.sh > +++ b/scripts/ci_build.sh > @@ -1,28 +1,72 @@ > -# Script for Jenkins build > +# Script for CI system build > # > # Alexander Smirnov > -# Copyright (c) 2016-2017 ilbers GmbH > +# Copyright (c) 2016-2018 ilbers GmbH > > #!/bin/sh > > +ES_BUG=3 > + > # Export $PATH to use 'parted' tool > export PATH=$PATH:/sbin > > -# Get parameters from the command line > -WORKSPACE=$1 > -GIT_COMMIT=$2 > - > # Go to Isar root > cd $(dirname $0)/.. > > -# Setup build folder for current revision > -if [ ! -d /build/$WORKSPACE/$GIT_COMMIT ]; then > - mkdir -p /build/$WORKSPACE/$GIT_COMMIT > +# Start build in Isar tree by default > +BUILD_DIR=./build > + > +show_help() { > + echo "This script builds all the default Isar images." > + echo > + echo "Usage:" > + echo " $0 [params]" > + echo > + echo "Parameters:" > + echo " -b, --build BUILD_DIR set path to build directory. If > not set," > + echo " the build will be started in > current path." > + echo " -v, --verbose set verbose level of bitbake > output." > + echo " --help display this message and exit." > + echo > + echo "Exit status:" > + echo " 0 if OK," > + echo " 3 if invalid parameters are passed." > +} > + > +# Parse command line to get user configuration > +while [ $# -gt 0 ] > +do > + key="$1" > + > + case $key in > + -h|--help) > + show_help > + exit 0 > + ;; > + -b|--build) > + BUILD_DIR="$2" > + shift > + ;; > + -v|--verbose) > + BB_ARGS="$BB_ARGS -v" > + ;; > + *) > + echo "error: invalid parameter '$key', please try '--help' > to get list of supported parameters" > + exit $ES_BUG > + ;; > + esac > + > + shift > +done > + > +# Setup build folder for the current build > +if [ ! -d $BUILD_DIR ]; then > + mkdir -p $BUILD_DIR > fi > -source isar-init-build-env /build/$WORKSPACE/$GIT_COMMIT > +source isar-init-build-env $BUILD_DIR > > # Start build for all possible configurations > -bitbake -v \ > +bitbake $BB_ARGS \ Looks to me like there is a case where BB_ARGS is not initialized and that the default "-v" got dropped. Again this output is valuable and should probably be there by default. Henning > multiconfig:qemuarm-wheezy:isar-image-base \ > multiconfig:qemuarm-jessie:isar-image-base \ > multiconfig:qemuarm-stretch:isar-image-base \