2021-04-22 17:14:20 +00:00
|
|
|
local distro = "hirsute";
|
|
|
|
local distro_name = 'Ubuntu 21.04';
|
|
|
|
local distro_docker = 'ubuntu:hirsute';
|
2020-05-15 23:29:05 +00:00
|
|
|
|
2020-09-22 19:52:58 +00:00
|
|
|
local apt_get_quiet = 'apt-get -o=Dpkg::Use-Pty=0 -q';
|
2020-06-17 13:42:11 +00:00
|
|
|
|
2021-04-22 05:52:16 +00:00
|
|
|
local repo_suffix = '/staging'; // can be /beta or /staging for non-primary repo deps
|
2020-06-17 13:42:11 +00:00
|
|
|
|
2020-06-12 16:57:59 +00:00
|
|
|
local submodules = {
|
|
|
|
name: 'submodules',
|
|
|
|
image: 'drone/git',
|
2020-09-23 22:52:15 +00:00
|
|
|
commands: ['git fetch --tags', 'git submodule update --init --recursive --depth=1']
|
2020-06-12 16:57:59 +00:00
|
|
|
};
|
|
|
|
|
2020-09-23 20:00:10 +00:00
|
|
|
local deb_pipeline(image, buildarch='amd64', debarch='amd64', jobs=6) = {
|
2020-05-15 23:29:05 +00:00
|
|
|
kind: 'pipeline',
|
|
|
|
type: 'docker',
|
2020-09-23 20:00:10 +00:00
|
|
|
name: distro_name + ' (' + debarch + ')',
|
2020-09-22 19:52:58 +00:00
|
|
|
platform: { arch: buildarch },
|
2020-05-15 23:29:05 +00:00
|
|
|
steps: [
|
2020-06-12 16:57:59 +00:00
|
|
|
submodules,
|
2020-05-15 23:29:05 +00:00
|
|
|
{
|
|
|
|
name: 'build',
|
|
|
|
image: image,
|
2020-05-23 03:36:30 +00:00
|
|
|
environment: { SSH_KEY: { from_secret: "SSH_KEY" } },
|
2020-05-15 23:29:05 +00:00
|
|
|
commands: [
|
2020-11-10 19:53:57 +00:00
|
|
|
'echo "Building on ${DRONE_STAGE_MACHINE}"',
|
2020-05-23 03:32:00 +00:00
|
|
|
'echo "man-db man-db/auto-update boolean false" | debconf-set-selections',
|
2020-09-23 17:25:43 +00:00
|
|
|
'echo deb http://deb.loki.network' + repo_suffix + ' ' + distro + ' main >/etc/apt/sources.list.d/loki.list',
|
2020-09-23 17:13:10 +00:00
|
|
|
'cp debian/deb.loki.network.gpg /etc/apt/trusted.gpg.d',
|
2020-09-22 19:52:58 +00:00
|
|
|
apt_get_quiet + ' update',
|
|
|
|
apt_get_quiet + ' install -y eatmydata',
|
|
|
|
'eatmydata ' + apt_get_quiet + ' dist-upgrade -y',
|
2020-09-23 17:13:10 +00:00
|
|
|
'eatmydata ' + apt_get_quiet + ' install --no-install-recommends -y git-buildpackage devscripts equivs ccache openssh-client',
|
2020-09-22 19:52:58 +00:00
|
|
|
'cd debian',
|
|
|
|
'eatmydata mk-build-deps -i -r --tool="' + apt_get_quiet + ' -o Debug::pkgProblemResolver=yes --no-install-recommends -y" control',
|
|
|
|
'cd ..',
|
2020-09-22 23:36:40 +00:00
|
|
|
'eatmydata gbp buildpackage --git-no-pbuilder --git-builder=\'debuild --preserve-envvar=CCACHE_*\' --git-upstream-tag=HEAD -us -uc -j' + jobs,
|
2020-09-22 19:52:58 +00:00
|
|
|
'./debian/ci-upload.sh ' + distro + ' ' + debarch,
|
|
|
|
],
|
2020-05-23 14:46:45 +00:00
|
|
|
}
|
|
|
|
]
|
|
|
|
};
|
|
|
|
|
2020-05-15 23:29:05 +00:00
|
|
|
[
|
2020-09-23 20:00:10 +00:00
|
|
|
deb_pipeline(distro_docker),
|
|
|
|
deb_pipeline("arm64v8/" + distro_docker, buildarch='arm64', debarch="arm64", jobs=4),
|
|
|
|
deb_pipeline("arm32v7/" + distro_docker, buildarch='arm64', debarch="armhf", jobs=4),
|
2020-05-15 23:29:05 +00:00
|
|
|
]
|