diff options
Diffstat (limited to 'scripts/ci/configure.sh')
| -rwxr-xr-x | scripts/ci/configure.sh | 20 |
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} | |||
| 8 | TEST_REPO_DIR=${TEST_REPO_DIR:-updater-repo} | 8 | TEST_REPO_DIR=${TEST_REPO_DIR:-updater-repo} |
| 9 | TEST_BITBAKE_COMMON_DIR=${TEST_BITBAKE_COMMON_DIR:-} | 9 | TEST_BITBAKE_COMMON_DIR=${TEST_BITBAKE_COMMON_DIR:-} |
| 10 | 10 | ||
| 11 | TEST_AKTUALIZR_DIR=${TEST_AKTUALIZR_DIR:-.} | 11 | TEST_AKTUALIZR_REMOTE=${TEST_AKTUALIZR_REMOTE:-} |
| 12 | TEST_AKTUALIZR_BRANCH=${TEST_AKTUALIZR_BRANCH:-master} | 12 | if [ -n "$TEST_AKTUALIZR_REMOTE" ]; then |
| 13 | TEST_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")} | ||
| 16 | fi | ||
| 17 | |||
| 14 | TEST_AKTUALIZR_CREDENTIALS=${TEST_AKTUALIZR_CREDENTIALS:-} | 18 | TEST_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 | |||
| 21 | set +euo pipefail | 25 | set +euo pipefail |
| 22 | set +x | 26 | set +x |
| 23 | echo ">> Running envsetup.sh" | 27 | echo ">> Running envsetup.sh" |
| 28 | METADIR=$(realpath "$TEST_REPO_DIR") | ||
| 29 | export 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" | |||
| 31 | echo ">> Set common bitbake config options" | 37 | echo ">> Set common bitbake config options" |
| 32 | cat << EOF > "$SITE_CONF" | 38 | cat << EOF > "$SITE_CONF" |
| 33 | SANITY_TESTED_DISTROS = "" | 39 | SANITY_TESTED_DISTROS = "" |
| 34 | SSTATE_MIRRORS ?= "file://.* https://bitbake-cache.atsgarage.com/PATH;downloadfilename=PATH" | ||
| 35 | IMAGE_FEATURES += "ssh-server-openssh" | 40 | IMAGE_FEATURES += "ssh-server-openssh" |
| 36 | 41 | ||
| 37 | EOF | 42 | EOF |
| 38 | 43 | ||
| 39 | echo ">> Set aktualizr branch in bitbake's config" | 44 | if [ -n "$TEST_AKTUALIZR_REMOTE" ]; then |
| 40 | cat << EOF >> "$SITE_CONF" | 45 | echo ">> Set aktualizr branch in bitbake's config" |
| 46 | cat << EOF >> "$SITE_CONF" | ||
| 41 | SRCREV_pn-aktualizr = "$TEST_AKTUALIZR_REV" | 47 | SRCREV_pn-aktualizr = "$TEST_AKTUALIZR_REV" |
| 42 | SRCREV_pn-aktualizr-native = "\${SRCREV_pn-aktualizr}" | 48 | SRCREV_pn-aktualizr-native = "\${SRCREV_pn-aktualizr}" |
| 43 | BRANCH_pn-aktualizr = "$TEST_AKTUALIZR_BRANCH" | 49 | BRANCH_pn-aktualizr = "$TEST_AKTUALIZR_BRANCH" |
| 44 | BRANCH_pn-aktualizr-native = "\${BRANCH_pn-aktualizr}" | 50 | BRANCH_pn-aktualizr-native = "\${BRANCH_pn-aktualizr}" |
| 45 | |||
| 46 | EOF | 51 | EOF |
| 52 | fi | ||
| 47 | 53 | ||
| 48 | if [[ -n $TEST_AKTUALIZR_CREDENTIALS ]]; then | 54 | if [[ -n $TEST_AKTUALIZR_CREDENTIALS ]]; then |
| 49 | echo ">> Set aktualizr credentials" | 55 | echo ">> Set aktualizr credentials" |
