Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 8 additions & 10 deletions images/macos/toolsets/toolset-26.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,11 @@
"x64": {
"versions": [
{
"link": "26.5_Release_Candidate",
"filename": "Xcode_26.5_Release_Candidate_Universal",
"link": "26.5",
"filename": "Xcode_26.5_Universal",
"version": "26.5+17F42",
"symlinks": ["26.5"],
"sha256": "49541f9381551936bd5ab95432337eb1040505edcf5c65a59f39e5cf95fc22c5",
"install_runtimes": "none"
"install_runtimes": "default"
},
{
"link": "26.4.1",
Expand Down Expand Up @@ -43,7 +42,7 @@
"version": "26.1.1+17B100",
"symlinks": ["26.1"],
"sha256": "ed55d55fa28455c11a65e0809ba8fdf7d83fdeb268aabf9af7fcc1ee911543eb",
"install_runtimes": "default"
"install_runtimes": "none"
},
{
"link": "26.0.1",
Expand All @@ -58,12 +57,11 @@
"arm64": {
"versions": [
{
"link": "26.5_Release_Candidate",
"filename": "Xcode_26.5_Release_Candidate_Universal",
"link": "26.5",
"filename": "Xcode_26.5_Universal",
"version": "26.5+17F42",
"symlinks": ["26.5"],
"sha256": "49541f9381551936bd5ab95432337eb1040505edcf5c65a59f39e5cf95fc22c5",
"install_runtimes": "none"
"install_runtimes": "default"
},
{
"link": "26.4.1",
Expand Down Expand Up @@ -98,7 +96,7 @@
"version": "26.1.1+17B100",
"symlinks": ["26.1"],
"sha256": "ed55d55fa28455c11a65e0809ba8fdf7d83fdeb268aabf9af7fcc1ee911543eb",
"install_runtimes": "default"
"install_runtimes": "none"
},
{
"link": "26.0.1",
Expand Down
8 changes: 7 additions & 1 deletion images/ubuntu/scripts/build/Configure-Toolset.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,17 @@ function Add-GlobalEnvironmentVariable {

$ErrorActionPreference = "Stop"

if ( Test-IsArm64 ) {
$envVarTemplate = "GOROOT_{0}_{1}_AARCH64"
} else {
$envVarTemplate = "GOROOT_{0}_{1}_X64"
}

Write-Host "Configure toolcache tools environment..."
$toolEnvConfigs = @{
go = @{
command = "ln -s {0}/bin/* /usr/bin/"
variableTemplate = "GOROOT_{0}_{1}_X64"
variableTemplate = $envVarTemplate
}
}

Expand Down
18 changes: 15 additions & 3 deletions images/ubuntu/scripts/build/configure-image-data.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,31 @@
## Desc: Create a file with image data and documentation links
################################################################################

# Source the helpers for use with the script
source $HELPER_SCRIPTS/os.sh

imagedata_file=$IMAGEDATA_FILE
image_version=$IMAGE_VERSION
image_version_major=${image_version/.*/}
image_version_minor=$(echo $image_version | cut -d "." -f 2)
os_name=$(lsb_release -ds | sed "s/ /\\\n/g")
os_version=$(lsb_release -rs)
image_label="ubuntu-${os_version}"
version_major=${os_version/.*/}
version_wo_dot=${os_version/./}
github_url="https://github.com/actions/runner-images/blob"

software_url="${github_url}/ubuntu${version_major}/${image_version_major}.${image_version_minor}/images/ubuntu/Ubuntu${version_wo_dot}-Readme.md"
releaseUrl="https://github.com/actions/runner-images/releases/tag/ubuntu${version_major}%2F${image_version_major}.${image_version_minor}"
if is_x64; then
image_label="ubuntu-${os_version}"
software_url="${github_url}/ubuntu${version_major}/${image_version_major}.${image_version_minor}/images/ubuntu/Ubuntu${version_wo_dot}-Readme.md"
releaseUrl="https://github.com/actions/runner-images/releases/tag/ubuntu${version_major}%2F${image_version_major}.${image_version_minor}"
elif is_arm64; then
image_label="ubuntu-${os_version}-arm"
software_url="${github_url}/ubuntu${version_major}-arm64/${image_version_major}.${image_version_minor}/images/ubuntu/Ubuntu${version_wo_dot}-Arm64-Readme.md"
releaseUrl="https://github.com/actions/runner-images/releases/tag/ubuntu${version_major}-arm64%2F${image_version_major}.${image_version_minor}"
else
echo "Unsupported architecture"
exit 1
fi

cat <<EOF > $imagedata_file
[
Expand Down
4 changes: 3 additions & 1 deletion images/ubuntu/scripts/build/configure-system.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,9 @@ chmod -R 777 /usr/share
echo "chmod -R 777 /opt"
chmod -R 777 /opt
echo "Setting sticky bit on hostedtoolcache Ruby directories due to the changes in Ruby 4.0; see issue: https://github.com/actions/runner-images/issues/13647"
find /opt/hostedtoolcache/Ruby -type d -exec chmod +t {} +
if [ -d /opt/hostedtoolcache/Ruby ]; then
find /opt/hostedtoolcache/Ruby -type d -exec chmod +t {} +
fi

chmod 755 $IMAGE_FOLDER

Expand Down
19 changes: 16 additions & 3 deletions images/ubuntu/scripts/build/install-aws-tools.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,28 @@
source $HELPER_SCRIPTS/os.sh
source $HELPER_SCRIPTS/install.sh

awscliv2_archive_path=$(download_with_retry "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip")
if is_x64; then
cli_suffix="x86_64"
smplugin_arch="64bit"
sam_cli_suffix="x86_64"
elif is_arm64; then
cli_suffix="aarch64"
smplugin_arch="arm64"
sam_cli_suffix="arm64"
else
echo "Unsupported architecture"
exit 1
fi

awscliv2_archive_path=$(download_with_retry "https://awscli.amazonaws.com/awscli-exe-linux-${cli_suffix}.zip")
unzip -qq "$awscliv2_archive_path" -d /tmp
/tmp/aws/install -i /usr/local/aws-cli -b /usr/local/bin

smplugin_deb_path=$(download_with_retry "https://s3.amazonaws.com/session-manager-downloads/plugin/latest/ubuntu_64bit/session-manager-plugin.deb")
smplugin_deb_path=$(download_with_retry "https://s3.amazonaws.com/session-manager-downloads/plugin/latest/ubuntu_${smplugin_arch}/session-manager-plugin.deb")
apt-get install "$smplugin_deb_path"

# Download the latest aws sam cli release
aws_sam_cli_archive_name="aws-sam-cli-linux-x86_64.zip"
aws_sam_cli_archive_name="aws-sam-cli-linux-${sam_cli_suffix}.zip"
sam_cli_download_url=$(resolve_github_release_asset_url "aws/aws-sam-cli" "endswith(\"$aws_sam_cli_archive_name\")" "latest")
aws_sam_cli_archive_path=$(download_with_retry "$sam_cli_download_url")

Expand Down
12 changes: 11 additions & 1 deletion images/ubuntu/scripts/build/install-azcopy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,19 @@

# Source the helpers for use with the script
source $HELPER_SCRIPTS/install.sh
source $HELPER_SCRIPTS/os.sh

if is_x64; then
azcopy_download_url="https://aka.ms/downloadazcopy-v10-linux"
elif is_arm64; then
azcopy_download_url="https://aka.ms/downloadazcopy-v10-linux-arm64"
else
echo "Unsupported architecture"
exit 1
fi

# Install AzCopy10
archive_path=$(download_with_retry "https://aka.ms/downloadazcopy-v10-linux")
archive_path=$(download_with_retry "$azcopy_download_url")
tar xzf "$archive_path" --strip-components=1 -C /tmp
install /tmp/azcopy /usr/local/bin/azcopy

Expand Down
7 changes: 7 additions & 0 deletions images/ubuntu/scripts/build/install-clang.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,16 @@

# Source the helpers for use with the script
source $HELPER_SCRIPTS/install.sh
source $HELPER_SCRIPTS/os.sh

install_clang() {
local version=$1

echo "Installing clang-$version..."
apt-get install "clang-$version" "lldb-$version" "lld-$version" "clang-format-$version" "clang-tidy-$version"
if is_ubuntu22_arm64 || is_ubuntu24_arm64; then
apt-get install "llvm-$version"
fi
}

set_default_clang() {
Expand All @@ -23,6 +27,9 @@ set_default_clang() {
update-alternatives --install /usr/bin/clang-format clang-format /usr/bin/clang-format-${version} 100
update-alternatives --install /usr/bin/clang-tidy clang-tidy /usr/bin/clang-tidy-${version} 100
update-alternatives --install /usr/bin/run-clang-tidy run-clang-tidy /usr/bin/run-clang-tidy-${version} 100
if is_ubuntu22_arm64 || is_ubuntu24_arm64; then
update-alternatives --install /usr/bin/llvm-config llvm-config /usr/bin/llvm-config-${version} 100
fi
}

versions=$(get_toolset_value '.clang.versions[]')
Expand Down
14 changes: 12 additions & 2 deletions images/ubuntu/scripts/build/install-cmake.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,16 @@

# Source the helpers for use with the script
source $HELPER_SCRIPTS/install.sh
source $HELPER_SCRIPTS/os.sh

if is_x64; then
cmake_arch="x86_64"
elif is_arm64; then
cmake_arch="aarch64"
else
echo "Unsupported architecture"
exit 1
fi

cmake_version=$(get_toolset_value .cmake.version)

Expand All @@ -16,12 +26,12 @@ if command -v cmake; then
echo "cmake is already installed"
else
# Download script to install CMake
download_url=$(resolve_github_release_asset_url "Kitware/CMake" "endswith(\"inux-x86_64.sh\")" "$cmake_version")
download_url=$(resolve_github_release_asset_url "Kitware/CMake" "endswith(\"inux-$cmake_arch.sh\")" "$cmake_version")
curl -fsSL "${download_url}" -o cmakeinstall.sh

# Supply chain security - CMake
hash_url=$(resolve_github_release_asset_url "Kitware/CMake" "endswith(\"SHA-256.txt\")" "$cmake_version")
external_hash=$(get_checksum_from_url "$hash_url" "linux-x86_64.sh" "SHA256")
external_hash=$(get_checksum_from_url "$hash_url" "linux-$cmake_arch.sh" "SHA256")
use_checksum_comparison "cmakeinstall.sh" "$external_hash"

# Install CMake and remove the install script
Expand Down
4 changes: 2 additions & 2 deletions images/ubuntu/scripts/build/install-container-tools.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ else
fi


if is_ubuntu22; then
# Install containernetworking-plugins for Ubuntu 22
if is_ubuntu22_x64; then
# Install containernetworking-plugins for Ubuntu 22 x64
curl -O http://archive.ubuntu.com/ubuntu/pool/universe/g/golang-github-containernetworking-plugins/containernetworking-plugins_1.1.1+ds1-3build1_amd64.deb
dpkg -i containernetworking-plugins_1.1.1+ds1-3build1_amd64.deb
fi
Expand Down
13 changes: 11 additions & 2 deletions images/ubuntu/scripts/build/install-docker.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,22 @@
source $HELPER_SCRIPTS/install.sh
source $HELPER_SCRIPTS/os.sh

if is_x64; then
docker_arch="amd64"
elif is_arm64; then
docker_arch="arm64"
else
echo "Unsupported architecture"
exit 1
fi

REPO_URL="https://download.docker.com/linux/ubuntu"
GPG_KEY="/usr/share/keyrings/docker.gpg"
REPO_PATH="/etc/apt/sources.list.d/docker.list"
os_codename=$(lsb_release -cs)

curl -fsSL https://download.docker.com/linux/ubuntu/gpg | gpg --dearmor -o $GPG_KEY
echo "deb [arch=amd64 signed-by=$GPG_KEY] $REPO_URL ${os_codename} stable" > $REPO_PATH
echo "deb [arch=$docker_arch signed-by=$GPG_KEY] $REPO_URL ${os_codename} stable" > $REPO_PATH
apt-get update

# Install docker components which available via apt-get
Expand Down Expand Up @@ -79,7 +88,7 @@ fi

# Download amazon-ecr-credential-helper
aws_latest_release_url="https://api.github.com/repos/awslabs/amazon-ecr-credential-helper/releases/latest"
aws_helper_url=$(curl -fsSL "${aws_latest_release_url}" | jq -r '.body' | awk -F'[()]' '/linux-amd64/ {print $2}')
aws_helper_url=$(curl -fsSL "${aws_latest_release_url}" | jq -r '.body' | awk -F'[()]' '/linux-'"${docker_arch}"'/ {print $2}')
aws_helper_binary_path=$(download_with_retry "$aws_helper_url")

# Supply chain security - amazon-ecr-credential-helper
Expand Down
12 changes: 11 additions & 1 deletion images/ubuntu/scripts/build/install-firefox.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,16 @@
# Source the helpers for use with the script
source $HELPER_SCRIPTS/install.sh
source $HELPER_SCRIPTS/etc-environment.sh
source $HELPER_SCRIPTS/os.sh

if is_x64; then
driver_arch="linux64"
elif is_arm64; then
driver_arch="linux-aarch64"
else
echo "Unsupported architecture"
exit 1
fi

FIREFOX_REPO="ppa:mozillateam/ppa"

Expand All @@ -26,7 +36,7 @@ echo "mozillateam $FIREFOX_REPO" >> $HELPER_SCRIPTS/apt-sources.txt
echo 'pref("intl.locale.requested","en_US");' >> "/usr/lib/firefox/browser/defaults/preferences/syspref.js"

# Download and unpack latest release of geckodriver
download_url=$(resolve_github_release_asset_url "mozilla/geckodriver" "test(\"linux64.tar.gz$\")" "latest")
download_url=$(resolve_github_release_asset_url "mozilla/geckodriver" "test(\"${driver_arch}.tar.gz$\")" "latest")
driver_archive_path=$(download_with_retry "$download_url")

GECKODRIVER_DIR="/usr/local/share/gecko_driver"
Expand Down
14 changes: 12 additions & 2 deletions images/ubuntu/scripts/build/install-github-cli.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,24 @@

# Source the helpers for use with the script
source $HELPER_SCRIPTS/install.sh
source $HELPER_SCRIPTS/os.sh

if is_x64; then
gh_cli_arch="amd64"
elif is_arm64; then
gh_cli_arch="arm64"
else
echo "Unsupported architecture"
exit 1
fi

# Download GitHub CLI
gh_cli_url=$(resolve_github_release_asset_url "cli/cli" "contains(\"linux\") and contains(\"amd64\") and endswith(\".deb\")" "latest")
gh_cli_url=$(resolve_github_release_asset_url "cli/cli" "contains(\"linux\") and contains(\"$gh_cli_arch\") and endswith(\".deb\")" "latest")
gh_cli_deb_path=$(download_with_retry "$gh_cli_url")

# Supply chain security - GitHub CLI
hash_url=$(resolve_github_release_asset_url "cli/cli" "endswith(\"checksums.txt\")" "latest")
external_hash=$(get_checksum_from_url "$hash_url" "linux_amd64.deb" "SHA256")
external_hash=$(get_checksum_from_url "$hash_url" "linux_${gh_cli_arch}.deb" "SHA256")
use_checksum_comparison "$gh_cli_deb_path" "$external_hash"

# Install GitHub CLI
Expand Down
52 changes: 42 additions & 10 deletions images/ubuntu/scripts/build/install-google-cloud-cli.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,51 @@
## Desc: Install the Google Cloud CLI
################################################################################

source $HELPER_SCRIPTS/install.sh
source $HELPER_SCRIPTS/os.sh

REPO_URL="https://packages.cloud.google.com/apt"

# Install the Google Cloud CLI
echo "deb [signed-by=/usr/share/keyrings/cloud.google.gpg] $REPO_URL cloud-sdk main" > /etc/apt/sources.list.d/google-cloud-sdk.list
wget -qO- https://packages.cloud.google.com/apt/doc/apt-key.gpg | gpg --dearmor > /usr/share/keyrings/cloud.google.gpg
apt-get update
apt-get install google-cloud-cli
if is_ubuntu26_arm64; then
# Install from tarball, ubuntu 26.04 arm64 package from apt requires python3 < 3.14
tarball_url="https://dl.google.com/dl/cloudsdk/channels/rapid/downloads/google-cloud-cli-linux-arm.tar.gz"
tarball_path=$(download_with_retry "$tarball_url")

tar -xzf "$tarball_path" -C /opt
rm -f "$tarball_path"

# Run the bundled installer without modifying PATH/rc files
/opt/google-cloud-sdk/install.sh --quiet --usage-reporting false \
--path-update false --bash-completion false --command-completion false

/opt/google-cloud-sdk/bin/gcloud components install --quiet anthoscli

# Create symlinks in /usr/bin
gcloud_bins=(
anthoscli
bq
docker-credential-gcloud
gcloud
gcloud-crc32c
git-credential-gcloud.sh
gsutil
)
for bin in "${gcloud_bins[@]}"; do
ln -sf "/opt/google-cloud-sdk/bin/${bin}" "/usr/bin/${bin}"
done
else
# Install the Google Cloud CLI via apt
echo "deb [signed-by=/usr/share/keyrings/cloud.google.gpg] $REPO_URL cloud-sdk main" > /etc/apt/sources.list.d/google-cloud-sdk.list
wget -qO- https://packages.cloud.google.com/apt/doc/apt-key.gpg | gpg --dearmor > /usr/share/keyrings/cloud.google.gpg
apt-get update
apt-get install google-cloud-cli

# remove apt
rm /etc/apt/sources.list.d/google-cloud-sdk.list
rm /usr/share/keyrings/cloud.google.gpg
# remove apt
rm /etc/apt/sources.list.d/google-cloud-sdk.list
rm /usr/share/keyrings/cloud.google.gpg

# add repo to the apt-sources.txt
echo "google-cloud-sdk $REPO_URL" >> $HELPER_SCRIPTS/apt-sources.txt
# add repo to the apt-sources.txt
echo "google-cloud-sdk $REPO_URL" >> $HELPER_SCRIPTS/apt-sources.txt
fi

invoke_tests "CLI.Tools" "Google Cloud CLI"
Loading
Loading