Merge lp:~sergiusens/jenkins-launchpad-plugin/touch-image-builder into lp:~private-ps-quality-team/jenkins-launchpad-plugin/trunk

Proposed by Sergio Schvezov
Status: Superseded
Proposed branch: lp:~sergiusens/jenkins-launchpad-plugin/touch-image-builder
Merge into: lp:~private-ps-quality-team/jenkins-launchpad-plugin/trunk
Diff against target: 203 lines (+189/-0)
3 files modified
build-android.sh (+130/-0)
ubuntu-touch-image-setup.sh (+54/-0)
ubuntu-touch-image.sh (+5/-0)
To merge this branch: bzr merge lp:~sergiusens/jenkins-launchpad-plugin/touch-image-builder

This proposal has been superseded by a proposal from 2014-01-07.

To post a comment you must log in.
12. By Sergio Schvezov

Making build more verbose and easier to read

Unmerged revisions

12. By Sergio Schvezov

Making build more verbose and easier to read

11. By Francis Ginther

Remove bootstrap of goldfish.

10. By Francis Ginther

Fix TOOL_DIR pull.

9. By Francis Ginther

Add pull or branch logic for TOOLS_DIR.

8. By Francis Ginther

Remove JOB_DIR as this will run from within the jenkins job.

7. By Francis Ginther

Add set -ex to setup script.

6. By Francis Ginther

Add ubuntu-touch-image.sh as a master script.

5. By Francis Ginther

Make ubuntu-touch-image-setup.sh executable.

4. By Francis Ginther

Adding Android build script.

3. By Francis Ginther

