forked from oxen-io/session-pysogs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.drone.jsonnet
41 lines (37 loc) · 1.65 KB
/
.drone.jsonnet
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
local distro = 'sid';
local distro_name = 'Debian ' + distro;
local distro_docker = 'registry.oxen.rocks/lokinet-ci-debian-' + distro + '-builder';
local apt_get_quiet = 'apt-get -o=Dpkg::Use-Pty=0 -q';
local repo_suffix = '/staging'; // can be /beta or /staging for non-primary repo deps
local deb_pipeline(image, buildarch='amd64', debarch='amd64', jobs=6) = {
kind: 'pipeline',
type: 'docker',
name: distro_name + ' (' + debarch + ')',
platform: { arch: buildarch },
steps: [
{
name: 'build',
image: image,
environment: { SSH_KEY: { from_secret: 'SSH_KEY' } },
commands: [
'echo "Building on ${DRONE_STAGE_MACHINE}"',
'echo "man-db man-db/auto-update boolean false" | debconf-set-selections',
'echo deb http://deb.oxen.io' + repo_suffix + ' ' + distro + ' main >/etc/apt/sources.list.d/oxen.list',
'cp debian/deb.oxen.io.gpg /etc/apt/trusted.gpg.d',
apt_get_quiet + ' update',
apt_get_quiet + ' install -y eatmydata',
'eatmydata ' + apt_get_quiet + ' dist-upgrade -y',
'eatmydata ' + apt_get_quiet + ' install --no-install-recommends -y git-buildpackage devscripts equivs openssh-client',
'cd debian',
'eatmydata mk-build-deps -i -r --tool="' + apt_get_quiet + ' -o Debug::pkgProblemResolver=yes --no-install-recommends -y" control',
'cd ..',
"eatmydata gbp buildpackage --git-no-pbuilder --git-builder='debuild' --git-upstream-tag=HEAD -us -uc -j" + jobs,
'./debian/ci-upload.sh ' + distro + ' ' + debarch,
],
},
],
};
[
deb_pipeline(distro_docker),
// Everything we build is arch-all, so no need for different arch builds
]