diff options
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/ci/Jenkinsfile | 1 | ||||
-rwxr-xr-x | scripts/ci/configure.sh | 20 | ||||
-rw-r--r-- | scripts/ci/local.conf.append | 5 |
3 files changed, 10 insertions, 16 deletions
diff --git a/scripts/ci/Jenkinsfile b/scripts/ci/Jenkinsfile index fd0bc3b..84eebca 100644 --- a/scripts/ci/Jenkinsfile +++ b/scripts/ci/Jenkinsfile | |||
@@ -1,7 +1,6 @@ | |||
1 | pipeline { | 1 | pipeline { |
2 | agent none | 2 | agent none |
3 | environment { | 3 | environment { |
4 | TEST_LOCAL_CONF_APPEND = 'scripts/ci/local.conf.append' | ||
5 | TEST_AKTUALIZR_DIR = 'aktualizr' | 4 | TEST_AKTUALIZR_DIR = 'aktualizr' |
6 | TEST_AKTUALIZR_BRANCH = 'aktualizr/master' | 5 | TEST_AKTUALIZR_BRANCH = 'aktualizr/master' |
7 | TEST_BITBAKE_COMMON_DIR = "${env.HOME}/bitbake-common" | 6 | TEST_BITBAKE_COMMON_DIR = "${env.HOME}/bitbake-common" |
diff --git a/scripts/ci/configure.sh b/scripts/ci/configure.sh index 36ed059..cf42825 100755 --- a/scripts/ci/configure.sh +++ b/scripts/ci/configure.sh | |||
@@ -8,11 +8,10 @@ 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 | 9 | ||
10 | TEST_AKTUALIZR_DIR=${TEST_AKTUALIZR_DIR:-.} | 10 | TEST_AKTUALIZR_DIR=${TEST_AKTUALIZR_DIR:-.} |
11 | TEST_LOCAL_CONF_APPEND=${TEST_LOCAL_CONF_APPEND:-} | ||
12 | TEST_AKTUALIZR_BRANCH=${TEST_AKTUALIZR_BRANCH:-master} | 11 | TEST_AKTUALIZR_BRANCH=${TEST_AKTUALIZR_BRANCH:-master} |
13 | TEST_AKTUALIZR_REV=${TEST_AKTUALIZR_REV:-$(GIT_DIR="${TEST_AKTUALIZR_DIR}/.git" git rev-parse "${TEST_AKTUALIZR_BRANCH}")} | 12 | TEST_AKTUALIZR_REV=${TEST_AKTUALIZR_REV:-$(GIT_DIR="${TEST_AKTUALIZR_DIR}/.git" git rev-parse "${TEST_AKTUALIZR_BRANCH}")} |
14 | 13 | ||
15 | # remove existing local.conf, keep | 14 | # move existing conf directory to backup, before generating a new one |
16 | rm -rf "${TEST_BUILD_DIR}/conf.old" || true | 15 | rm -rf "${TEST_BUILD_DIR}/conf.old" || true |
17 | mv "${TEST_BUILD_DIR}/conf" "${TEST_BUILD_DIR}/conf.old" || true | 16 | mv "${TEST_BUILD_DIR}/conf" "${TEST_BUILD_DIR}/conf.old" || true |
18 | 17 | ||
@@ -23,11 +22,12 @@ echo ">> Running envsetup.sh" | |||
23 | . "${TEST_REPO_DIR}/meta-updater/scripts/envsetup.sh" "${TEST_MACHINE}" "${TEST_BUILD_DIR}" | 22 | . "${TEST_REPO_DIR}/meta-updater/scripts/envsetup.sh" "${TEST_MACHINE}" "${TEST_BUILD_DIR}" |
24 | ) | 23 | ) |
25 | 24 | ||
26 | if [[ -n $TEST_LOCAL_CONF_APPEND ]]; then | 25 | echo ">> Set aktualizr branch in bitbake's config" |
27 | echo ">> Appending to local.conf" | 26 | |
28 | REMOTE_AKTUALIZR_BRANCH=$(sed 's#^[^/]*/##g' <<< "$TEST_AKTUALIZR_BRANCH") | 27 | cat << EOF > "${TEST_BUILD_DIR}/conf/site.conf" |
29 | cat "$TEST_LOCAL_CONF_APPEND" | \ | 28 | SANITY_TESTED_DISTROS = "" |
30 | sed "s/\$<rev-sha1>/$TEST_AKTUALIZR_REV/g" | \ | 29 | SRCREV_pn-aktualizr = "$TEST_AKTUALIZR_REV" |
31 | sed "s/\$<rev-branch>/$REMOTE_AKTUALIZR_BRANCH/g" \ | 30 | SRCREV_pn-aktualizr-native = "\${SRCREV_pn-aktualizr}" |
32 | >> "${TEST_BUILD_DIR}/conf/local.conf" | 31 | BRANCH_pn-aktualizr = "$TEST_AKTUALIZR_BRANCH" |
33 | fi | 32 | BRANCH_pn-aktualizr-native = "\${BRANCH_pn-aktualizr}" |
33 | EOF | ||
diff --git a/scripts/ci/local.conf.append b/scripts/ci/local.conf.append deleted file mode 100644 index 350e466..0000000 --- a/scripts/ci/local.conf.append +++ /dev/null | |||
@@ -1,5 +0,0 @@ | |||
1 | SANITY_TESTED_DISTROS = "" | ||
2 | SRCREV_pn-aktualizr = "$<rev-sha1>" | ||
3 | SRCREV_pn-aktualizr-native = "${SRCREV_pn-aktualizr}" | ||
4 | BRANCH_pn-aktualizr = "$<rev-branch>" | ||
5 | BRANCH_pn-aktualizr-native = "${BRANCH_pn-aktualizr}" | ||