summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--scripts/ci/Jenkinsfile1
-rwxr-xr-xscripts/ci/configure.sh20
-rw-r--r--scripts/ci/local.conf.append5
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 @@
1pipeline { 1pipeline {
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}
8TEST_REPO_DIR=${TEST_REPO_DIR:-updater-repo} 8TEST_REPO_DIR=${TEST_REPO_DIR:-updater-repo}
9 9
10TEST_AKTUALIZR_DIR=${TEST_AKTUALIZR_DIR:-.} 10TEST_AKTUALIZR_DIR=${TEST_AKTUALIZR_DIR:-.}
11TEST_LOCAL_CONF_APPEND=${TEST_LOCAL_CONF_APPEND:-}
12TEST_AKTUALIZR_BRANCH=${TEST_AKTUALIZR_BRANCH:-master} 11TEST_AKTUALIZR_BRANCH=${TEST_AKTUALIZR_BRANCH:-master}
13TEST_AKTUALIZR_REV=${TEST_AKTUALIZR_REV:-$(GIT_DIR="${TEST_AKTUALIZR_DIR}/.git" git rev-parse "${TEST_AKTUALIZR_BRANCH}")} 12TEST_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
16rm -rf "${TEST_BUILD_DIR}/conf.old" || true 15rm -rf "${TEST_BUILD_DIR}/conf.old" || true
17mv "${TEST_BUILD_DIR}/conf" "${TEST_BUILD_DIR}/conf.old" || true 16mv "${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
26if [[ -n $TEST_LOCAL_CONF_APPEND ]]; then 25echo ">> Set aktualizr branch in bitbake's config"
27 echo ">> Appending to local.conf" 26
28 REMOTE_AKTUALIZR_BRANCH=$(sed 's#^[^/]*/##g' <<< "$TEST_AKTUALIZR_BRANCH") 27cat << EOF > "${TEST_BUILD_DIR}/conf/site.conf"
29 cat "$TEST_LOCAL_CONF_APPEND" | \ 28SANITY_TESTED_DISTROS = ""
30 sed "s/\$<rev-sha1>/$TEST_AKTUALIZR_REV/g" | \ 29SRCREV_pn-aktualizr = "$TEST_AKTUALIZR_REV"
31 sed "s/\$<rev-branch>/$REMOTE_AKTUALIZR_BRANCH/g" \ 30SRCREV_pn-aktualizr-native = "\${SRCREV_pn-aktualizr}"
32 >> "${TEST_BUILD_DIR}/conf/local.conf" 31BRANCH_pn-aktualizr = "$TEST_AKTUALIZR_BRANCH"
33fi 32BRANCH_pn-aktualizr-native = "\${BRANCH_pn-aktualizr}"
33EOF
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 @@
1SANITY_TESTED_DISTROS = ""
2SRCREV_pn-aktualizr = "$<rev-sha1>"
3SRCREV_pn-aktualizr-native = "${SRCREV_pn-aktualizr}"
4BRANCH_pn-aktualizr = "$<rev-branch>"
5BRANCH_pn-aktualizr-native = "${BRANCH_pn-aktualizr}"