summaryrefslogtreecommitdiffstats
path: root/scripts/ci/configure.sh
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/ci/configure.sh')
-rwxr-xr-xscripts/ci/configure.sh25
1 files changed, 18 insertions, 7 deletions
diff --git a/scripts/ci/configure.sh b/scripts/ci/configure.sh
index 1e87a7b..960a0cc 100755
--- a/scripts/ci/configure.sh
+++ b/scripts/ci/configure.sh
@@ -6,27 +6,30 @@ set -x
6TEST_MACHINE=${TEST_MACHINE:-qemux86-64} 6TEST_MACHINE=${TEST_MACHINE:-qemux86-64}
7TEST_BUILD_DIR=${TEST_BUILD_DIR:-build} 7TEST_BUILD_DIR=${TEST_BUILD_DIR:-build}
8TEST_REPO_DIR=${TEST_REPO_DIR:-updater-repo} 8TEST_REPO_DIR=${TEST_REPO_DIR:-updater-repo}
9TEST_BITBAKE_COMMON_DIR=${TEST_BITBAKE_COMMON_DIR:-}
9 10
10TEST_AKTUALIZR_DIR=${TEST_AKTUALIZR_DIR:-.} 11TEST_AKTUALIZR_DIR=${TEST_AKTUALIZR_DIR:-.}
11TEST_AKTUALIZR_BRANCH=${TEST_AKTUALIZR_BRANCH:-master} 12TEST_AKTUALIZR_BRANCH=${TEST_AKTUALIZR_BRANCH:-master}
12TEST_AKTUALIZR_REV=${TEST_AKTUALIZR_REV:-$(GIT_DIR="$TEST_AKTUALIZR_DIR/.git" git rev-parse "$TEST_AKTUALIZR_REMOTE/$TEST_AKTUALIZR_BRANCH")} 13TEST_AKTUALIZR_REV=${TEST_AKTUALIZR_REV:-$(GIT_DIR="$TEST_AKTUALIZR_DIR/.git" git rev-parse "$TEST_AKTUALIZR_REMOTE/$TEST_AKTUALIZR_BRANCH")}
13TEST_BITBAKE_COMMON_DIR=${TEST_BITBAKE_COMMON_DIR:-} 14TEST_AKTUALIZR_CREDENTIALS=${TEST_AKTUALIZR_CREDENTIALS:-}
14 15
15# move existing conf directory to backup, before generating a new one 16# move existing conf directory to backup, before generating a new one
16rm -rf "${TEST_BUILD_DIR}/conf.old" || true 17rm -rf "$TEST_BUILD_DIR/conf.old" || true
17mv "${TEST_BUILD_DIR}/conf" "${TEST_BUILD_DIR}/conf.old" || true 18mv "$TEST_BUILD_DIR/conf" "$TEST_BUILD_DIR/conf.old" || true
18 19
19( 20(
20set +euo pipefail 21set +euo pipefail
21set +x 22set +x
22echo ">> Running envsetup.sh" 23echo ">> Running envsetup.sh"
23. "${TEST_REPO_DIR}/meta-updater/scripts/envsetup.sh" "${TEST_MACHINE}" "${TEST_BUILD_DIR}" 24. "$TEST_REPO_DIR/meta-updater/scripts/envsetup.sh" "$TEST_MACHINE" "$TEST_BUILD_DIR"
24) 25)
25 26
26set +x 27set +x
27 28
29SITE_CONF="$TEST_BUILD_DIR/conf/site.conf"
30
28echo ">> Set common bitbake config options" 31echo ">> Set common bitbake config options"
29cat << EOF > "${TEST_BUILD_DIR}/conf/site.conf" 32cat << EOF > "$SITE_CONF"
30SANITY_TESTED_DISTROS = "" 33SANITY_TESTED_DISTROS = ""
31SSTATE_MIRRORS ?= "file://.* https://bitbake-cache.atsgarage.com/PATH;downloadfilename=PATH" 34SSTATE_MIRRORS ?= "file://.* https://bitbake-cache.atsgarage.com/PATH;downloadfilename=PATH"
32IMAGE_FEATURES += "ssh-server-openssh" 35IMAGE_FEATURES += "ssh-server-openssh"
@@ -34,7 +37,7 @@ IMAGE_FEATURES += "ssh-server-openssh"
34EOF 37EOF
35 38
36echo ">> Set aktualizr branch in bitbake's config" 39echo ">> Set aktualizr branch in bitbake's config"
37cat << EOF >> "${TEST_BUILD_DIR}/conf/site.conf" 40cat << EOF >> "$SITE_CONF"
38SRCREV_pn-aktualizr = "$TEST_AKTUALIZR_REV" 41SRCREV_pn-aktualizr = "$TEST_AKTUALIZR_REV"
39SRCREV_pn-aktualizr-native = "\${SRCREV_pn-aktualizr}" 42SRCREV_pn-aktualizr-native = "\${SRCREV_pn-aktualizr}"
40BRANCH_pn-aktualizr = "$TEST_AKTUALIZR_BRANCH" 43BRANCH_pn-aktualizr = "$TEST_AKTUALIZR_BRANCH"
@@ -42,12 +45,20 @@ BRANCH_pn-aktualizr-native = "\${BRANCH_pn-aktualizr}"
42 45
43EOF 46EOF
44 47
48if [[ -n $TEST_AKTUALIZR_CREDENTIALS ]]; then
49 echo ">> Set aktualizr credentials"
50 cat << EOF >> "$SITE_CONF"
51SOTA_PACKED_CREDENTIALS = "$TEST_AKTUALIZR_CREDENTIALS"
52EOF
53fi
54
45if [[ -n $TEST_BITBAKE_COMMON_DIR ]]; then 55if [[ -n $TEST_BITBAKE_COMMON_DIR ]]; then
46 echo ">> Set caching" 56 echo ">> Set caching"
47 SSTATE_DIR="$TEST_BITBAKE_COMMON_DIR/sstate-cache" 57 SSTATE_DIR="$TEST_BITBAKE_COMMON_DIR/sstate-cache"
48 DL_DIR="$TEST_BITBAKE_COMMON_DIR/downloads" 58 DL_DIR="$TEST_BITBAKE_COMMON_DIR/downloads"
49 mkdir -p "$SSTATE_DIR" "$DL_DIR" 59 mkdir -p "$SSTATE_DIR" "$DL_DIR"
50 cat << EOF >> "${TEST_BUILD_DIR}/conf/site.conf" 60
61 cat << EOF >> "$SITE_CONF"
51SSTATE_DIR = "$SSTATE_DIR" 62SSTATE_DIR = "$SSTATE_DIR"
52DL_DIR = "$DL_DIR" 63DL_DIR = "$DL_DIR"
53EOF 64EOF