Merge ~morphis/snappy-hwe-snaps/+git/jenkins-jobs:f/15.04-build-support into ~snappy-hwe-team/snappy-hwe-snaps/+git/jenkins-jobs:master

Proposed by Simon Fels
Status: Merged
Approved by: Konrad Zapałowicz
Approved revision: a644569ab0a12f6ae562625d99a55d986d739259
Merged at revision: dec6ca37dfc608b8b03e388c1cf7e23c819b3a39
Proposed branch: ~morphis/snappy-hwe-snaps/+git/jenkins-jobs:f/15.04-build-support
Merge into: ~snappy-hwe-team/snappy-hwe-snaps/+git/jenkins-jobs:master
Diff against target: 42 lines (+18/-2)
2 files modified
jobs/snap/snap-build-worker.sh (+16/-0)
tools/snapbuild.sh (+2/-2)
Reviewer Review Type Date Requested Status
System Enablement Bot continuous-integration Approve
Konrad Zapałowicz (community) code Approve
Review via email: mp+330816@code.launchpad.net

Description of the change

Add build support for 15.04 based snaps

Each snap which wants to build on 15.04 has to add a .ci_overrides file with the following content to its branch:

 # Don't attempt to build on launchpad as builds for vivid aren't support
 build_on_launchpad: False
 # Force vivid as distro series
 series: vivid

To post a comment you must log in.
Revision history for this message
Konrad Zapałowicz (kzapalowicz) wrote :

ack

review: Approve (code)
Revision history for this message
System Enablement Bot (system-enablement-ci-bot) wrote :
review: Approve (continuous-integration)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/jobs/snap/snap-build-worker.sh b/jobs/snap/snap-build-worker.sh
2index 062e401..02ee65c 100644
3--- a/jobs/snap/snap-build-worker.sh
4+++ b/jobs/snap/snap-build-worker.sh
5@@ -81,6 +81,22 @@ sed -i "s/~$LAUNCHPAD_TEAM\/$LAUNCHPAD_PROJECT\/+git\/$REPO_NAME/~$LAUNCHPAD_TEA
6 # Which of both options will be used is configured in the
7 # $WORKSPACE/.build_env file.
8
9+# The project can specify overrides for certain variables we use
10+# to influence how the snap is being build. One use case for this
11+# are builds of 15.04 snaps.
12+CI_OVERRIDES_PATH="$WORKSPACE/src/.ci_overrides.yaml"
13+if [ -e $CI_OVERRIDES_PATH ]; then
14+ BUILD_ON_LAUNCHPAD_OVERRIDE=$($BUILD_SCRIPTS/tools/shyaml get-value build_on_launchpad < $CI_OVERRIDES_PATH || echo "")
15+ if [ -n "$BUILD_ON_LAUNCHPAD_OVERRIDE" ]; then
16+ BUILD_ON_LAUNCHPAD=$BUILD_ON_LAUNCHPAD_OVERRIDE
17+ fi
18+
19+ SERIES_OVERRIDE=$($BUILD_SCRIPTS/tools/shyaml get-value series < $CI_OVERRIDES_PATH || echo "")
20+ if [ -n "$SERIES_OVERRIDE" ]; then
21+ SERIES=$SERIES_OVERRIDE
22+ fi
23+fi
24+
25 if [ "$BUILD_ON_LAUNCHPAD" = False ]; then
26 SNAPBUILD_EXTRA_ARGS=
27 SNAP_TYPE=$($BUILD_SCRIPTS/tools/shyaml get-value type < $SNAPCRAFT_YAML_PATH || echo app)
28diff --git a/tools/snapbuild.sh b/tools/snapbuild.sh
29index 53b4518..90b2f91 100755
30--- a/tools/snapbuild.sh
31+++ b/tools/snapbuild.sh
32@@ -116,8 +116,8 @@ if [ "$UPDATE_CHROOT" = true ]; then
33
34 $DEBOOTSTRAP --components=main,universe --arch $BUILD_ARCH $SERIES $WORKDIR/rootfs
35 cat << EOF > $WORKDIR/rootfs/etc/apt/sources.list.d/updates.list
36-deb $DEB_REPO_URL xenial universe
37-deb $DEB_REPO_URL xenial-updates main universe
38+deb $DEB_REPO_URL $SERIES universe
39+deb $DEB_REPO_URL $SERIES-updates main universe
40 EOF
41 cat << EOF > $WORKDIR/rootfs/setup.sh
42 #!/bin/sh

Subscribers

People subscribed via source and target branches

to all changes: