forked from faucetsdn/faucet
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitlab-ci.yml
76 lines (72 loc) · 2.29 KB
/
.gitlab-ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
stages:
- build-package
- deploy-package
- build-image
build-package:
stage: build-package
image: faucet/dbuilder:3.0.3
script:
- apt-get update && apt-get upgrade -y
- mk-build-deps -i -r -t 'apt-get -f -y --force-yes'
- export DEBEMAIL='[email protected]' && export DEBFULLNAME='Faucet Maintainers'
- debchange --newversion ${CI_COMMIT_REF_NAME} -b "New upstream release"
- dpkg-buildpackage -b -us -uc -rfakeroot
- mkdir built-packages || true
- mv ../*.deb built-packages/
artifacts:
paths:
- built-packages/*
expire_in: 1 day
only:
- tags
deploy-package:
stage: deploy-package
image: faucet/dbuilder:3.0.3
script:
- cd built-packages/
- ../gitlab/deploy_deb.sh
only:
- tags
build-vm-image:
stage: build-image
image: faucet/dbuilder:3.0.3
script:
- cd images/vm/
- apt-get update && apt-get upgrade -y
- apt-get install -y locate python-pip qemu-utils kpartx squashfs-tools debootstrap procps wget sudo git
- wget http://ppa.launchpad.net/openstack-ci-core/vhd-util/ubuntu/pool/main/v/vhd-util/vhd-util_4.4.0-0ubuntu16_amd64.deb -O /tmp/vhd-util_4.4.0-0ubuntu16_amd64.deb
- dpkg -i /tmp/vhd-util_4.4.0-0ubuntu16_amd64.deb
- pip install diskimage-builder
- export container=docker
- ./build-faucet-vm.sh
artifacts:
paths:
- images/vm/faucet-amd64-*.qcow2*
expire_in: 1 week
only:
- tags
build-rpi-image:
stage: build-image
image: faucet/dbuilder:3.0.3
script:
- cd images/raspbian/
- apt-get update && apt-get upgrade -y
- apt-get install -y quilt parted manpages-pl xxd qemu-user-static debootstrap zerofree pxz zip dosfstools bsdtar libcap2-bin grep rsync xz-utils binfmt-support
- git clone https://github.com/RPi-Distro/pi-gen.git
- cd pi-gen
- git checkout tags/2018-11-13-raspbian-stretch
- mv ../prerun.sh ./export-image/
- mv ../common ./scripts/
- mv ../02-run.sh ./stage2/01-sys-tweaks/
- mv ../build.sh ./
- echo "IMG_NAME='faucet_${CI_COMMIT_REF_NAME}_raspbian'" > config
- touch ./stage3/SKIP ./stage4/SKIP ./stage5/SKIP
- touch ./stage4/SKIP_IMAGES ./stage5/SKIP_IMAGES
- export container=lxc
- ./build.sh
artifacts:
paths:
- images/raspbian/pi-gen/deploy/*
expire_in: 1 week
only:
- tags