Merge lp:~milo/linaro-ci/external-fragments into lp:linaro-ci

Proposed by Milo Casagrande
Status: Merged
Merged at revision: 123
Proposed branch: lp:~milo/linaro-ci/external-fragments
Merge into: lp:linaro-ci
Prerequisite: lp:~milo/linaro-ci/bug1067838
Diff against target: 95 lines (+53/-2)
2 files modified
jenkins_common_lib (+28/-0)
jenkins_kernel_build_inst (+25/-2)
To merge this branch: bzr merge lp:~milo/linaro-ci/external-fragments
Reviewer Review Type Date Requested Status
Deepti B. Kalakeri (community) Approve
Review via email: mp+140159@code.launchpad.net

Commit message

Add support for external conf fragment.

Description of the change

The following branch adds support for retrieving, and merging, one external kernel config file.

Three new env variables are necessary to be set in the CI job:
- $conf_external is used to store the name of the external file to retrieve (as in 'vexpress.conf')
- $conf_git and $conf_branch each store the git path and the branch name (as in 'landing-teams/working/arm/kernel.git' and 'integration-linaro-vexpress')

To post a comment you must log in.
123. By Milo Casagrande

Merged bug1067838 into external-fragments.

124. By Milo Casagrande

Support multiple conf file from the same repository.

125. By Milo Casagrande

Merged from trunk.

Revision history for this message
Deepti B. Kalakeri (deeptik) wrote :

Overall changes looks good +1.
As dicussed on IRC I believe the changes are tested by Andrey and it is believed to work fine.

Can probably make the following changes when u merge it the changes.
It would be good if we made a note how the example values to these options would look like in the scripts probably better to have it in the jenkins_kernel_build_inst.
There is a small spell mistake in a comment at line 8 of the jenkins_common_lib, it should be Default instead of Defaul. ;)

review: Approve
126. By Milo Casagrande

Added description for the new env variables, added export stataments, fixed file path.

127. By Milo Casagrande

Merged from trunk.

128. By Milo Casagrande

Fixed typo.

Revision history for this message
Milo Casagrande (milo) wrote :

On Fri, Dec 21, 2012 at 11:43 AM, Deepti B. Kalakeri
<email address hidden> wrote:
> Review: Approve
>
> Overall changes looks good +1.
> As dicussed on IRC I believe the changes are tested by Andrey and it is believed to work fine.
>
> Can probably make the following changes when u merge it the changes.
> It would be good if we made a note how the example values to these options would look like in the scripts probably better to have it in the jenkins_kernel_build_inst.
> There is a small spell mistake in a comment at line 8 of the jenkins_common_lib, it should be Default instead of Defaul. ;)

Thanks Deepti!
Added a small description in 'jenkins_kernel_build_inst', also export
statements were missing there, so added those as well.

--
Milo Casagrande
Infrastructure Engineer
Linaro.org <www.linaro.org> │ Open source software for ARM SoCs

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'jenkins_common_lib'
2--- jenkins_common_lib 2012-12-18 19:40:36 +0000
3+++ jenkins_common_lib 2012-12-21 15:29:23 +0000
4@@ -3,6 +3,11 @@
5 bundle_stream_name_path="/private/team/linaro/ci-$bundle_stream_name/"
6 log_info=$BUILD_URL"consoleText"
7 pkg_dir=$kernel_version"_output_dir"
8+# Default directory where config fragments are or should be stored.
9+conf_dir="linaro/configs"
10+# Default gitweb access URL.
11+default_git_url="http://git.linaro.org/gitweb?p=$conf_git;a=blob_plain;f=linaro/configs/$conf;hb=$conf_branch"
12+
13 echo > hwpack_info # start with empty
14 echo KERNEL_CONFIG=$kernel_config >> hwpack_info
15 echo OS_INFO=`cat /etc/lsb-release | grep DISTRIB_DESCRIPTION | cut -d '=' -f 2` >> hwpack_info
16@@ -63,6 +68,29 @@
17 }
18
19 create_config_using_config_fragments() {
20+ # Retrieve first, if defined, external conf fragment.
21+ if test -n "$conf_git" -a -n "$conf_branch"; then
22+ echo "Retrieving external configuration file"
23+ if test -n "$conf_external"; then
24+ # Check that we have a place where to store everything.
25+ if ! test -d $conf_dir; then
26+ mkdir -p $conf_dir
27+ fi
28+ for conf in `printf "$conf_external" | tr ',' ' '`
29+ do
30+ curl "$default_git_url" > "$conf_dir/$conf"
31+ if test -e "$conf_dir/$conf"; then
32+ # Store everything in $conf_filenames
33+ conf_filenames="$conf_filenames $conf_dir/$conf"
34+ else
35+ echo "Config file $conf not found at $default_git_url"
36+ fi
37+ done
38+ else
39+ echo "External configuration file to retrieve not defined, skipping"
40+ fi
41+ fi
42+
43 ARCH=arm scripts/kconfig/merge_config.sh $conf_filenames
44 for cname in `find . -name \.config `
45 do
46
47=== modified file 'jenkins_kernel_build_inst'
48--- jenkins_kernel_build_inst 2012-12-19 11:50:56 +0000
49+++ jenkins_kernel_build_inst 2012-12-21 15:29:23 +0000
50@@ -3,7 +3,27 @@
51 # kernel_config='omap2plus_defconfig'
52 # export board_type='panda'
53 # kernel_flavour='omap4'
54-# rootfs_type='nano-lava'
55+# rootfs_type='nano'
56+#
57+# The following three variables:
58+# conf_git
59+# conf_branch
60+# conf_external
61+#
62+# are used to retrieve kernel config fragments from an external source tree
63+# in git.linaro.org.
64+# The URL where the files are taken is built in this way:
65+# http://git.linaro.org/gitweb?p=$conf_git;a=blob_plain;f=linaro/configs/$conf;hb=$conf_branch
66+# conf_git: is the git tree where to look into, like landing-teams/working/arm/kernel.git
67+# conf_branch: is the branch to use, like HEAD
68+# conf_external: is a comma separated list of kernel config file names to retrieve, it is
69+# possible to list also only one file name
70+#
71+# An example of usage of these variables:
72+# conf_git='landing-teams/working/arm/kernel.git'
73+# conf_branch='HEAD'
74+# conf_fragment='android.conf,imx5.conf'
75+
76 set -xe
77
78 if test -z "$kernel_config"; then
79@@ -47,12 +67,15 @@
80 fi
81
82 if test -z "$conf_filenames"; then
83- conf_filenames='omap4.conf'
84+ conf_filenames='linaro/configs/omap4.conf'
85 fi
86 if test -z "$use_config_fragment"; then
87 use_config_fragment=0
88 fi
89
90+export conf_git
91+export conf_branch
92+export conf_external
93 export kernel_config
94 export hwpack_type
95 export board_type

Subscribers

People subscribed via source and target branches