From mboxrd@z Thu Jan 1 00:00:00 1970 X-GM-THRID: 6760694881479294976 X-Received: by 2002:a2e:8945:: with SMTP id b5mr339013ljk.125.1574096941790; Mon, 18 Nov 2019 09:09:01 -0800 (PST) X-BeenThere: isar-users@googlegroups.com Received: by 2002:a2e:86d5:: with SMTP id n21ls3563184ljj.16.gmail; Mon, 18 Nov 2019 09:09:00 -0800 (PST) X-Google-Smtp-Source: APXvYqwkqrIPepHT2kiduLJdrbbmuPL+r7de/xzeKqIVhQfdD93pSp/jOtR+84W4Ra6mREMuG1p6 X-Received: by 2002:a2e:300d:: with SMTP id w13mr359573ljw.117.1574096940853; Mon, 18 Nov 2019 09:09:00 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1574096940; cv=none; d=google.com; s=arc-20160816; b=ZPY/2tZHi7TTLTYH2YdsceuswqZhV/4fE51Djyn6DA9Vu4lREbD0+2PsO73jIFgGTE G7mjQRyskRA6XA3nmHyi/gDzcPa2FkVrwuwL0GocpLnMJQ2/LJcoXNwa3AJACmy5Vd0q IAzo+kBuEm9AVA6Rnk/8lKuBbg7+jEHjp0kffnq0bVojG/wkAF6BudAPt/NQVDiPhGjX pgLuGxCRoxwdv0vhvQuGfEkQtK7kLsM5D2gWzmthhyNwunj+1utWIE/CEooFH+Fn66Er 9CsyDzM743IVG9m2k/nNosgcQqmCuvRbkLXYWMI4FzEBfVWDss9N62MGCUaDd0Zhk8X9 ExNA== 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:date:subject:to:from; bh=4jplmazIgmMi3pigIe79JSa7Rv8k1b/KFVefbAYkq5o=; b=XpPachNzNQxEorOvwoX5cN01wFaYh5V4Gb4EMpBl0Eis4Dwyf74mM1rqe7shYFUNbM TsqOiEoQiu/I9+JLBsBXws8wUm6cZz/zHIICmuUkZGJmT9wEVz7rVD6HedVoAZ6glG1U p3OkxVBSSubyeZPt2d1TzElHZhqbwuixM3bq4E7wfu+8ktYpy/G5SlP8YbfwaGDwm54/ jCaH43ARoYHICf/6K7AD07DUA08KI7qTSb1EFfPdEFHt0Enp5htDmGlnF0YbQECtSmGp J0EhzzUIrVq75wF41n0yKInkGxcoM2VJlT9sGwGcuT1C99KsN0S/YRplVC44/9wocoH8 lIBw== ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=neutral (google.com: 85.214.156.166 is neither permitted nor denied by best guess record for domain of ibr@radix50.net) smtp.mailfrom=ibr@radix50.net Return-Path: Received: from shymkent.ilbers.de (shymkent.ilbers.de. [85.214.156.166]) by gmr-mx.google.com with ESMTPS id j14si1031496lfm.2.2019.11.18.09.09.00 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 18 Nov 2019 09:09:00 -0800 (PST) Received-SPF: neutral (google.com: 85.214.156.166 is neither permitted nor denied by best guess record for domain of ibr@radix50.net) client-ip=85.214.156.166; Authentication-Results: gmr-mx.google.com; spf=neutral (google.com: 85.214.156.166 is neither permitted nor denied by best guess record for domain of ibr@radix50.net) smtp.mailfrom=ibr@radix50.net Received: from yssyq.m.ilbers.de (host-80-81-17-52.static.customer.m-online.net [80.81.17.52]) (authenticated bits=0) by shymkent.ilbers.de (8.15.2/8.15.2/Debian-8) with ESMTPSA id xAIH8xWx005166 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Mon, 18 Nov 2019 18:09:00 +0100 Received: from yssyq.m.ilbers.de (localhost [127.0.0.1]) by yssyq.m.ilbers.de (8.15.2/8.15.2/Debian-14~deb10u1) with ESMTPS id xAIH8rIi012923 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NOT) for ; Mon, 18 Nov 2019 18:08:53 +0100 Received: (from ibr@localhost) by yssyq.m.ilbers.de (8.15.2/8.15.2/Submit) id xAIH8rlt012922 for isar-users@googlegroups.com; Mon, 18 Nov 2019 18:08:53 +0100 From: Baurzhan Ismagulov To: isar-users@googlegroups.com Subject: [PATCH v3 1/2] ci: always test signed and unsigned repo builds Date: Mon, 18 Nov 2019 18:08:49 +0100 Message-Id: <20191118170850.12861-2-ibr@radix50.net> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20191118170850.12861-1-ibr@radix50.net> References: <20191118170850.12861-1-ibr@radix50.net> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on shymkent.ilbers.de X-TUID: 2IgVMUVcrlyA From: Henning Schild Just split the target set we had into two. Test the first signed and the other one unsigned. Signed-off-by: Henning Schild --- .gitlab-ci.yml | 2 +- scripts/ci_build.sh | 43 ++++++++++++++++++++++++++++--------------- 2 files changed, 29 insertions(+), 16 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index dd6e12b..1437bd7 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -32,7 +32,7 @@ full-ci: - PREVIOUS_SHA="$(cat .CI_COMMIT_SHA || true)" - if [ "$CI_COMMIT_SHA" != "$PREVIOUS_SHA" ]; then echo "$CI_COMMIT_SHA" > .CI_COMMIT_SHA; - scripts/ci_build.sh -q -c -r -s; + scripts/ci_build.sh -q -c -r; fi cache: key: "$CI_COMMIT_REF_SLUG" diff --git a/scripts/ci_build.sh b/scripts/ci_build.sh index ecaa88a..7926221 100755 --- a/scripts/ci_build.sh +++ b/scripts/ci_build.sh @@ -50,13 +50,14 @@ CROSS_TARGETS_SET="\ mc:de0-nano-soc-stretch:isar-image-base \ mc:rpi-stretch:isar-image-base" -REPRO_TARGETS_SET="\ +REPRO_TARGETS_SET_SIGNED="\ mc:qemuarm-stretch:isar-image-base \ - mc:qemuarm64-stretch:isar-image-base \ + mc:qemuarm64-stretch:isar-image-base" + +REPRO_TARGETS_SET="\ mc:qemuamd64-stretch:isar-image-base \ mc:qemuarm-buster:isar-image-base" - show_help() { echo "This script builds the default Isar images." echo @@ -70,7 +71,7 @@ show_help() { echo " -d, --debug enable debug bitbake output." echo " -f, --fast cross build reduced set of configurations." echo " -q, --quiet suppress verbose bitbake output." - echo " -r, --repro [-s, --sign] enable use of cached base repository with optional signing." + echo " -r, --repro enable use of cached base repository." echo " --help display this message and exit." echo echo "Exit status:" @@ -109,8 +110,10 @@ do ;; -r|--repro) REPRO_BUILD="1" + # This switch is deprecated, just here to not cause failing CI on + # legacy configs case "$2" in - -s|--sign) SIGN_REPO='1'; shift ;; + -s|--sign) shift ;; esac ;; *) @@ -133,24 +136,34 @@ if [ -n "$CROSS_BUILD" ]; then fi if [ -n "$REPRO_BUILD" ]; then - if [ -n "$SIGN_REPO" ]; then - ISAR_TESTSUITE_GPG_PUB_KEY_FILE="$ISARROOT/testsuite/base-apt/test_pub.key" - ISAR_TESTSUITE_GPG_PRIV_KEY_FILE="$ISARROOT/testsuite/base-apt/test_priv.key" - export GNUPGHOME=$(mktemp -d) - gpg --import $ISAR_TESTSUITE_GPG_PUB_KEY_FILE $ISAR_TESTSUITE_GPG_PRIV_KEY_FILE - echo BASE_REPO_KEY=\"file://$ISAR_TESTSUITE_GPG_PUB_KEY_FILE\" >> conf/local.conf - fi - # Enable use of cached base repository + ISAR_TESTSUITE_GPG_PUB_KEY_FILE="$ISARROOT/testsuite/base-apt/test_pub.key" + ISAR_TESTSUITE_GPG_PRIV_KEY_FILE="$ISARROOT/testsuite/base-apt/test_priv.key" + export GNUPGHOME=$(mktemp -d) + gpg --import $ISAR_TESTSUITE_GPG_PUB_KEY_FILE $ISAR_TESTSUITE_GPG_PRIV_KEY_FILE + + # Enable use of signed cached base repository + echo BASE_REPO_KEY=\"file://$ISAR_TESTSUITE_GPG_PUB_KEY_FILE\" >> conf/local.conf + bitbake $BB_ARGS -c cache_base_repo $REPRO_TARGETS_SET_SIGNED + while [ -e bitbake.sock ]; do sleep 1; done + sudo rm -rf tmp + sed -i -e 's/#ISAR_USE_CACHED_BASE_REPO ?= "1"/ISAR_USE_CACHED_BASE_REPO ?= "1"/g' conf/local.conf + bitbake $BB_ARGS $REPRO_TARGETS_SET_SIGNED + while [ -e bitbake.sock ]; do sleep 1; done + # Cleanup and disable use of signed cached base repository + sudo rm -rf tmp + sed -i -e 's/ISAR_USE_CACHED_BASE_REPO ?= "1"/#ISAR_USE_CACHED_BASE_REPO ?= "1"/g' conf/local.conf + sed -i -e 's/^BASE_REPO_KEY/#BASE_REPO_KEY/g' conf/local.conf + + # Enable use of unsigned cached base repository bitbake $BB_ARGS -c cache_base_repo $REPRO_TARGETS_SET while [ -e bitbake.sock ]; do sleep 1; done sudo rm -rf tmp sed -i -e 's/#ISAR_USE_CACHED_BASE_REPO ?= "1"/ISAR_USE_CACHED_BASE_REPO ?= "1"/g' conf/local.conf bitbake $BB_ARGS $REPRO_TARGETS_SET while [ -e bitbake.sock ]; do sleep 1; done - # Cleanup and disable use of cached base repository + # Cleanup and disable use of unsigned cached base repository sudo rm -rf tmp sed -i -e 's/ISAR_USE_CACHED_BASE_REPO ?= "1"/#ISAR_USE_CACHED_BASE_REPO ?= "1"/g' conf/local.conf - sed -i -e 's/^BASE_REPO_KEY/#BASE_REPO_KEY/g' conf/local.conf fi sed -i -e 's/#IMAGE_INSTALL += "isar-disable-apt-cache"/IMAGE_INSTALL += "isar-disable-apt-cache"/g' conf/local.conf -- 2.20.1