Skip to content

Commit 03119c5

Browse files
ottokcvicentiu
authored andcommitted
Deb: Add a customized salsa-ci.yml for easy extra testing
As initially most tests fail, they have allow_failures defined so that testing anyway proceeds all the way to the final 'upgrade extras' stage. All of these tests work for downstream Debian packaging of MariaDB 10.4 and should eventually pass on upstream MariaDB 10.5 as well. Also upstream the Debian autopkgtests from MariaDB 10.4 in Debian so that pipeline includes running mtr.
1 parent 6f0b621 commit 03119c5

File tree

5 files changed

+1019
-11
lines changed

5 files changed

+1019
-11
lines changed

debian/autobake-deb.sh

Lines changed: 16 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,17 @@ set -e
1212
# building the deb packages here.
1313
export DEB_BUILD_OPTIONS="nocheck $DEB_BUILD_OPTIONS"
1414

15-
# Travis-CI optimizations
16-
if [[ $TRAVIS ]]
15+
# General CI optimizations to keep build output smaller
16+
if [[ $TRAVIS ]] || [[ $GITLAB_CI ]]
1717
then
18-
# On Travis-CI, the log must stay under 4MB so make the build less verbose
18+
# On both Travis and Gitlab the output log must stay under 4MB so make the
19+
# build less verbose
1920
sed -i -e '/Add support for verbose builds/,/^$/d' debian/rules
21+
fi
2022

23+
# Travis-CI optimizations to keep build small (in both duration and disk space)
24+
if [[ $TRAVIS ]]
25+
then
2126
# Don't include test suite package on Travis-CI to make the build time shorter
2227
sed '/Package: mariadb-test-data/,/^$/d' -i debian/control
2328
sed '/Package: mariadb-test$/,/^$/d' -i debian/control
@@ -112,12 +117,12 @@ LOGSTRING="MariaDB build"
112117
CODENAME="$(lsb_release -sc)"
113118
EPOCH="1:"
114119

115-
dch -b -D ${CODENAME} -v "${EPOCH}${UPSTREAM}${PATCHLEVEL}~${CODENAME}" "Automatic build with ${LOGSTRING}."
120+
dch -b -D "${CODENAME}" -v "${EPOCH}${UPSTREAM}${PATCHLEVEL}~${CODENAME}" "Automatic build with ${LOGSTRING}."
116121

117122
echo "Creating package version ${EPOCH}${UPSTREAM}${PATCHLEVEL}~${CODENAME} ... "
118123

119-
# On Travis CI, use -b to build binary only packages as there is no need to
120-
# waste time on generating the source package.
124+
# On Travis CI and Gitlab-CI, use -b to build binary only packages as there is
125+
# no need to waste time on generating the source package.
121126
if [[ $TRAVIS ]]
122127
then
123128
BUILDPACKAGE_FLAGS="-b"
@@ -131,15 +136,15 @@ fakeroot dpkg-buildpackage -us -uc -I $BUILDPACKAGE_FLAGS
131136
# If the step above fails due to missing dependencies, you can manually run
132137
# sudo mk-build-deps debian/control -r -i
133138

134-
# Don't log package contents on Travis-CI to save time and log size
135-
if [[ ! $TRAVIS ]]
139+
# Don't log package contents on Travis-CI or Gitlab-CI to save time and log size
140+
if [[ ! $TRAVIS ]] && [[ ! $GITLAB_CI ]]
136141
then
137142
echo "List package contents ..."
138143
cd ..
139-
for package in `ls *.deb`
144+
for package in *.deb
140145
do
141-
echo $package | cut -d '_' -f 1
142-
dpkg-deb -c $package | awk '{print $1 " " $2 " " $6 " " $7 " " $8}' | sort -k 3
146+
echo "$package" | cut -d '_' -f 1
147+
dpkg-deb -c "$package" | awk '{print $1 " " $2 " " $6 " " $7 " " $8}' | sort -k 3
143148
echo "------------------------------------------------"
144149
done
145150
fi

0 commit comments

Comments
 (0)