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