forked from faucetsdn/faucet
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.gitlab-ci.yml
More file actions
85 lines (81 loc) · 2.99 KB
/
.gitlab-ci.yml
File metadata and controls
85 lines (81 loc) · 2.99 KB
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
77
78
79
80
81
82
83
84
85
stages:
- build-package
- deploy-package
- build-image
build-package:
stage: build-package
image: faucet/dbuilder
script:
- apt-get update && apt-get upgrade -y
- mk-build-deps -i -r -t 'apt-get -f -y --force-yes'
- export DEBEMAIL='maintainers@faucet.nz' && 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
script:
- cd built-packages/
- echo "{\"url\":\"https://packagecloud.io\",\"token\":\"$PACKAGECLOUD_TOKEN\"}" > ~/.packagecloud
- package_cloud push faucetsdn/faucet/debian/jessie *.deb || true
- package_cloud push faucetsdn/faucet/debian/stretch *.deb || true
- package_cloud push faucetsdn/faucet/debian/buster *.deb || true
- package_cloud push faucetsdn/faucet/raspbian/jessie *.deb || true
- package_cloud push faucetsdn/faucet/raspbian/stretch *.deb || true
- package_cloud push faucetsdn/faucet/raspbian/buster *.deb || true
- package_cloud push faucetsdn/faucet/ubuntu/xenial *.deb || true
- package_cloud push faucetsdn/faucet/ubuntu/artful *.deb || true
- package_cloud push faucetsdn/faucet/ubuntu/bionic *.deb || true
only:
- tags
build-vm-image:
stage: build-image
image: faucet/dbuilder
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
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 $(git describe --tags $(git rev-list --tags --max-count=1))
- 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