images: add scripts to download datadog-ci and sccache in debian packages images + enable kisscache
What
This MR refactor some parts of the Dockerfile for debian packages to install datadog-ci and sccache using two scripts.
These scripts are going to be re-used across all our images streamlining this process and centralizing version handling.
I also enable kisscache for this image setting up two env vars used by opam. However, to use kisscache we need an opam > 2.1 shipped in bookworm, so I added also a script to download and install opam. There is a small quirk in the way opam picks up env variables. It see that if I don't export the variables in the build script, they are ignored.
Why
How
The new script is very similar to another script we already use to download and install datagod-ci
images/scripts/install_datadog_static.sh
I download the release and check the sha256 for both archs.
In a next MR I'll use the kiss-fetch.sh instead of curl to download these binaries from our proxy.
Manually testing the MR
check if the packages dependencies pipelines a still built correctly.
I've also run a scheduled pipeline to check this change across all the test matrix.
https://gitlab.com/tezos/tezos/-/pipelines/1866029730
To check kisscache at work, look at the logs of this job:
https://gitlab.com/tezos/tezos/-/jobs/10276466857
#21 320.2 Kisscache hits : 203
#21 320.2 Kisscache errors : 0
#21 320.2 Fallback to mangled URL : 0
#21 320.2 Direct download failures : 0
Checklist
-
Document the interface of any function added or modified (see the coding guidelines) -
Document any change to the user interface, including configuration parameters (see node configuration) -
Provide automatic testing (see the testing guide). -
For new features and bug fixes, add an item in the appropriate changelog ( docs/protocols/alpha.rstfor the protocol and the environment,CHANGES.rstat the root of the repository for everything else). -
Select suitable reviewers using the Reviewersfield below. -
Select as Assigneethe next person who should take action on that MR