diff --git a/jenkins-scripts/docker/lib/docker_generate_dockerfile.bash b/jenkins-scripts/docker/lib/docker_generate_dockerfile.bash index 4346eb904..d5487e461 100644 --- a/jenkins-scripts/docker/lib/docker_generate_dockerfile.bash +++ b/jenkins-scripts/docker/lib/docker_generate_dockerfile.bash @@ -29,6 +29,15 @@ fi [[ -z ${INSTALL_C17_COMPILER} ]] && INSTALL_C17_COMPILER=false +# Bionic|Focal builds were affected by a "gpg: keyserver receive failed" in apt-key execution +# that poisoned a lot of docker cache in different builds and nodes. Force invalidation +# during a couple of month to rotate images +ref_date='2023-11-13' +if [[ "${DISTRO}" == 'bionic' || "${DISTRO}" == 'focal' ]] && \ + [[ "$(date '+%s')" -lt "$(date -d "${ref_date}+60 days" '+%s')" ]]; then + export INVALIDATE_DOCKER_CACHE=true +fi + export APT_PARAMS= GZDEV_DIR=${WORKSPACE}/gzdev