diff options
author | Laurent Bonnans <laurent.bonnans@here.com> | 2018-06-26 15:53:00 +0200 |
---|---|---|
committer | Laurent Bonnans <laurent.bonnans@here.com> | 2018-09-06 11:45:07 +0200 |
commit | 7023fdda425f9d5e3b48e2cd12f961c0060ace54 (patch) | |
tree | 62c62ade104ff7f1eae67c75cb8f82f6c3931ae3 /scripts/ci | |
parent | 0d3b28dac079df41132d4a80cc232105cde1bcc3 (diff) | |
download | meta-updater-7023fdda425f9d5e3b48e2cd12f961c0060ace54.tar.gz |
Setup garage credentials for oe-selftest CI
Diffstat (limited to 'scripts/ci')
-rw-r--r-- | scripts/ci/Jenkinsfile.bleeding | 16 | ||||
-rwxr-xr-x | scripts/ci/configure.sh | 25 |
2 files changed, 23 insertions, 18 deletions
diff --git a/scripts/ci/Jenkinsfile.bleeding b/scripts/ci/Jenkinsfile.bleeding index aba7d39..f4d8883 100644 --- a/scripts/ci/Jenkinsfile.bleeding +++ b/scripts/ci/Jenkinsfile.bleeding | |||
@@ -56,27 +56,21 @@ pipeline { | |||
56 | ''' | 56 | ''' |
57 | } | 57 | } |
58 | } | 58 | } |
59 | stage('build-core-image-minimal') { | 59 | stage('build-core-image-minimal+oe-selftest') { |
60 | agent { | 60 | agent { |
61 | dockerfile { | 61 | dockerfile { |
62 | filename 'scripts/ci/Dockerfile.bitbake' | 62 | filename 'scripts/ci/Dockerfile.bitbake' |
63 | args '-v /opt/jenkins/bitbake-common:/opt/jenkins/bitbake-common' | 63 | args '-v /opt/jenkins/bitbake-common:/opt/jenkins/bitbake-common' |
64 | } | 64 | } |
65 | } | 65 | } |
66 | environment { | ||
67 | TEST_AKTUALIZR_CREDENTIALS = credentials('garage-credentials') | ||
68 | } | ||
66 | steps { | 69 | steps { |
67 | sh 'scripts/ci/configure.sh' | 70 | sh 'scripts/ci/configure.sh' |
68 | 71 | ||
69 | sh 'scripts/ci/build.sh core-image-minimal' | 72 | sh 'scripts/ci/build.sh core-image-minimal' |
70 | } | 73 | |
71 | } | ||
72 | stage('oe-selftest') { | ||
73 | agent { | ||
74 | dockerfile { | ||
75 | filename 'scripts/ci/Dockerfile.bitbake' | ||
76 | args '-v /opt/jenkins/bitbake-common:/opt/jenkins/bitbake-common' | ||
77 | } | ||
78 | } | ||
79 | steps { | ||
80 | sh 'scripts/ci/oe-selftest.sh' | 74 | sh 'scripts/ci/oe-selftest.sh' |
81 | } | 75 | } |
82 | } | 76 | } |
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 | |||
6 | TEST_MACHINE=${TEST_MACHINE:-qemux86-64} | 6 | TEST_MACHINE=${TEST_MACHINE:-qemux86-64} |
7 | TEST_BUILD_DIR=${TEST_BUILD_DIR:-build} | 7 | 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 | 10 | ||
10 | TEST_AKTUALIZR_DIR=${TEST_AKTUALIZR_DIR:-.} | 11 | TEST_AKTUALIZR_DIR=${TEST_AKTUALIZR_DIR:-.} |
11 | TEST_AKTUALIZR_BRANCH=${TEST_AKTUALIZR_BRANCH:-master} | 12 | TEST_AKTUALIZR_BRANCH=${TEST_AKTUALIZR_BRANCH:-master} |
12 | TEST_AKTUALIZR_REV=${TEST_AKTUALIZR_REV:-$(GIT_DIR="$TEST_AKTUALIZR_DIR/.git" git rev-parse "$TEST_AKTUALIZR_REMOTE/$TEST_AKTUALIZR_BRANCH")} | 13 | TEST_AKTUALIZR_REV=${TEST_AKTUALIZR_REV:-$(GIT_DIR="$TEST_AKTUALIZR_DIR/.git" git rev-parse "$TEST_AKTUALIZR_REMOTE/$TEST_AKTUALIZR_BRANCH")} |
13 | TEST_BITBAKE_COMMON_DIR=${TEST_BITBAKE_COMMON_DIR:-} | 14 | TEST_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 |
16 | rm -rf "${TEST_BUILD_DIR}/conf.old" || true | 17 | rm -rf "$TEST_BUILD_DIR/conf.old" || true |
17 | mv "${TEST_BUILD_DIR}/conf" "${TEST_BUILD_DIR}/conf.old" || true | 18 | mv "$TEST_BUILD_DIR/conf" "$TEST_BUILD_DIR/conf.old" || true |
18 | 19 | ||
19 | ( | 20 | ( |
20 | set +euo pipefail | 21 | set +euo pipefail |
21 | set +x | 22 | set +x |
22 | echo ">> Running envsetup.sh" | 23 | echo ">> 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 | ||
26 | set +x | 27 | set +x |
27 | 28 | ||
29 | SITE_CONF="$TEST_BUILD_DIR/conf/site.conf" | ||
30 | |||
28 | echo ">> Set common bitbake config options" | 31 | echo ">> Set common bitbake config options" |
29 | cat << EOF > "${TEST_BUILD_DIR}/conf/site.conf" | 32 | cat << EOF > "$SITE_CONF" |
30 | SANITY_TESTED_DISTROS = "" | 33 | SANITY_TESTED_DISTROS = "" |
31 | SSTATE_MIRRORS ?= "file://.* https://bitbake-cache.atsgarage.com/PATH;downloadfilename=PATH" | 34 | SSTATE_MIRRORS ?= "file://.* https://bitbake-cache.atsgarage.com/PATH;downloadfilename=PATH" |
32 | IMAGE_FEATURES += "ssh-server-openssh" | 35 | IMAGE_FEATURES += "ssh-server-openssh" |
@@ -34,7 +37,7 @@ IMAGE_FEATURES += "ssh-server-openssh" | |||
34 | EOF | 37 | EOF |
35 | 38 | ||
36 | echo ">> Set aktualizr branch in bitbake's config" | 39 | echo ">> Set aktualizr branch in bitbake's config" |
37 | cat << EOF >> "${TEST_BUILD_DIR}/conf/site.conf" | 40 | cat << EOF >> "$SITE_CONF" |
38 | SRCREV_pn-aktualizr = "$TEST_AKTUALIZR_REV" | 41 | SRCREV_pn-aktualizr = "$TEST_AKTUALIZR_REV" |
39 | SRCREV_pn-aktualizr-native = "\${SRCREV_pn-aktualizr}" | 42 | SRCREV_pn-aktualizr-native = "\${SRCREV_pn-aktualizr}" |
40 | BRANCH_pn-aktualizr = "$TEST_AKTUALIZR_BRANCH" | 43 | BRANCH_pn-aktualizr = "$TEST_AKTUALIZR_BRANCH" |
@@ -42,12 +45,20 @@ BRANCH_pn-aktualizr-native = "\${BRANCH_pn-aktualizr}" | |||
42 | 45 | ||
43 | EOF | 46 | EOF |
44 | 47 | ||
48 | if [[ -n $TEST_AKTUALIZR_CREDENTIALS ]]; then | ||
49 | echo ">> Set aktualizr credentials" | ||
50 | cat << EOF >> "$SITE_CONF" | ||
51 | SOTA_PACKED_CREDENTIALS = "$TEST_AKTUALIZR_CREDENTIALS" | ||
52 | EOF | ||
53 | fi | ||
54 | |||
45 | if [[ -n $TEST_BITBAKE_COMMON_DIR ]]; then | 55 | if [[ -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" | ||
51 | SSTATE_DIR = "$SSTATE_DIR" | 62 | SSTATE_DIR = "$SSTATE_DIR" |
52 | DL_DIR = "$DL_DIR" | 63 | DL_DIR = "$DL_DIR" |
53 | EOF | 64 | EOF |