Skip to content

Commit 4bb73d8

Browse files
marco-cLa0
authored andcommitted
bot: Optimisations to reduce the Docker image size for the bot (#141)
1 parent b08b427 commit 4bb73d8

File tree

2 files changed

+6
-10
lines changed

2 files changed

+6
-10
lines changed

bot/ci/bootstrap.sh

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
#!/bin/bash -ex
22
GRCOV_VERSION="v0.5.3"
33
MERCURIAL_VERSION="5.1"
4+
VERSION_CONTROL_TOOLS_REV="709c897f2444"
45

56
apt-get update
6-
apt-get install --no-install-recommends -y curl lcov bzip2 python2-minimal python-bz2file python-dev
7+
apt-get install --no-install-recommends -y gcc curl bzip2 python2-minimal python-bz2file python-dev
78

89
# Setup mercurial from its own website, without install pip2 which has a lot of dependencies
910
curl -L https://www.mercurial-scm.org/release/mercurial-$MERCURIAL_VERSION.tar.gz | tar -C /opt -xvz
@@ -15,9 +16,11 @@ curl -L https://github.com/mozilla/grcov/releases/download/$GRCOV_VERSION/grcov-
1516
chmod +x /usr/bin/grcov
1617

1718
# Setup mercurial with needed extensions
18-
hg clone https://hg.mozilla.org/hgcustom/version-control-tools /src/version-control-tools/
19+
hg clone -r $VERSION_CONTROL_TOOLS_REV https://hg.mozilla.org/hgcustom/version-control-tools /src/version-control-tools/
1920
ln -s /src/bot/ci/hgrc $HOME/.hgrc
2021

2122
# Cleanup
23+
apt-get purge -y gcc curl python-dev
2224
apt-get autoremove -y
23-
rm -rf /src/version-control-tools/.hg
25+
rm -rf /var/lib/apt/lists/*
26+
rm -rf /src/version-control-tools/.hg /src/version-control-tools/ansible /src/version-control-tools/docs /src/version-control-tools/testing

bot/tests/test__system.py

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,3 @@ def test_grcov():
2828
Test grcov is available on the system
2929
"""
3030
assert shutil.which("grcov"), "Missing grcov"
31-
32-
33-
def test_genhtml():
34-
"""
35-
Test genhtml is available on the system
36-
"""
37-
assert shutil.which("genhtml"), "Missing genhtml"

0 commit comments

Comments
 (0)