Skip to content

Commit cd92cf3

Browse files
author
Pat
authored
packaging: add updates for server publishing (#5080)
Signed-off-by: Patrick Stephens <[email protected]>
1 parent d932d39 commit cd92cf3

File tree

3 files changed

+113
-8
lines changed

3 files changed

+113
-8
lines changed

packaging/server/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
This directory contains the necessary files to support publishing release packages.

packaging/server/aptly.conf

Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
{
2+
"rootDir": "/var/www/apt.fluentbit.io",
3+
"downloadConcurrency": 4,
4+
"downloadSpeedLimit": 0,
5+
"architectures": ["i386", "amd64", "arm64", "armhf"],
6+
"dependencyFollowSuggests": false,
7+
"dependencyFollowRecommends": false,
8+
"dependencyFollowAllVariants": false,
9+
"dependencyFollowSource": false,
10+
"dependencyVerboseResolve": false,
11+
"gpgDisableSign": false,
12+
"gpgDisableVerify": false,
13+
"gpgProvider": "gpg2",
14+
"downloadSourcePackages": false,
15+
"skipLegacyPool": true,
16+
"ppaDistributorID": "ubuntu",
17+
"ppaCodename": "",
18+
"skipContentsPublishing": false,
19+
"FileSystemPublishEndpoints": {
20+
"debian/jessie": {
21+
"rootDir": "/var/www/apt.fluentbit.io/debian/jessie",
22+
"linkMethod": "copy",
23+
"verifyMethod": "md5"
24+
},
25+
"debian/stretch": {
26+
"rootDir": "/var/www/apt.fluentbit.io/debian/stretch",
27+
"linkMethod": "copy",
28+
"verifyMethod": "md5"
29+
},
30+
"debian/buster": {
31+
"rootDir": "/var/www/apt.fluentbit.io/debian/buster",
32+
"linkMethod": "copy",
33+
"verifyMethod": "md5"
34+
},
35+
"debian/bullseye": {
36+
"rootDir": "/var/www/apt.fluentbit.io/debian/bullseye",
37+
"linkMethod": "copy",
38+
"verifyMethod": "md5"
39+
},
40+
"ubuntu/xenial": {
41+
"rootDir": "/var/www/apt.fluentbit.io/ubuntu/xenial",
42+
"linkMethod": "copy",
43+
"verifyMethod": "md5"
44+
},
45+
"ubuntu/bionic": {
46+
"rootDir": "/var/www/apt.fluentbit.io/ubuntu/bionic",
47+
"linkMethod": "copy",
48+
"verifyMethod": "md5"
49+
},
50+
"ubuntu/focal": {
51+
"rootDir": "/var/www/apt.fluentbit.io/ubuntu/focal",
52+
"linkMethod": "copy",
53+
"verifyMethod": "md5"
54+
},
55+
"raspbian/jessie": {
56+
"rootDir": "/var/www/apt.fluentbit.io/raspbian/jessie",
57+
"linkMethod": "copy",
58+
"verifyMethod": "md5"
59+
},
60+
"raspbian/stretch": {
61+
"rootDir": "/var/www/apt.fluentbit.io/raspbian/stretch",
62+
"linkMethod": "copy",
63+
"verifyMethod": "md5"
64+
},
65+
"raspbian/buster": {
66+
"rootDir": "/var/www/apt.fluentbit.io/raspbian/buster",
67+
"linkMethod": "copy",
68+
"verifyMethod": "md5"
69+
},
70+
"raspbian/bullseye": {
71+
"rootDir": "/var/www/apt.fluentbit.io/raspbian/bullseye",
72+
"linkMethod": "copy",
73+
"verifyMethod": "md5"
74+
}
75+
}
76+
}

packaging/server/publish-all.sh

Lines changed: 36 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
set -eux
33

44
SOURCE_DIR=${SOURCE_DIR:-$HOME/apt}
5-
APTLY_CONFIG=${APTLY_CONFIG:-$HOME/.aptly.conf}
5+
APTLY_CONFIG=${APTLY_CONFIG:-/etc/aptly.conf}
66

77
if [ -z "$1" ]; then
88
echo "Usage: ./publish_all new_version"
@@ -47,40 +47,68 @@ echo "Publishing Debian 10 Buster"
4747
# Conflicts otherwise with existing
4848
find "$SOURCE_DIR/debian/buster/" -iname "*-bit_$VERSION*.deb" -exec aptly -config="$APTLY_CONFIG" repo add flb-debian-buster {} \;
4949
aptly -config="$APTLY_CONFIG" snapshot create "fluent-bit-debian-buster-${VERSION}" from repo flb-debian-buster
50-
aptly -config="$APTLY_CONFIG" publish switch buster filesystem:debian/buster: "fluent-bit-debian-buster-${VERSION}"
50+
if ! aptly -config="$APTLY_CONFIG" publish switch buster filesystem:debian/buster: "fluent-bit-debian-buster-${VERSION}" ; then
51+
# Cleanup snapshot in case we want to retry later
52+
aptly -config="$APTLY_CONFIG" snapshot drop "fluent-bit-debian-buster-${VERSION}"
53+
exit 1
54+
fi
5155

5256
# Debian 11 Bullseye
5357
echo "Publishing Debian 11 Bullseye"
5458
find "$SOURCE_DIR/debian/bullseye/" -iname "*-bit_$VERSION*.deb" -exec aptly -config="$APTLY_CONFIG" repo add flb-debian-bullseye {} \;
5559
aptly -config="$APTLY_CONFIG" snapshot create "fluent-bit-debian-bullseye-${VERSION}" from repo flb-debian-bullseye
56-
aptly -config="$APTLY_CONFIG" publish switch bullseye filesystem:debian/bullseye: "fluent-bit-debian-bullseye-${VERSION}"
60+
if ! aptly -config="$APTLY_CONFIG" publish switch bullseye filesystem:debian/bullseye: "fluent-bit-debian-bullseye-${VERSION}"; then
61+
# Cleanup snapshot in case we want to retry later
62+
aptly -config="$APTLY_CONFIG" snapshot drop "fluent-bit-debian-bullseye-${VERSION}"
63+
exit 1
64+
fi
5765

5866
# Raspbian 10 Buster
5967
echo "Publishing Raspbian 10 Buster"
6068
find "$SOURCE_DIR/raspbian/buster/" -iname "*-bit_$VERSION*.deb" -exec aptly -config="$APTLY_CONFIG" repo add flb-raspbian-buster {} \;
6169
aptly -config="$APTLY_CONFIG" snapshot create "fluent-bit-raspbian-buster-${VERSION}" from repo flb-raspbian-buster
62-
aptly -config="$APTLY_CONFIG" publish switch buster filesystem:raspbian/buster: "fluent-bit-raspbian-buster-${VERSION}"
70+
if ! aptly -config="$APTLY_CONFIG" publish switch buster filesystem:raspbian/buster: "fluent-bit-raspbian-buster-${VERSION}" ; then
71+
# Cleanup snapshot in case we want to retry later
72+
aptly -config="$APTLY_CONFIG" snapshot drop "fluent-bit-raspbian-buster-${VERSION}"
73+
exit 1
74+
fi
6375

6476
# Raspbian 11 Bullseye
6577
echo "Publishing Raspbian 11 Bullseye"
6678
find "$SOURCE_DIR/raspbian/bullseye/" -iname "*-bit_$VERSION*.deb" -exec aptly -config="$APTLY_CONFIG" repo add flb-raspbian-bullseye {} \;
6779
aptly -config="$APTLY_CONFIG" snapshot create "fluent-bit-raspbian-bullseye-${VERSION}" from repo flb-raspbian-bullseye
68-
aptly -config="$APTLY_CONFIG" publish switch bullseye filesystem:raspbian/bullseye: "fluent-bit-raspbian-bullseye-${VERSION}"
80+
if ! aptly -config="$APTLY_CONFIG" publish switch bullseye filesystem:raspbian/bullseye: "fluent-bit-raspbian-bullseye-${VERSION}" ; then
81+
# Cleanup snapshot in case we want to retry later
82+
aptly -config="$APTLY_CONFIG" snapshot drop "fluent-bit-raspbian-bullseye-${VERSION}"
83+
exit 1
84+
fi
6985

7086
# Ubuntu 16.04 Xenial
7187
echo "Publishing Ubuntu 16.04 Xenial"
7288
find "$SOURCE_DIR/ubuntu/xenial/" -iname "*-bit_$VERSION*.deb" -exec aptly -config="$APTLY_CONFIG" repo add flb-ubuntu-xenial {} \;
7389
aptly -config="$APTLY_CONFIG" snapshot create "fluent-bit-ubuntu-xenial-${VERSION}" from repo flb-ubuntu-xenial
74-
aptly -config="$APTLY_CONFIG" publish switch xenial filesystem:ubuntu/xenial: "fluent-bit-ubuntu-xenial-${VERSION}"
90+
if ! aptly -config="$APTLY_CONFIG" publish switch xenial filesystem:ubuntu/xenial: "fluent-bit-ubuntu-xenial-${VERSION}" ; then
91+
# Cleanup snapshot in case we want to retry later
92+
aptly -config="$APTLY_CONFIG" snapshot drop "fluent-bit-ubuntu-xenial-${VERSION}"
93+
exit 1
94+
fi
7595

7696
# Ubuntu 18.04 Bionic
7797
echo "Publishing Ubuntu 18.04 Bionic"
7898
find "$SOURCE_DIR/ubuntu/bionic/" -iname "*-bit_$VERSION*.deb" -exec aptly -config="$APTLY_CONFIG" repo add flb-ubuntu-bionic {} \;
7999
aptly -config="$APTLY_CONFIG" snapshot create "fluent-bit-ubuntu-bionic-${VERSION}" from repo flb-ubuntu-bionic
80-
aptly -config="$APTLY_CONFIG" publish switch bionic filesystem:ubuntu/bionic: "fluent-bit-ubuntu-bionic-${VERSION}"
100+
if ! aptly -config="$APTLY_CONFIG" publish switch bionic filesystem:ubuntu/bionic: "fluent-bit-ubuntu-bionic-${VERSION}" ; then
101+
# Cleanup snapshot in case we want to retry later
102+
aptly -config="$APTLY_CONFIG" snapshot drop "fluent-bit-ubuntu-bionic-${VERSION}"
103+
exit 1
104+
fi
81105

82106
# Ubuntu 20.04 Focal
83107
echo "Publishing Ubuntu 20.04 Focal"
84108
find "$SOURCE_DIR/ubuntu/focal/" -iname "*-bit_$VERSION*.deb" -exec aptly -config="$APTLY_CONFIG" repo add flb-ubuntu-focal {} \;
85109
aptly -config="$APTLY_CONFIG" snapshot create "fluent-bit-ubuntu-focal-${VERSION}" from repo flb-ubuntu-focal
86-
aptly -config="$APTLY_CONFIG" publish switch focal filesystem:ubuntu/focal: "fluent-bit-ubuntu-focal-${VERSION}"
110+
if ! aptly -config="$APTLY_CONFIG" publish switch focal filesystem:ubuntu/focal: "fluent-bit-ubuntu-focal-${VERSION}"; then
111+
# Cleanup snapshot in case we want to retry later
112+
aptly -config="$APTLY_CONFIG" snapshot drop "fluent-bit-ubuntu-focal-${VERSION}"
113+
exit 1
114+
fi

0 commit comments

Comments
 (0)