Cache key wasn't taking account changes in the version of bundled software (#16985)
To optimize the CI we are trying to cache build artifacts such as all the software we build and statically bundle for static binaries (for each arch) In a nutshell the artifacts of these https://github.com/netdata/netdata/tree/master/packaging/makeself/jobs source files. With this https://github.com/netdata/netdata/blob/master/.github/scripts/get-static-cache-key.sh script we generate the keys for these cached artifacts taking into account the (source files of the jobs, version of the software, static packages bundled in the base images). The effort #16303 to make a centralized file for all the versions expanded the problem of not considering the exact versions. Signed-off-by: Tasos Katsoulas <tasos@netdata.cloud>
Tasos Katsoulas committed
Feb 29, 2024 at 14:15 UTC
48507277a39f588d20d227605ff2cfb94eed2d6f
7 files changed
+6
-5
.github/scripts/get-static-cache-key.sh
+1
@@ -8,6 +8,7 @@ docker pull --platform "${platform}" netdata/static-builder:${builder_rev}
8
9
# shellcheck disable=SC2046
10
cat $(find packaging/makeself/jobs -type f ! -regex '.*\(netdata\|-makeself\).*') > /tmp/static-cache-key-data
11
+cat packaging/makeself/bundled-packages.version >> /tmp/static-cache-key-data
12
13
docker run -it --rm --platform "${platform}" netdata/static-builder:${builder_rev} sh -c 'apk list -I 2>/dev/null' >> /tmp/static-cache-key-data
14
packaging/makeself/bundled-packages.version
renamed
packaging/makeself/jobs/20-openssl.install.sh
+1
-1
@@ -4,7 +4,7 @@
4
# shellcheck source=packaging/makeself/functions.sh
5
. "$(dirname "${0}")/../functions.sh" "${@}" || exit 1
6
# Source of truth for all the packages we bundle in static builds
7
-. "$(dirname "${0}")/../bundled-packages"
7
+. "$(dirname "${0}")/../bundled-packages.version"
8
# shellcheck disable=SC2015
9
[ "${GITHUB_ACTIONS}" = "true" ] && echo "::group::Building OpenSSL" || true
10
packaging/makeself/jobs/50-bash-5.1.16.install.sh
+1
-1
@@ -4,7 +4,7 @@
4
# shellcheck source=packaging/makeself/functions.sh
5
. "$(dirname "${0}")/../functions.sh" "${@}" || exit 1
6
# Source of truth for all the packages we bundle in static builds
7
-. "$(dirname "${0}")/../bundled-packages"
7
+. "$(dirname "${0}")/../bundled-packages.version"
8
9
# shellcheck disable=SC2015
10
[ "${GITHUB_ACTIONS}" = "true" ] && echo "::group::building bash" || true
packaging/makeself/jobs/50-curl.install.sh
+1
-1
@@ -4,7 +4,7 @@
4
# shellcheck source=packaging/makeself/functions.sh
5
. "$(dirname "${0}")/../functions.sh" "${@}" || exit 1
6
# Source of truth for all the packages we bundle in static builds
7
-. "$(dirname "${0}")/../bundled-packages"
7
+. "$(dirname "${0}")/../bundled-packages.version"
8
9
# shellcheck disable=SC2015
10
[ "${GITHUB_ACTIONS}" = "true" ] && echo "::group::Building cURL" || true
packaging/makeself/jobs/50-ioping-1.3.install.sh
+1
-1
@@ -4,7 +4,7 @@
4
# shellcheck source=packaging/makeself/functions.sh
5
. "$(dirname "${0}")/../functions.sh" "${@}" || exit 1
6
# Source of truth for all the packages we bundle in static builds
7
-. "$(dirname "${0}")/../bundled-packages" || exit 1
7
+. "$(dirname "${0}")/../bundled-packages.version" || exit 1
8
9
# shellcheck disable=SC2015
10
[ "${GITHUB_ACTIONS}" = "true" ] && echo "::group::Building ioping" || true
packaging/makeself/jobs/50-libnetfilter_acct-1.0.3.install.sh
+1
-1
@@ -7,7 +7,7 @@
7
# shellcheck source=packaging/makeself/functions.sh
8
. "$(dirname "${0}")/../functions.sh" "${@}" || exit 1
9
# Source of truth for all the packages we bundle in static builds
10
-. "$(dirname "${0}")/../bundled-packages" || exit 1
10
+. "$(dirname "${0}")/../bundled-packages.version" || exit 1
11
12
# shellcheck disable=SC2015
13
[ "${GITHUB_ACTIONS}" = "true" ] && echo "::group::building libnetfilter_acct" || true