From 499aa8a8211604a0dc2aa200b0fbc56b781a1e6f Mon Sep 17 00:00:00 2001 From: Alexey-Ayupov <116575425+Alexey-Ayupov@users.noreply.github.com> Date: Tue, 15 Oct 2024 12:18:57 +0200 Subject: [PATCH] [Ubuntu, Windows] Add RUNNER_TOOL_CACHE environment variable (#10780) --- images/ubuntu/scripts/build/configure-environment.sh | 1 + images/windows/scripts/build/Configure-SystemEnvironment.ps1 | 1 + 2 files changed, 2 insertions(+) diff --git a/images/ubuntu/scripts/build/configure-environment.sh b/images/ubuntu/scripts/build/configure-environment.sh index 5e3781578523..3c149295e512 100644 --- a/images/ubuntu/scripts/build/configure-environment.sh +++ b/images/ubuntu/scripts/build/configure-environment.sh @@ -31,6 +31,7 @@ sed -i 's/::1 ip6-localhost ip6-loopback/::1 localhost ip6-localhost ip6-loo AGENT_TOOLSDIRECTORY=/opt/hostedtoolcache mkdir $AGENT_TOOLSDIRECTORY set_etc_environment_variable "AGENT_TOOLSDIRECTORY" "${AGENT_TOOLSDIRECTORY}" +set_etc_environment_variable "RUNNER_TOOL_CACHE" "${AGENT_TOOLSDIRECTORY}" chmod -R 777 $AGENT_TOOLSDIRECTORY # https://www.elastic.co/guide/en/elasticsearch/reference/current/vm-max-map-count.html diff --git a/images/windows/scripts/build/Configure-SystemEnvironment.ps1 b/images/windows/scripts/build/Configure-SystemEnvironment.ps1 index f43a9f08a9ed..f0859593b948 100644 --- a/images/windows/scripts/build/Configure-SystemEnvironment.ps1 +++ b/images/windows/scripts/build/Configure-SystemEnvironment.ps1 @@ -7,6 +7,7 @@ $variables = @{ "ImageVersion" = $env:IMAGE_VERSION "ImageOS" = $env:IMAGE_OS "AGENT_TOOLSDIRECTORY" = $env:AGENT_TOOLSDIRECTORY + "RUNNER_TOOL_CACHE" = $env:AGENT_TOOLSDIRECTORY } $variables.GetEnumerator() | ForEach-Object {