diff options
author | Fathi Boudra <fathi.boudra@linaro.org> | 2016-12-16 19:03:35 +0200 |
---|---|---|
committer | Fathi Boudra <fathi.boudra@linaro.org> | 2017-02-09 12:15:59 +0000 |
commit | c9a814e7b6ce5e86f385cc922aaee0741a2bac03 (patch) | |
tree | fec963a9b10772d3576123824813fe4fd697d9ed | |
parent | a33700d7879f10b206d53d466910f355d4d4d4c4 (diff) |
lite-gateway-ubuntu-core: initial build job
https://projects.linaro.org/browse/TICKET-580
Change-Id: I2f4ca6bb209d4f267293bd9170dea7feaa65cb1a
Signed-off-by: Fathi Boudra <fathi.boudra@linaro.org>
-rw-r--r-- | lite-gateway-ubuntu-core.yaml | 27 | ||||
-rwxr-xr-x | lite-gateway-ubuntu-core/builders.sh | 30 | ||||
-rw-r--r-- | lite-gateway-ubuntu-core/pi-3.json | 11 |
3 files changed, 68 insertions, 0 deletions
diff --git a/lite-gateway-ubuntu-core.yaml b/lite-gateway-ubuntu-core.yaml new file mode 100644 index 0000000000..41ac90eaa5 --- /dev/null +++ b/lite-gateway-ubuntu-core.yaml @@ -0,0 +1,27 @@ +- job: + name: lite-gateway-ubuntu-core + project-type: freestyle + defaults: global + properties: + - authorization: + anonymous: + - job-read + - job-extended-read + - build-discarder: + days-to-keep: 30 + num-to-keep: 30 + disabled: false + node: docker-xenial-amd64 + display-name: 'LITE - Ubuntu Core gateway image' + wrappers: + - timestamps + - copy-to-slave: + includes: + - snap.tar + relative-to: 'somewhereElse' + builders: + - shell: + !include-raw: lite-gateway-ubuntu-core/builders.sh + publishers: + - email: + recipients: 'fathi.boudra@linaro.org madper.xie@linaro.org' diff --git a/lite-gateway-ubuntu-core/builders.sh b/lite-gateway-ubuntu-core/builders.sh new file mode 100755 index 0000000000..ea0c6e9b23 --- /dev/null +++ b/lite-gateway-ubuntu-core/builders.sh @@ -0,0 +1,30 @@ +#!/bin/bash + +export SNAP=$(mktemp -d /tmp/lite.XXXXXX) + +echo "deb http://archive.ubuntu.com/ubuntu/ xenial-updates main universe" | sudo tee -a /etc/apt/sources.list +echo "deb http://archive.ubuntu.com/ubuntu/ xenial-proposed main universe" | sudo tee -a /etc/apt/sources.list + +sudo apt -q=2 update +sudo apt -q=2 install -y --no-install-recommends dosfstools snapcraft snapd squashfs-tools ubuntu-image + +set -ex + +trap cleanup_exit INT TERM EXIT + +cleanup_exit() +{ + cd ${WORKSPACE} + sudo umount ${SNAP} || true + sudo rm -rf ${SNAP} || true + sudo rm -f ubuntu-image_* pi-3.* +} + +tar xf snap.tar -C ${HOME} +wget -q https://git.linaro.org/ci/job/configs.git/blob_plain/HEAD:/lite-gateway-ubuntu-core/pi-3.json -O pi-3.json +cat pi-3.json | snap sign -k madper-new &> pi-3.model + +snap download ubuntu-image + +sudo mount -o loop -t squashfs ubuntu-image_*.snap ${SNAP} +${SNAP}/command-ubuntu-image.wrapper -c beta -o pi-3.img pi-3.model diff --git a/lite-gateway-ubuntu-core/pi-3.json b/lite-gateway-ubuntu-core/pi-3.json new file mode 100644 index 0000000000..bb8845f4db --- /dev/null +++ b/lite-gateway-ubuntu-core/pi-3.json @@ -0,0 +1,11 @@ +{ + "type": "model", + "authority-id": "fsbTOvw7utNforMLgfgLMbrw9hDeTvLb", + "brand-id": "fsbTOvw7utNforMLgfgLMbrw9hDeTvLb", + "series": "16", + "model": "my-pi3", + "architecture": "armhf", + "gadget": "pi3", + "kernel": "pi2-kernel", + "timestamp": "2016-12-01T11:22:58+00:00" +} |