Skip to content

Commit c2bfb0b

Browse files
authored
Merge pull request #5352 from DataDog/lloeki/reduce-ssi-image-size
Reduce SSI image size
2 parents 1578748 + 0e5d9f1 commit c2bfb0b

File tree

2 files changed

+21
-2
lines changed

2 files changed

+21
-2
lines changed

.gitlab-ci.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ variables:
1515
REPO_LANG: ruby # ruby is used rather that "rb"
1616
BUILD_JOB_NAME: save_versions
1717
REPO_NOTIFICATION_CHANNEL: "#guild-dd-ruby"
18-
OCI_PACKAGE_MAX_SIZE_BYTES: 160000000
19-
LIB_INJECTION_IMAGE_MAX_SIZE_BYTES: 200000000
18+
OCI_PACKAGE_MAX_SIZE_BYTES: 40000000
19+
LIB_INJECTION_IMAGE_MAX_SIZE_BYTES: 70000000
2020

2121
default:
2222
tags: ["arch:amd64"]

.gitlab/prepare-oci-package.sh

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,3 +43,22 @@ cp -r "../tmp/${ARCH}"/* sources
4343
## Add `datadog` gem version information
4444

4545
cp ../tmp/version sources
46+
47+
## Some packages we know are Ruby version-independent; let's store them once only
48+
49+
mkdir -p sources/ruby/common/gems
50+
51+
for package in libdatadog libddwaf; do
52+
echo ".. scanning for ${package}"
53+
54+
ls -1d sources/ruby/*/gems/${package}-* | while read -r orig; do
55+
dest="sources/ruby/common/gems/${orig##*/}"
56+
if [[ -e "${dest}" ]]; then
57+
echo "found ${dest}; removing ${orig}"
58+
rm -rf "${orig}"
59+
else
60+
mv -vf "${orig}" "${dest}"
61+
fi
62+
ln -srvf "${dest}" "${orig}"
63+
done
64+
done

0 commit comments

Comments
 (0)