Update vendor branches.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== added file 'build-android.sh'
--- build-android.sh 1970-01-01 00:00:00 +0000
+++ build-android.sh 2014-01-07 19:02:29 +0000
@@ -0,0 +1,130 @@
1#!/bin/bash
2# This program is free software: you can redistribute it and/or modify it
3# under the terms of the the GNU General Public License version 3, as
4# published by the Free Software Foundation.
5#
6# This program is distributed in the hope that it will be useful, but
7# WITHOUT ANY WARRANTY; without even the implied warranties of
8# MERCHANTABILITY, SATISFACTORY QUALITY or FITNESS FOR A PARTICULAR
9# PURPOSE. See the applicable version of the GNU Lesser General Public
10# License for more details.
11#.
12# You should have received a copy of the GNU General Public License
13# along with this program. If not, see <http://www.gnu.org/licenses/>.
14#
15# Copyright (C) 2013 Canonical, Ltd.
16
17# The android build gets confused with this set
18
19set -xe
20
21export JENKINS_BUILD_NUMBER=$series-$BUILD_NUMBER
22export stamp=$(pwd)/ubuntu/assets/ubuntu_stamp
23
24# if BUILD_NUMBER is set, Android uses it in it's artifact filename
25unset BUILD_NUMBER
26#export http_proxy=http://10.128.92.2:3128
27#export https_proxy=http://10.128.92.2:3128
28export
29
30sum_append() {
31 cd archive
32 sha256 $1 > $1.sha256
33 cd -
34}
35
36repo_dump_heads() {
37 repo list | awk -F' ' '{print $1}' | while read project; do
38 gitlog=`git --git-dir=$PWD/$project/.git log -n 1 --pretty="format:%h : %s"`
39 echo "$project : $gitlog"
40 done
41}
42
43create_build_stamp() {
44 echo Creating build stamp
45 if [ -f $stamp ]
46 then
47 rm $stamp
48 if [ -n "$1" ]
49 then
50 echo HARDWARE=$1 >> $stamp
51 fi
52 echo JENKINS_BUILD=$JENKINS_BUILD_NUMBER >> $stamp
53 echo -e "\nAndroid repo head list:" >> $stamp
54 repo_dump_heads >> $stamp
55 fi
56}
57
58build_device() {
59 echo Building $1
60 create_build_stamp $1
61 breakfast $1
62 # The -j1 is only for debugging now
63 make -j1 showcommands bacon BUILD_WITH_COLORS=0
64 if [ $? != 0 ]
65 then
66 echo Build for $1 failed
67 exit 1
68 fi
69 mv $OUT/cm-10.1-*-$CM_BUILD.zip archive/$series-preinstalled-armel+$CM_BUILD.zip
70 mv $OUT/recovery.img archive/$series-preinstalled-recovery-armel+$CM_BUILD.img
71 mv $OUT/system.img archive/$series-preinstalled-system-armel+$CM_BUILD.img
72 mv $OUT/boot.img archive/$series-preinstalled-boot-armel+$CM_BUILD.img
73 sum_append $series-preinstalled-armel+$CM_BUILD.zip
74 sum_append $series-preinstalled-recovery-armel+$CM_BUILD.img
75 sum_append $series-preinstalled-system-armel+$CM_BUILD.img
76 sum_append $series-preinstalled-boot-armel+$CM_BUILD.img
77}
78
79if [ -d archive ]
80then
81 echo Removing previously archived components
82 rm -rf archive
83fi
84
85echo Creating archive directory
86mkdir archive
87
88set -e
89echo Running repo sync
90export android_changelog=$(mktemp)
91repo sync 2>&1 | tee -a $android_changelog
92repo manifest -o android_manifest.xml -r
93# Clean empty lines as repo output is not so friendly
94sed -i '${/^$/d}' $android_changelog
95set +e
96
97. build/envsetup.sh
98
99if [ "$clobber" == "true" ]
100then
101 echo
102 echo Cleaning
103 echo
104 make clobber
105else
106 echo
107 echo Performing an incremental build
108 echo
109fi
110
111echo Updating bzr branches
112for dir in vendor/samsung vendor/lge vendor/audience vendor/broadcom vendor/nxp vendor/nvidia vendor/invensense vendor/elan vendor/widevine vendor/asus
113do
114 echo Trying to update $dir
115 if [ -d $dir ]
116 then
117 cd $dir
118 bzr pull
119 croot
120 fi
121done
122
123export timestamp=$(date +%Y%m%d)
124create_build_stamp
125cp $stamp archive
126build_device manta
127build_device maguro
128build_device mako
129build_device grouper
130
0131
=== added file 'ubuntu-touch-image-setup.sh'
--- ubuntu-touch-image-setup.sh 1970-01-01 00:00:00 +0000
+++ ubuntu-touch-image-setup.sh 2014-01-07 19:02:29 +0000
@@ -0,0 +1,54 @@
1#!/bin/bash
2set -ex
3
4FLAG_FILE=repo-init-complete
5
6if [ -f $FLAG_FILE ]; then
7 echo "Skipping repository init"
8 exit 0
9fi
10
11TOOLS_DIR=~/phablet-build-scripts
12# REPO_DIR is equivalent to the jenkins job workspace
13REPO_DIR=/home/ubuntu/jenkins/workspace/ubuntu-touch-image
14
15# Setup phablet-tools
16sudo add-apt-repository ppa:phablet-team/tools
17sudo apt-get update
18sudo apt-get install -y phablet-tools android-tools-adb android-tools-fastboot
19
20# Setup build dependencies
21sudo apt-get install -y git gnupg flex bison gperf build-essential \
22 zip bzr curl libc6-dev libncurses5-dev:i386 x11proto-core-dev \
23 libx11-dev:i386 libreadline6-dev:i386 libgl1-mesa-glx:i386 \
24 libgl1-mesa-dev g++-multilib mingw32 ubuntu-dev-tools tofrodos \
25 python-markdown libxml2-utils xsltproc zlib1g-dev:i386 schedtool bsdiff
26sudo apt-get install -y openjdk-6-jdk
27
28# Setup tools
29if [ -d $TOOLS_DIR ]; then
30 cd $TOOLS_DIR
31 bzr pull
32 cd -
33else
34 bzr branch lp:touch-preview-images/phablet-build-scripts $TOOLS_DIR
35fi
36
37# Init repository
38phablet-dev-bootstrap . -c
39phablet-dev-bootstrap -v mako,maguro,manta,grouper . -c
40
41# Add private branches
42cd vendor
43bzr branch bzr+ssh://bazaar.launchpad.net/~rocket-scientists/aal+/cm-vendor-asus_jb/ asus
44bzr branch bzr+ssh://bazaar.launchpad.net/~rocket-scientists/aal+/cm-vendor-audience_jb/ audience
45bzr branch bzr+ssh://bazaar.launchpad.net/~rocket-scientists/aal+/cm-vendor-broadcom_jb/ broadcom
46bzr branch bzr+ssh://bazaar.launchpad.net/~rocket-scientists/aal+/cm-vendor-elan_jb/ elan
47bzr branch bzr+ssh://bazaar.launchpad.net/~rocket-scientists/aal+/cm-vendor-lge_jb/ lge
48bzr branch bzr+ssh://bazaar.launchpad.net/~rocket-scientists/aal+/cm-vendor-nvidia_jb/ nvidia
49bzr branch bzr+ssh://bazaar.launchpad.net/~rocket-scientists/aal+/cm-vendor-nxp_jb/ nxp
50bzr branch bzr+ssh://bazaar.launchpad.net/~rocket-scientists/aal+/cm-vendor-samsung_jb/ samsung
51bzr branch bzr+ssh://bazaar.launchpad.net/~rocket-scientists/aal+/cm-vendor-widevine_jb/ widevine
52cd ..
53
54touch $FLAG_FILE
055
=== added file 'ubuntu-touch-image.sh'
--- ubuntu-touch-image.sh 1970-01-01 00:00:00 +0000
+++ ubuntu-touch-image.sh 2014-01-07 19:02:29 +0000
@@ -0,0 +1,5 @@
1#!/bin/bash
2set -ex
3
4./ubuntu-touch-image-setup.sh
5./build-android.sh

Subscribers

People subscribed via source and target branches

to all changes: