mirror of
https://github.com/actions/runner-images.git
synced 2025-12-11 03:27:05 +00:00
[Ubuntu] Add Ubuntu-24.04 base image (#9754)
Co-authored-by: Alexey Ayupov <alexey-ayupov@github.com>
This commit is contained in:
21
images.CI/linux-and-win/azure-pipelines/ubuntu2404.yml
Normal file
21
images.CI/linux-and-win/azure-pipelines/ubuntu2404.yml
Normal file
@@ -0,0 +1,21 @@
|
||||
schedules:
|
||||
- cron: "0 0 * * *"
|
||||
displayName: Daily
|
||||
branches:
|
||||
include:
|
||||
- main
|
||||
always: true
|
||||
|
||||
trigger: none
|
||||
pr:
|
||||
autoCancel: true
|
||||
branches:
|
||||
include:
|
||||
- main
|
||||
|
||||
jobs:
|
||||
- template: image-generation.yml
|
||||
parameters:
|
||||
image_type: ubuntu2404
|
||||
image_readme_name: Ubuntu2404-Readme.md
|
||||
image_template_name: ubuntu-24.04.pkr.hcl
|
||||
@@ -42,6 +42,8 @@ apt-get update
|
||||
# Install jq
|
||||
apt-get install jq
|
||||
|
||||
if ! is_ubuntu24; then
|
||||
# Install apt-fast using quick-install.sh
|
||||
# https://github.com/ilikenwf/apt-fast
|
||||
bash -c "$(curl -fsSL https://raw.githubusercontent.com/ilikenwf/apt-fast/master/quick-install.sh)"
|
||||
fi
|
||||
|
||||
@@ -11,7 +11,7 @@ source $HELPER_SCRIPTS/os.sh
|
||||
# pin podman due to https://github.com/actions/runner-images/issues/7753
|
||||
# https://bugs.launchpad.net/ubuntu/+source/libpod/+bug/2024394
|
||||
#
|
||||
if is_ubuntu20; then
|
||||
if ! is_ubuntu22; then
|
||||
install_packages=(podman buildah skopeo)
|
||||
else
|
||||
install_packages=(podman=3.4.4+ds1-1ubuntu1 buildah skopeo)
|
||||
@@ -27,7 +27,7 @@ if is_ubuntu20; then
|
||||
echo "deb [arch=amd64 signed-by=$GPG_KEY] ${REPO_URL}/ /" > $REPO_PATH
|
||||
fi
|
||||
|
||||
# Install podman, buildah, scopeo container's tools
|
||||
# Install podman, buildah, skopeo container's tools
|
||||
apt-get update
|
||||
apt-get -y install ${install_packages[@]}
|
||||
mkdir -p /etc/containers
|
||||
|
||||
@@ -48,6 +48,7 @@ done
|
||||
gid=$(cut -d ":" -f 3 /etc/group | grep "^1..$" | sort -n | tail -n 1 | awk '{ print $1+1 }')
|
||||
groupmod -g "$gid" docker
|
||||
chgrp -hR docker /run/docker.sock
|
||||
chgrp -hR docker /var/run/docker.sock
|
||||
|
||||
# Enable docker.service
|
||||
systemctl is-active --quiet docker.service || systemctl start docker.service
|
||||
|
||||
@@ -9,8 +9,10 @@ source $HELPER_SCRIPTS/os.sh
|
||||
source $HELPER_SCRIPTS/install.sh
|
||||
|
||||
# Install GNU C++ compiler
|
||||
if ! is_ubuntu24 ; then
|
||||
add-apt-repository ppa:ubuntu-toolchain-r/test -y
|
||||
apt-get update -y
|
||||
fi
|
||||
|
||||
versions=$(get_toolset_value '.gcc.versions[]')
|
||||
|
||||
|
||||
@@ -9,8 +9,10 @@ source $HELPER_SCRIPTS/install.sh
|
||||
source $HELPER_SCRIPTS/os.sh
|
||||
|
||||
# Install GNU Fortran compiler
|
||||
if ! is_ubuntu24 ; then
|
||||
add-apt-repository ppa:ubuntu-toolchain-r/test -y
|
||||
apt-get update -y
|
||||
fi
|
||||
|
||||
versions=$(get_toolset_value '.gfortran.versions[]')
|
||||
|
||||
|
||||
@@ -69,6 +69,8 @@ echo "deb [signed-by=/usr/share/keyrings/adoptium.gpg] https://packages.adoptium
|
||||
# Get all the updates from enabled repositories.
|
||||
apt-get update
|
||||
|
||||
# While Ubuntu 24.04 binaries are not released in the Adoptium repo, we will not install Java
|
||||
if ! is_ubuntu24; then
|
||||
defaultVersion=$(get_toolset_value '.java.default')
|
||||
jdkVersionsToInstall=($(get_toolset_value ".java.versions[]"))
|
||||
|
||||
@@ -82,6 +84,7 @@ for jdkVersionToInstall in ${jdkVersionsToInstall[@]}; do
|
||||
create_java_environment_variable ${jdkVersionToInstall} False
|
||||
fi
|
||||
done
|
||||
fi
|
||||
|
||||
# Install Ant
|
||||
apt-get install -y --no-install-recommends ant ant-optional
|
||||
|
||||
@@ -73,11 +73,11 @@ for version in $php_versions; do
|
||||
# https://github.com/krakjoe/pcov#interoperability
|
||||
phpdismod -v $version pcov
|
||||
|
||||
if [[ $version == "7.2" || $version == "7.3" ]]; then
|
||||
if [[ $version == "7.2" || $version == "7.3" || $version == "7.4" ]]; then
|
||||
apt-get install -y --no-install-recommends php$version-recode
|
||||
fi
|
||||
|
||||
if [[ $version != "8.0" && $version != "8.1" && $version != "8.2" ]]; then
|
||||
if [[ $version != "8.0" && $version != "8.1" && $version != "8.2" && $version != "8.3" ]]; then
|
||||
apt-get install -y --no-install-recommends php$version-xmlrpc php$version-json
|
||||
fi
|
||||
done
|
||||
|
||||
@@ -6,8 +6,16 @@
|
||||
|
||||
# Source the helpers for use with the script
|
||||
source $HELPER_SCRIPTS/install.sh
|
||||
source $HELPER_SCRIPTS/os.sh
|
||||
|
||||
pwsh_version=$(get_toolset_value .pwsh.version)
|
||||
|
||||
# Install Powershell
|
||||
if is_ubuntu24; then
|
||||
dependency_path=$(download_with_retry "http://mirrors.kernel.org/ubuntu/pool/main/i/icu/libicu72_72.1-3ubuntu2_amd64.deb")
|
||||
sudo dpkg -i "$dependency_path"
|
||||
package_path=$(download_with_retry "https://github.com/PowerShell/PowerShell/releases/download/v7.4.2/powershell-lts_7.4.2-1.deb_amd64.deb")
|
||||
sudo dpkg -i "$package_path"
|
||||
else
|
||||
apt-get install -y powershell=$pwsh_version*
|
||||
fi
|
||||
|
||||
@@ -16,9 +16,13 @@ apt-get install -y --no-install-recommends python3 python3-dev python3-pip pytho
|
||||
# Set pipx custom directory
|
||||
export PIPX_BIN_DIR=/opt/pipx_bin
|
||||
export PIPX_HOME=/opt/pipx
|
||||
if is_ubuntu24; then
|
||||
apt-get install -y --no-install-recommends pipx
|
||||
pipx ensurepath
|
||||
else
|
||||
python3 -m pip install pipx
|
||||
python3 -m pipx ensurepath
|
||||
|
||||
fi
|
||||
# Update /etc/environment
|
||||
set_etc_environment_variable "PIPX_BIN_DIR" $PIPX_BIN_DIR
|
||||
set_etc_environment_variable "PIPX_HOME" $PIPX_HOME
|
||||
|
||||
@@ -21,7 +21,9 @@ rustup component add rustfmt clippy
|
||||
|
||||
if is_ubuntu22; then
|
||||
cargo install bindgen-cli cbindgen cargo-audit cargo-outdated
|
||||
else
|
||||
fi
|
||||
|
||||
if is_ubuntu20; then
|
||||
cargo install --locked bindgen-cli cbindgen cargo-audit cargo-outdated
|
||||
fi
|
||||
|
||||
|
||||
@@ -41,21 +41,27 @@ $languageAndRuntime.AddToolVersionsListInline("Clang", $(Get-ClangToolVersions -
|
||||
$languageAndRuntime.AddToolVersionsListInline("Clang-format", $(Get-ClangToolVersions -ToolName "clang-format"), "^\d+")
|
||||
$languageAndRuntime.AddToolVersionsListInline("Clang-tidy", $(Get-ClangTidyVersions), "^\d+")
|
||||
$languageAndRuntime.AddToolVersion("Dash", $(Get-DashVersion))
|
||||
if (Test-IsUbuntu20) {
|
||||
if ((Test-IsUbuntu20) -or (Test-IsUbuntu22)) {
|
||||
$languageAndRuntime.AddToolVersion("Erlang", $(Get-ErlangVersion))
|
||||
$languageAndRuntime.AddToolVersion("Erlang rebar3", $(Get-ErlangRebar3Version))
|
||||
}
|
||||
$languageAndRuntime.AddToolVersionsListInline("GNU C++", $(Get-CPPVersions), "^\d+")
|
||||
$languageAndRuntime.AddToolVersionsListInline("GNU Fortran", $(Get-FortranVersions), "^\d+")
|
||||
$languageAndRuntime.AddToolVersion("Julia", $(Get-JuliaVersion))
|
||||
if ((Test-IsUbuntu20) -or (Test-IsUbuntu22)) {
|
||||
$languageAndRuntime.AddToolVersion("Kotlin", $(Get-KotlinVersion))
|
||||
}
|
||||
if (-not $(Test-IsUbuntu24)) {
|
||||
$languageAndRuntime.AddToolVersion("Mono", $(Get-MonoVersion))
|
||||
$languageAndRuntime.AddToolVersion("MSBuild", $(Get-MsbuildVersion))
|
||||
}
|
||||
$languageAndRuntime.AddToolVersion("Node.js", $(Get-NodeVersion))
|
||||
$languageAndRuntime.AddToolVersion("Perl", $(Get-PerlVersion))
|
||||
$languageAndRuntime.AddToolVersion("Python", $(Get-PythonVersion))
|
||||
$languageAndRuntime.AddToolVersion("Ruby", $(Get-RubyVersion))
|
||||
if ((Test-IsUbuntu20) -or (Test-IsUbuntu22)) {
|
||||
$languageAndRuntime.AddToolVersion("Swift", $(Get-SwiftVersion))
|
||||
}
|
||||
|
||||
# Package Management
|
||||
$packageManagement = $installedSoftware.AddHeader("Package Management")
|
||||
@@ -64,7 +70,9 @@ $packageManagement.AddToolVersion("Helm", $(Get-HelmVersion))
|
||||
$packageManagement.AddToolVersion("Homebrew", $(Get-HomebrewVersion))
|
||||
$packageManagement.AddToolVersion("Miniconda", $(Get-MinicondaVersion))
|
||||
$packageManagement.AddToolVersion("Npm", $(Get-NpmVersion))
|
||||
if (-not $(Test-IsUbuntu24)) {
|
||||
$packageManagement.AddToolVersion("NuGet", $(Get-NuGetVersion))
|
||||
}
|
||||
$packageManagement.AddToolVersion("Pip", $(Get-PipVersion))
|
||||
$packageManagement.AddToolVersion("Pip3", $(Get-Pip3Version))
|
||||
$packageManagement.AddToolVersion("Pipx", $(Get-PipxVersion))
|
||||
@@ -81,15 +89,11 @@ to accomplish this.
|
||||
|
||||
# Project Management
|
||||
$projectManagement = $installedSoftware.AddHeader("Project Management")
|
||||
if (Test-IsUbuntu20) {
|
||||
$projectManagement.AddToolVersion("Ant", $(Get-AntVersion))
|
||||
$projectManagement.AddToolVersion("Gradle", $(Get-GradleVersion))
|
||||
}
|
||||
if ((Test-IsUbuntu20) -or (Test-IsUbuntu22)) {
|
||||
$projectManagement.AddToolVersion("Lerna", $(Get-LernaVersion))
|
||||
}
|
||||
$projectManagement.AddToolVersion("Maven", $(Get-MavenVersion))
|
||||
if (Test-IsUbuntu20) {
|
||||
if ((Test-IsUbuntu20) -or (Test-IsUbuntu22)) {
|
||||
$projectManagement.AddToolVersion("Sbt", $(Get-SbtVersion))
|
||||
}
|
||||
|
||||
@@ -98,14 +102,20 @@ $tools = $installedSoftware.AddHeader("Tools")
|
||||
$tools.AddToolVersion("Ansible", $(Get-AnsibleVersion))
|
||||
$tools.AddToolVersion("apt-fast", $(Get-AptFastVersion))
|
||||
$tools.AddToolVersion("AzCopy", $(Get-AzCopyVersion))
|
||||
if ((Test-IsUbuntu20) -or (Test-IsUbuntu22)) {
|
||||
$tools.AddToolVersion("Bazel", $(Get-BazelVersion))
|
||||
$tools.AddToolVersion("Bazelisk", $(Get-BazeliskVersion))
|
||||
}
|
||||
$tools.AddToolVersion("Bicep", $(Get-BicepVersion))
|
||||
if ((Test-IsUbuntu20) -or (Test-IsUbuntu22)) {
|
||||
$tools.AddToolVersion("Buildah", $(Get-BuildahVersion))
|
||||
}
|
||||
$tools.AddToolVersion("CMake", $(Get-CMakeVersion))
|
||||
$tools.AddToolVersion("CodeQL Action Bundle", $(Get-CodeQLBundleVersion))
|
||||
$tools.AddToolVersion("Docker Amazon ECR Credential Helper", $(Get-DockerAmazonECRCredHelperVersion))
|
||||
if ((Test-IsUbuntu20) -or (Test-IsUbuntu22)) {
|
||||
$tools.AddToolVersion("Docker Compose v1", $(Get-DockerComposeV1Version))
|
||||
}
|
||||
$tools.AddToolVersion("Docker Compose v2", $(Get-DockerComposeV2Version))
|
||||
$tools.AddToolVersion("Docker-Buildx", $(Get-DockerBuildxVersion))
|
||||
$tools.AddToolVersion("Docker Client", $(Get-DockerClientVersion))
|
||||
@@ -117,7 +127,9 @@ $tools.AddToolVersion("Git", $(Get-GitVersion))
|
||||
$tools.AddToolVersion("Git LFS", $(Get-GitLFSVersion))
|
||||
$tools.AddToolVersion("Git-ftp", $(Get-GitFTPVersion))
|
||||
$tools.AddToolVersion("Haveged", $(Get-HavegedVersion))
|
||||
if ((Test-IsUbuntu20) -or (Test-IsUbuntu22)) {
|
||||
$tools.AddToolVersion("Heroku", $(Get-HerokuVersion))
|
||||
}
|
||||
if (Test-IsUbuntu20) {
|
||||
$tools.AddToolVersion("HHVM (HipHop VM)", $(Get-HHVMVersion))
|
||||
}
|
||||
@@ -125,88 +137,123 @@ $tools.AddToolVersion("jq", $(Get-JqVersion))
|
||||
$tools.AddToolVersion("Kind", $(Get-KindVersion))
|
||||
$tools.AddToolVersion("Kubectl", $(Get-KubectlVersion))
|
||||
$tools.AddToolVersion("Kustomize", $(Get-KustomizeVersion))
|
||||
if ((Test-IsUbuntu20) -or (Test-IsUbuntu22)) {
|
||||
$tools.AddToolVersion("Leiningen", $(Get-LeiningenVersion))
|
||||
}
|
||||
$tools.AddToolVersion("MediaInfo", $(Get-MediainfoVersion))
|
||||
$tools.AddToolVersion("Mercurial", $(Get-HGVersion))
|
||||
$tools.AddToolVersion("Minikube", $(Get-MinikubeVersion))
|
||||
$tools.AddToolVersion("n", $(Get-NVersion))
|
||||
$tools.AddToolVersion("Newman", $(Get-NewmanVersion))
|
||||
if ((Test-IsUbuntu20) -or (Test-IsUbuntu22)) {
|
||||
$tools.AddToolVersion("nvm", $(Get-NvmVersion))
|
||||
}
|
||||
$tools.AddToolVersion("OpenSSL", $(Get-OpensslVersion))
|
||||
if ((Test-IsUbuntu20) -or (Test-IsUbuntu22)) {
|
||||
$tools.AddToolVersion("Packer", $(Get-PackerVersion))
|
||||
}
|
||||
$tools.AddToolVersion("Parcel", $(Get-ParcelVersion))
|
||||
if (Test-IsUbuntu20) {
|
||||
$tools.AddToolVersion("PhantomJS", $(Get-PhantomJSVersion))
|
||||
}
|
||||
if ((Test-IsUbuntu20) -or (Test-IsUbuntu22)) {
|
||||
$tools.AddToolVersion("Podman", $(Get-PodManVersion))
|
||||
}
|
||||
$tools.AddToolVersion("Pulumi", $(Get-PulumiVersion))
|
||||
if ((Test-IsUbuntu20) -or (Test-IsUbuntu22)) {
|
||||
$tools.AddToolVersion("R", $(Get-RVersion))
|
||||
$tools.AddToolVersion("Skopeo", $(Get-SkopeoVersion))
|
||||
}
|
||||
$tools.AddToolVersion("Sphinx Open Source Search Server", $(Get-SphinxVersion))
|
||||
if ((Test-IsUbuntu20) -or (Test-IsUbuntu22)) {
|
||||
$tools.AddToolVersion("SVN", $(Get-SVNVersion))
|
||||
$tools.AddToolVersion("Terraform", $(Get-TerraformVersion))
|
||||
}
|
||||
$tools.AddToolVersion("yamllint", $(Get-YamllintVersion))
|
||||
$tools.AddToolVersion("yq", $(Get-YqVersion))
|
||||
$tools.AddToolVersion("zstd", $(Get-ZstdVersion))
|
||||
|
||||
# CLI Tools
|
||||
$cliTools = $installedSoftware.AddHeader("CLI Tools")
|
||||
if ((Test-IsUbuntu20) -or (Test-IsUbuntu22)) {
|
||||
$cliTools.AddToolVersion("Alibaba Cloud CLI", $(Get-AlibabaCloudCliVersion))
|
||||
}
|
||||
$cliTools.AddToolVersion("AWS CLI", $(Get-AWSCliVersion))
|
||||
$cliTools.AddToolVersion("AWS CLI Session Manager Plugin", $(Get-AWSCliSessionManagerPluginVersion))
|
||||
$cliTools.AddToolVersion("AWS SAM CLI", $(Get-AWSSAMVersion))
|
||||
$cliTools.AddToolVersion("Azure CLI", $(Get-AzureCliVersion))
|
||||
$cliTools.AddToolVersion("Azure CLI (azure-devops)", $(Get-AzureDevopsVersion))
|
||||
$cliTools.AddToolVersion("GitHub CLI", $(Get-GitHubCliVersion))
|
||||
if ((Test-IsUbuntu20) -or (Test-IsUbuntu22)) {
|
||||
$cliTools.AddToolVersion("Google Cloud CLI", $(Get-GoogleCloudCLIVersion))
|
||||
$cliTools.AddToolVersion("Netlify CLI", $(Get-NetlifyCliVersion))
|
||||
$cliTools.AddToolVersion("OpenShift CLI", $(Get-OCCliVersion))
|
||||
$cliTools.AddToolVersion("ORAS CLI", $(Get-ORASCliVersion))
|
||||
$cliTools.AddToolVersion("Vercel CLI", $(Get-VerselCliversion))
|
||||
}
|
||||
|
||||
# Java
|
||||
if (-not $(Test-IsUbuntu24)) {
|
||||
$installedSoftware.AddHeader("Java").AddTable($(Get-JavaVersionsTable))
|
||||
}
|
||||
|
||||
# PHP Tools
|
||||
$phpTools = $installedSoftware.AddHeader("PHP Tools")
|
||||
$phpTools.AddToolVersionsListInline("PHP", $(Get-PHPVersions), "^\d+\.\d+")
|
||||
$phpTools.AddToolVersion("Composer", $(Get-ComposerVersion))
|
||||
$phpTools.AddToolVersion("PHPUnit", $(Get-PHPUnitVersion))
|
||||
$phpTools.AddNote("Both Xdebug and PCOV extensions are installed, but only Xdebug is enabled.")
|
||||
|
||||
# Haskell Tools
|
||||
$haskellTools = $installedSoftware.AddHeader("Haskell Tools")
|
||||
$haskellTools.AddToolVersion("Cabal", $(Get-CabalVersion))
|
||||
$haskellTools.AddToolVersion("GHC", $(Get-GHCVersion))
|
||||
$haskellTools.AddToolVersion("GHCup", $(Get-GHCupVersion))
|
||||
$haskellTools.AddToolVersion("Stack", $(Get-StackVersion))
|
||||
|
||||
# Rust Tools
|
||||
Initialize-RustEnvironment
|
||||
$rustTools = $installedSoftware.AddHeader("Rust Tools")
|
||||
$rustTools.AddToolVersion("Cargo", $(Get-CargoVersion))
|
||||
$rustTools.AddToolVersion("Rust", $(Get-RustVersion))
|
||||
$rustTools.AddToolVersion("Rustdoc", $(Get-RustdocVersion))
|
||||
$rustTools.AddToolVersion("Rustup", $(Get-RustupVersion))
|
||||
|
||||
# Packages
|
||||
$rustToolsPackages = $rustTools.AddHeader("Packages")
|
||||
if ((Test-IsUbuntu20) -or (Test-IsUbuntu22)) {
|
||||
$rustToolsPackages.AddToolVersion("Bindgen", $(Get-BindgenVersion))
|
||||
$rustToolsPackages.AddToolVersion("Cargo audit", $(Get-CargoAuditVersion))
|
||||
$rustToolsPackages.AddToolVersion("Cargo clippy", $(Get-CargoClippyVersion))
|
||||
$rustToolsPackages.AddToolVersion("Cargo outdated", $(Get-CargoOutdatedVersion))
|
||||
$rustToolsPackages.AddToolVersion("Cbindgen", $(Get-CbindgenVersion))
|
||||
}
|
||||
$rustToolsPackages.AddToolVersion("Rustfmt", $(Get-RustfmtVersion))
|
||||
|
||||
# Browsers and Drivers
|
||||
$browsersTools = $installedSoftware.AddHeader("Browsers and Drivers")
|
||||
$browsersTools.AddToolVersion("Google Chrome", $(Get-ChromeVersion))
|
||||
$browsersTools.AddToolVersion("ChromeDriver", $(Get-ChromeDriverVersion))
|
||||
$browsersTools.AddToolVersion("Chromium", $(Get-ChromiumVersion))
|
||||
if ((Test-IsUbuntu20) -or (Test-IsUbuntu22)) {
|
||||
$browsersTools.AddToolVersion("Microsoft Edge", $(Get-EdgeVersion))
|
||||
$browsersTools.AddToolVersion("Microsoft Edge WebDriver", $(Get-EdgeDriverVersion))
|
||||
}
|
||||
$browsersTools.AddToolVersion("Selenium server", $(Get-SeleniumVersion))
|
||||
if ((Test-IsUbuntu20) -or (Test-IsUbuntu22)) {
|
||||
$browsersTools.AddToolVersion("Mozilla Firefox", $(Get-FirefoxVersion))
|
||||
$browsersTools.AddToolVersion("Geckodriver", $(Get-GeckodriverVersion))
|
||||
}
|
||||
|
||||
# Environment variables
|
||||
$browsersTools.AddHeader("Environment variables").AddTable($(Build-BrowserWebdriversEnvironmentTable))
|
||||
|
||||
# .NET Tools
|
||||
$netCoreTools = $installedSoftware.AddHeader(".NET Tools")
|
||||
$netCoreTools.AddToolVersionsListInline(".NET Core SDK", $(Get-DotNetCoreSdkVersions), "^\d+\.\d+\.\d")
|
||||
$netCoreTools.AddNodes($(Get-DotnetTools))
|
||||
|
||||
# Databases
|
||||
$databasesTools = $installedSoftware.AddHeader("Databases")
|
||||
if (Test-IsUbuntu20) {
|
||||
$databasesTools.AddToolVersion("MongoDB", $(Get-MongoDbVersion))
|
||||
@@ -214,15 +261,21 @@ if (Test-IsUbuntu20) {
|
||||
$databasesTools.AddToolVersion("sqlite3", $(Get-SqliteVersion))
|
||||
$databasesTools.AddNode($(Build-PostgreSqlSection))
|
||||
$databasesTools.AddNode($(Build-MySQLSection))
|
||||
if (-not $(Test-IsUbuntu24)) {
|
||||
$databasesTools.AddNode($(Build-MSSQLToolsSection))
|
||||
}
|
||||
|
||||
# Cached Tools
|
||||
if (-not $(Test-IsUbuntu24)) {
|
||||
$cachedTools = $installedSoftware.AddHeader("Cached Tools")
|
||||
$cachedTools.AddToolVersionsList("Go", $(Get-ToolcacheGoVersions), "^\d+\.\d+")
|
||||
$cachedTools.AddToolVersionsList("Node.js", $(Get-ToolcacheNodeVersions), "^\d+")
|
||||
$cachedTools.AddToolVersionsList("Python", $(Get-ToolcachePythonVersions), "^\d+\.\d+")
|
||||
$cachedTools.AddToolVersionsList("PyPy", $(Get-ToolcachePyPyVersions), "^\d+\.\d+")
|
||||
$cachedTools.AddToolVersionsList("Ruby", $(Get-ToolcacheRubyVersions), "^\d+\.\d+")
|
||||
}
|
||||
|
||||
# PowerShell Tools
|
||||
$powerShellTools = $installedSoftware.AddHeader("PowerShell Tools")
|
||||
$powerShellTools.AddToolVersion("PowerShell", $(Get-PowershellVersion))
|
||||
$powerShellTools.AddHeader("PowerShell Modules").AddNodes($(Get-PowerShellModules))
|
||||
@@ -231,9 +284,12 @@ $installedSoftware.AddHeader("Web Servers").AddTable($(Build-WebServersTable))
|
||||
|
||||
$androidTools = $installedSoftware.AddHeader("Android")
|
||||
$androidTools.AddTable($(Build-AndroidTable))
|
||||
|
||||
$androidTools.AddHeader("Environment variables").AddTable($(Build-AndroidEnvironmentTable))
|
||||
|
||||
if (-not $(Test-IsUbuntu24)) {
|
||||
$installedSoftware.AddHeader("Cached Docker images").AddTable($(Get-CachedDockerImagesTableData))
|
||||
}
|
||||
$installedSoftware.AddHeader("Installed apt packages").AddTable($(Get-AptPackages))
|
||||
|
||||
$softwareReport.ToJson() | Out-File -FilePath "${OutputDirectory}/software-report.json" -Encoding UTF8NoBOM
|
||||
|
||||
@@ -10,7 +10,7 @@ function Get-DashVersion {
|
||||
|
||||
function Get-CPPVersions {
|
||||
$result = Get-CommandResult "apt list --installed" -Multiline
|
||||
$cppVersions = $result.Output | Where-Object { $_ -match "g\+\+-\d+" } | ForEach-Object {
|
||||
$cppVersions = $result.Output | Where-Object { $_ -match "g\+\+-\d\d\/" } | ForEach-Object {
|
||||
& $_.Split("/")[0] --version | Select-Object -First 1 | Get-StringPart -Part 3
|
||||
} | Sort-Object {[Version] $_}
|
||||
return $cppVersions
|
||||
@@ -18,9 +18,8 @@ function Get-CPPVersions {
|
||||
|
||||
function Get-FortranVersions {
|
||||
$result = Get-CommandResult "apt list --installed" -Multiline
|
||||
$fortranVersions = $result.Output | Where-Object { $_ -match "^gfortran-\d+" } | ForEach-Object {
|
||||
$_ -match "now (?<version>\d+\.\d+\.\d+)-" | Out-Null
|
||||
$Matches.version
|
||||
$fortranVersions = $result.Output | Where-Object { $_ -match "^gfortran-\d\d\/" } | ForEach-Object {
|
||||
& $_.Split("/")[0] --version | Select-Object -First 1 | Get-StringPart -Part 4
|
||||
} | Sort-Object {[Version] $_}
|
||||
return $fortranVersions
|
||||
}
|
||||
@@ -175,15 +174,13 @@ function Get-ParcelVersion {
|
||||
}
|
||||
|
||||
function Get-PipVersion {
|
||||
$result = Get-CommandResult "pip --version"
|
||||
$result.Output -match "pip (?<version>\d+\.\d+\.\d+)" | Out-Null
|
||||
return $Matches.version
|
||||
$pipVersion = pip --version | Get-StringPart -Part 1
|
||||
return $pipVersion
|
||||
}
|
||||
|
||||
function Get-Pip3Version {
|
||||
$result = Get-CommandResult "pip3 --version"
|
||||
$result.Output -match "pip (?<version>\d+\.\d+\.\d+)" | Out-Null
|
||||
return $Matches.version
|
||||
$pip3Version = pip3 --version | Get-StringPart -Part 1
|
||||
return $pip3Version
|
||||
}
|
||||
|
||||
function Get-VcpkgVersion {
|
||||
|
||||
@@ -5,13 +5,13 @@
|
||||
################################################################################
|
||||
|
||||
is_ubuntu20() {
|
||||
lsb_release -d | grep -q 'Ubuntu 20'
|
||||
lsb_release -rs | grep -q '20.04'
|
||||
}
|
||||
|
||||
is_ubuntu22() {
|
||||
lsb_release -d | grep -q 'Ubuntu 22'
|
||||
lsb_release -rs | grep -q '22.04'
|
||||
}
|
||||
|
||||
is_ubuntu24() {
|
||||
lsb_release -d | grep -q 'Ubuntu 24'
|
||||
lsb_release -rs | grep -q '24.04'
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
Describe "Firefox" {
|
||||
Describe "Firefox" -Skip:((-not (Test-IsUbuntu20)) -and (-not (Test-IsUbuntu22))) {
|
||||
It "Firefox" {
|
||||
"firefox --version" | Should -ReturnZeroExitCode
|
||||
}
|
||||
@@ -24,7 +24,7 @@ Describe "Chrome" {
|
||||
}
|
||||
}
|
||||
|
||||
Describe "Edge" {
|
||||
Describe "Edge" -Skip:((-not (Test-IsUbuntu20)) -and (-not (Test-IsUbuntu22))) {
|
||||
It "Edge" {
|
||||
"microsoft-edge --version" | Should -ReturnZeroExitCode
|
||||
}
|
||||
|
||||
@@ -10,7 +10,7 @@ Describe "Azure DevOps CLI" {
|
||||
}
|
||||
}
|
||||
|
||||
Describe "Aliyun CLI" {
|
||||
Describe "Aliyun CLI" -Skip:((-not (Test-IsUbuntu20)) -and (-not (Test-IsUbuntu22))) {
|
||||
It "Aliyun CLI" {
|
||||
"aliyun version" | Should -ReturnZeroExitCode
|
||||
}
|
||||
@@ -36,19 +36,19 @@ Describe "GitHub CLI" {
|
||||
}
|
||||
}
|
||||
|
||||
Describe "Google Cloud CLI" {
|
||||
Describe "Google Cloud CLI" -Skip:((-not (Test-IsUbuntu20)) -and (-not (Test-IsUbuntu22))) {
|
||||
It "Google Cloud CLI" {
|
||||
"gcloud --version" | Should -ReturnZeroExitCode
|
||||
}
|
||||
}
|
||||
|
||||
Describe "OC CLI" {
|
||||
Describe "OC CLI" -Skip:((-not (Test-IsUbuntu20)) -and (-not (Test-IsUbuntu22))) {
|
||||
It "OC CLI" {
|
||||
"oc version" | Should -ReturnZeroExitCode
|
||||
}
|
||||
}
|
||||
|
||||
Describe "Oras CLI" {
|
||||
Describe "Oras CLI" -Skip:((-not (Test-IsUbuntu20)) -and (-not (Test-IsUbuntu22))) {
|
||||
It "Oras CLI" {
|
||||
"oras version" | Should -ReturnZeroExitCode
|
||||
}
|
||||
|
||||
@@ -24,7 +24,7 @@ Describe "PHP" {
|
||||
}
|
||||
}
|
||||
|
||||
Describe "Swift" {
|
||||
Describe "Swift" -Skip:((-not (Test-IsUbuntu20)) -and (-not (Test-IsUbuntu22))) {
|
||||
It "swift" {
|
||||
"swift --version" | Should -ReturnZeroExitCode
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
Describe "MongoDB" -Skip:(Test-IsUbuntu22) {
|
||||
Describe "MongoDB" -Skip:(-not (Test-IsUbuntu20)) {
|
||||
It "<ToolName>" -TestCases @(
|
||||
@{ ToolName = "mongo" }
|
||||
@{ ToolName = "mongod" }
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
Import-Module "$PSScriptRoot/../helpers/Common.Helpers.psm1" -DisableNameChecking
|
||||
|
||||
Describe "Java" {
|
||||
Describe "Java" -Skip:(Test-IsUbuntu24) {
|
||||
$toolsetJava = (Get-ToolsetContent).java
|
||||
$defaultVersion = $toolsetJava.default
|
||||
$jdkVersions = $toolsetJava.versions
|
||||
@@ -17,22 +17,10 @@ Describe "Java" {
|
||||
It "<ToolName>" -TestCases @(
|
||||
@{ ToolName = "java" }
|
||||
@{ ToolName = "javac" }
|
||||
@{ ToolName = "mvn" }
|
||||
@{ ToolName = "ant" }
|
||||
) {
|
||||
"$ToolName -version" | Should -ReturnZeroExitCode
|
||||
}
|
||||
|
||||
It "Gradle" {
|
||||
"gradle -version" | Should -ReturnZeroExitCode
|
||||
|
||||
$gradleVariableValue = [System.Environment]::GetEnvironmentVariable("GRADLE_HOME")
|
||||
$gradleVariableValue | Should -BeLike "/usr/share/gradle-*"
|
||||
|
||||
$gradlePath = Join-Path $env:GRADLE_HOME "bin/gradle"
|
||||
"`"$GradlePath`" -version" | Should -ReturnZeroExitCode
|
||||
}
|
||||
|
||||
$testCases = $jdkVersions | ForEach-Object { @{Version = $_ } }
|
||||
|
||||
It "Java <Version>" -TestCases $testCases {
|
||||
@@ -48,3 +36,21 @@ Describe "Java" {
|
||||
"`"$javaPath`" -version" | Should -OutputTextMatchingRegex "openjdk\ version\ `"${Version}(\.[0-9_\.]+)?`""
|
||||
}
|
||||
}
|
||||
|
||||
Describe "Java-Tools" {
|
||||
It "Gradle" {
|
||||
"gradle -version" | Should -ReturnZeroExitCode
|
||||
|
||||
$gradleVariableValue = [System.Environment]::GetEnvironmentVariable("GRADLE_HOME")
|
||||
$gradleVariableValue | Should -BeLike "/usr/share/gradle-*"
|
||||
|
||||
$gradlePath = Join-Path $env:GRADLE_HOME "bin/gradle"
|
||||
"`"$GradlePath`" -version" | Should -ReturnZeroExitCode
|
||||
}
|
||||
It "<ToolName>" -TestCases @(
|
||||
@{ ToolName = "mvn" }
|
||||
@{ ToolName = "ant" }
|
||||
) {
|
||||
"$ToolName -version" | Should -ReturnZeroExitCode
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
Import-Module "$PSScriptRoot/../helpers/Common.Helpers.psm1"
|
||||
Describe "azcopy" {
|
||||
It "azcopy" {
|
||||
"azcopy --version" | Should -ReturnZeroExitCode
|
||||
@@ -37,7 +38,11 @@ Describe "Rust" {
|
||||
"rustfmt --version" | Should -ReturnZeroExitCode
|
||||
}
|
||||
|
||||
Context "Cargo dependencies" {
|
||||
It "cargo" {
|
||||
"cargo --version" | Should -ReturnZeroExitCode
|
||||
}
|
||||
|
||||
Context "Cargo dependencies" -Skip:((-not (Test-IsUbuntu20)) -and (-not (Test-IsUbuntu22))) {
|
||||
It "bindgen" {
|
||||
"bindgen --version" | Should -ReturnZeroExitCode
|
||||
}
|
||||
@@ -46,10 +51,6 @@ Describe "Rust" {
|
||||
"cbindgen --version" | Should -ReturnZeroExitCode
|
||||
}
|
||||
|
||||
It "cargo" {
|
||||
"cargo --version" | Should -ReturnZeroExitCode
|
||||
}
|
||||
|
||||
It "cargo-clippy" {
|
||||
"cargo-clippy --version" | Should -ReturnZeroExitCode
|
||||
}
|
||||
@@ -105,7 +106,7 @@ Describe "Docker images" {
|
||||
}
|
||||
}
|
||||
|
||||
Describe "Docker-compose v1" {
|
||||
Describe "Docker-compose v1" -Skip:((-not (Test-IsUbuntu20)) -and (-not (Test-IsUbuntu20))) {
|
||||
It "docker-compose" {
|
||||
"docker-compose --version"| Should -ReturnZeroExitCode
|
||||
}
|
||||
@@ -117,7 +118,7 @@ Describe "Ansible" {
|
||||
}
|
||||
}
|
||||
|
||||
Describe "Bazel" {
|
||||
Describe "Bazel" -Skip:((-not (Test-IsUbuntu20)) -and (-not (Test-IsUbuntu20))) {
|
||||
It "<ToolName>" -TestCases @(
|
||||
@{ ToolName = "bazel" }
|
||||
@{ ToolName = "bazelisk" }
|
||||
@@ -144,7 +145,7 @@ Describe "Cmake" {
|
||||
}
|
||||
}
|
||||
|
||||
Describe "erlang" -Skip:(Test-IsUbuntu22) {
|
||||
Describe "erlang" -Skip:(-not (Test-IsUbuntu20)) {
|
||||
$testCases = @("erl -version", "erlc -v", "rebar3 -v") | ForEach-Object { @{ErlangCommand = $_} }
|
||||
|
||||
It "erlang <ErlangCommand>" -TestCases $testCases {
|
||||
@@ -168,7 +169,7 @@ Describe "gfortran" {
|
||||
}
|
||||
}
|
||||
|
||||
Describe "Mono" {
|
||||
Describe "Mono" -Skip:(Test-IsUbuntu24) {
|
||||
It "mono" {
|
||||
"mono --version" | Should -ReturnZeroExitCode
|
||||
}
|
||||
@@ -182,25 +183,25 @@ Describe "Mono" {
|
||||
}
|
||||
}
|
||||
|
||||
Describe "MSSQLCommandLineTools" {
|
||||
Describe "MSSQLCommandLineTools" -Skip:((-not (Test-IsUbuntu20)) -and (-not (Test-IsUbuntu20))) {
|
||||
It "sqlcmd" {
|
||||
"sqlcmd -?" | Should -ReturnZeroExitCode
|
||||
}
|
||||
}
|
||||
|
||||
Describe "SqlPackage" {
|
||||
Describe "SqlPackage" -Skip:((-not (Test-IsUbuntu20)) -and (-not (Test-IsUbuntu20))) {
|
||||
It "sqlpackage" {
|
||||
"sqlpackage /version" | Should -ReturnZeroExitCode
|
||||
}
|
||||
}
|
||||
|
||||
Describe "R" {
|
||||
Describe "R" -Skip:((-not (Test-IsUbuntu20)) -and (-not (Test-IsUbuntu20))) {
|
||||
It "r" {
|
||||
"R --version" | Should -ReturnZeroExitCode
|
||||
}
|
||||
}
|
||||
|
||||
Describe "Sbt" {
|
||||
Describe "Sbt" -Skip:((-not (Test-IsUbuntu20)) -and (-not (Test-IsUbuntu20))) {
|
||||
It "sbt" {
|
||||
"sbt --version" | Should -ReturnZeroExitCode
|
||||
}
|
||||
@@ -213,7 +214,7 @@ Describe "Selenium" {
|
||||
}
|
||||
}
|
||||
|
||||
Describe "Terraform" {
|
||||
Describe "Terraform" -Skip:((-not (Test-IsUbuntu20)) -and (-not (Test-IsUbuntu20))) {
|
||||
It "terraform" {
|
||||
"terraform --version" | Should -ReturnZeroExitCode
|
||||
}
|
||||
@@ -251,13 +252,13 @@ Describe "Git-lfs" {
|
||||
}
|
||||
}
|
||||
|
||||
Describe "Heroku" {
|
||||
Describe "Heroku" -Skip:((-not (Test-IsUbuntu20)) -and (-not (Test-IsUbuntu20))) {
|
||||
It "heroku" {
|
||||
"heroku --version" | Should -ReturnZeroExitCode
|
||||
}
|
||||
}
|
||||
|
||||
Describe "HHVM" -Skip:(Test-IsUbuntu22) {
|
||||
Describe "HHVM" -Skip:(-not (Test-IsUbuntu20)) {
|
||||
It "hhvm" {
|
||||
"hhvm --version" | Should -ReturnZeroExitCode
|
||||
}
|
||||
@@ -297,7 +298,7 @@ Describe "Kubernetes tools" {
|
||||
}
|
||||
}
|
||||
|
||||
Describe "Leiningen" {
|
||||
Describe "Leiningen" -Skip:((-not (Test-IsUbuntu20)) -and (-not (Test-IsUbuntu20))) {
|
||||
It "leiningen" {
|
||||
"lein --version" | Should -ReturnZeroExitCode
|
||||
}
|
||||
@@ -309,7 +310,7 @@ Describe "Conda" {
|
||||
}
|
||||
}
|
||||
|
||||
Describe "Packer" {
|
||||
Describe "Packer" -Skip:((-not (Test-IsUbuntu20)) -and (-not (Test-IsUbuntu20))) {
|
||||
It "packer" {
|
||||
"packer --version" | Should -ReturnZeroExitCode
|
||||
}
|
||||
@@ -321,14 +322,14 @@ Describe "Pulumi" {
|
||||
}
|
||||
}
|
||||
|
||||
Describe "Phantomjs" -Skip:(Test-IsUbuntu22) {
|
||||
Describe "Phantomjs" -Skip:(-not (Test-IsUbuntu20)) {
|
||||
It "phantomjs" {
|
||||
$env:OPENSSL_CONF="/etc/ssl"
|
||||
"phantomjs --version" | Should -ReturnZeroExitCode
|
||||
}
|
||||
}
|
||||
|
||||
Describe "Containers" {
|
||||
Describe "Containers" -Skip:((-not (Test-IsUbuntu20)) -and (-not (Test-IsUbuntu20))) {
|
||||
$testCases = @("podman", "buildah", "skopeo") | ForEach-Object { @{ContainerCommand = $_} }
|
||||
|
||||
It "<ContainerCommand>" -TestCases $testCases {
|
||||
@@ -344,7 +345,7 @@ Describe "Containers" {
|
||||
|
||||
}
|
||||
|
||||
Describe "nvm" {
|
||||
Describe "nvm" -Skip:((-not (Test-IsUbuntu20)) -and (-not (Test-IsUbuntu20))) {
|
||||
It "nvm" {
|
||||
"source /etc/skel/.nvm/nvm.sh && nvm --version" | Should -ReturnZeroExitCode
|
||||
}
|
||||
@@ -380,7 +381,7 @@ Describe "yq" {
|
||||
}
|
||||
}
|
||||
|
||||
Describe "Kotlin" {
|
||||
Describe "Kotlin" -Skip:((-not (Test-IsUbuntu20)) -and (-not (Test-IsUbuntu20))) {
|
||||
It "kapt" {
|
||||
"kapt -version" | Should -ReturnZeroExitCode
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
Describe "Toolset" {
|
||||
Describe "Toolset" -Skip:((-not (Test-IsUbuntu20)) -and (-not (Test-IsUbuntu22))) {
|
||||
$tools = (Get-ToolsetContent).toolcache
|
||||
|
||||
$toolsExecutables = @{
|
||||
|
||||
385
images/ubuntu/templates/ubuntu-24.04.pkr.hcl
Normal file
385
images/ubuntu/templates/ubuntu-24.04.pkr.hcl
Normal file
@@ -0,0 +1,385 @@
|
||||
packer {
|
||||
required_plugins {
|
||||
azure = {
|
||||
source = "github.com/hashicorp/azure"
|
||||
version = "1.4.5"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
locals {
|
||||
managed_image_name = var.managed_image_name != "" ? var.managed_image_name : "packer-${var.image_os}-${var.image_version}"
|
||||
}
|
||||
|
||||
variable "allowed_inbound_ip_addresses" {
|
||||
type = list(string)
|
||||
default = []
|
||||
}
|
||||
|
||||
variable "azure_tags" {
|
||||
type = map(string)
|
||||
default = {}
|
||||
}
|
||||
|
||||
variable "build_resource_group_name" {
|
||||
type = string
|
||||
default = "${env("BUILD_RESOURCE_GROUP_NAME")}"
|
||||
}
|
||||
|
||||
variable "client_cert_path" {
|
||||
type = string
|
||||
default = "${env("ARM_CLIENT_CERT_PATH")}"
|
||||
}
|
||||
|
||||
variable "client_id" {
|
||||
type = string
|
||||
default = "${env("ARM_CLIENT_ID")}"
|
||||
}
|
||||
|
||||
variable "client_secret" {
|
||||
type = string
|
||||
default = "${env("ARM_CLIENT_SECRET")}"
|
||||
sensitive = true
|
||||
}
|
||||
|
||||
variable "dockerhub_login" {
|
||||
type = string
|
||||
default = "${env("DOCKERHUB_LOGIN")}"
|
||||
}
|
||||
|
||||
variable "dockerhub_password" {
|
||||
type = string
|
||||
default = "${env("DOCKERHUB_PASSWORD")}"
|
||||
}
|
||||
|
||||
variable "helper_script_folder" {
|
||||
type = string
|
||||
default = "/imagegeneration/helpers"
|
||||
}
|
||||
|
||||
variable "image_folder" {
|
||||
type = string
|
||||
default = "/imagegeneration"
|
||||
}
|
||||
|
||||
variable "image_os" {
|
||||
type = string
|
||||
default = "ubuntu24"
|
||||
}
|
||||
|
||||
variable "image_version" {
|
||||
type = string
|
||||
default = "dev"
|
||||
}
|
||||
|
||||
variable "imagedata_file" {
|
||||
type = string
|
||||
default = "/imagegeneration/imagedata.json"
|
||||
}
|
||||
|
||||
variable "installer_script_folder" {
|
||||
type = string
|
||||
default = "/imagegeneration/installers"
|
||||
}
|
||||
|
||||
variable "install_password" {
|
||||
type = string
|
||||
default = ""
|
||||
sensitive = true
|
||||
}
|
||||
|
||||
variable "location" {
|
||||
type = string
|
||||
default = "${env("ARM_RESOURCE_LOCATION")}"
|
||||
}
|
||||
|
||||
variable "managed_image_name" {
|
||||
type = string
|
||||
default = ""
|
||||
}
|
||||
|
||||
variable "managed_image_resource_group_name" {
|
||||
type = string
|
||||
default = "${env("ARM_RESOURCE_GROUP")}"
|
||||
}
|
||||
|
||||
variable "private_virtual_network_with_public_ip" {
|
||||
type = bool
|
||||
default = false
|
||||
}
|
||||
|
||||
variable "subscription_id" {
|
||||
type = string
|
||||
default = "${env("ARM_SUBSCRIPTION_ID")}"
|
||||
}
|
||||
|
||||
variable "temp_resource_group_name" {
|
||||
type = string
|
||||
default = "${env("TEMP_RESOURCE_GROUP_NAME")}"
|
||||
}
|
||||
|
||||
variable "tenant_id" {
|
||||
type = string
|
||||
default = "${env("ARM_TENANT_ID")}"
|
||||
}
|
||||
|
||||
variable "virtual_network_name" {
|
||||
type = string
|
||||
default = "${env("VNET_NAME")}"
|
||||
}
|
||||
|
||||
variable "virtual_network_resource_group_name" {
|
||||
type = string
|
||||
default = "${env("VNET_RESOURCE_GROUP")}"
|
||||
}
|
||||
|
||||
variable "virtual_network_subnet_name" {
|
||||
type = string
|
||||
default = "${env("VNET_SUBNET")}"
|
||||
}
|
||||
|
||||
variable "vm_size" {
|
||||
type = string
|
||||
default = "Standard_D4s_v4"
|
||||
}
|
||||
|
||||
source "azure-arm" "build_image" {
|
||||
allowed_inbound_ip_addresses = "${var.allowed_inbound_ip_addresses}"
|
||||
build_resource_group_name = "${var.build_resource_group_name}"
|
||||
client_cert_path = "${var.client_cert_path}"
|
||||
client_id = "${var.client_id}"
|
||||
client_secret = "${var.client_secret}"
|
||||
image_offer = "ubuntu-24_04-lts"
|
||||
image_publisher = "canonical"
|
||||
image_sku = "server-gen1"
|
||||
location = "${var.location}"
|
||||
managed_image_name = "${local.managed_image_name}"
|
||||
managed_image_resource_group_name = "${var.managed_image_resource_group_name}"
|
||||
os_disk_size_gb = "75"
|
||||
os_type = "Linux"
|
||||
private_virtual_network_with_public_ip = "${var.private_virtual_network_with_public_ip}"
|
||||
subscription_id = "${var.subscription_id}"
|
||||
temp_resource_group_name = "${var.temp_resource_group_name}"
|
||||
tenant_id = "${var.tenant_id}"
|
||||
virtual_network_name = "${var.virtual_network_name}"
|
||||
virtual_network_resource_group_name = "${var.virtual_network_resource_group_name}"
|
||||
virtual_network_subnet_name = "${var.virtual_network_subnet_name}"
|
||||
vm_size = "${var.vm_size}"
|
||||
|
||||
dynamic "azure_tag" {
|
||||
for_each = var.azure_tags
|
||||
content {
|
||||
name = azure_tag.key
|
||||
value = azure_tag.value
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
build {
|
||||
sources = ["source.azure-arm.build_image"]
|
||||
|
||||
provisioner "shell" {
|
||||
execute_command = "sudo sh -c '{{ .Vars }} {{ .Path }}'"
|
||||
inline = ["mkdir ${var.image_folder}", "chmod 777 ${var.image_folder}"]
|
||||
}
|
||||
|
||||
provisioner "shell" {
|
||||
execute_command = "sudo sh -c '{{ .Vars }} {{ .Path }}'"
|
||||
script = "${path.root}/../scripts/build/configure-apt-mock.sh"
|
||||
}
|
||||
|
||||
provisioner "shell" {
|
||||
environment_vars = ["DEBIAN_FRONTEND=noninteractive"]
|
||||
execute_command = "sudo sh -c '{{ .Vars }} {{ .Path }}'"
|
||||
scripts = [
|
||||
"${path.root}/../scripts/build/install-ms-repos.sh",
|
||||
"${path.root}/../scripts/build/configure-apt-sources.sh",
|
||||
"${path.root}/../scripts/build/configure-apt.sh"
|
||||
]
|
||||
}
|
||||
|
||||
provisioner "shell" {
|
||||
execute_command = "sudo sh -c '{{ .Vars }} {{ .Path }}'"
|
||||
script = "${path.root}/../scripts/build/configure-limits.sh"
|
||||
}
|
||||
|
||||
provisioner "file" {
|
||||
destination = "${var.helper_script_folder}"
|
||||
source = "${path.root}/../scripts/helpers"
|
||||
}
|
||||
|
||||
provisioner "file" {
|
||||
destination = "${var.installer_script_folder}"
|
||||
source = "${path.root}/../scripts/build"
|
||||
}
|
||||
|
||||
provisioner "file" {
|
||||
destination = "${var.image_folder}"
|
||||
sources = [
|
||||
"${path.root}/../assets/post-gen",
|
||||
"${path.root}/../scripts/tests",
|
||||
"${path.root}/../scripts/docs-gen"
|
||||
]
|
||||
}
|
||||
|
||||
provisioner "file" {
|
||||
destination = "${var.image_folder}/docs-gen/"
|
||||
source = "${path.root}/../../../helpers/software-report-base"
|
||||
}
|
||||
|
||||
provisioner "file" {
|
||||
destination = "${var.installer_script_folder}/toolset.json"
|
||||
source = "${path.root}/../toolsets/toolset-2404.json"
|
||||
}
|
||||
|
||||
provisioner "shell" {
|
||||
execute_command = "sudo sh -c '{{ .Vars }} {{ .Path }}'"
|
||||
inline = [
|
||||
"mv ${var.image_folder}/docs-gen ${var.image_folder}/SoftwareReport",
|
||||
"mv ${var.image_folder}/post-gen ${var.image_folder}/post-generation"
|
||||
]
|
||||
}
|
||||
|
||||
provisioner "shell" {
|
||||
environment_vars = ["IMAGE_VERSION=${var.image_version}", "IMAGEDATA_FILE=${var.imagedata_file}"]
|
||||
execute_command = "sudo sh -c '{{ .Vars }} {{ .Path }}'"
|
||||
scripts = ["${path.root}/../scripts/build/configure-image-data.sh"]
|
||||
}
|
||||
|
||||
provisioner "shell" {
|
||||
environment_vars = ["IMAGE_VERSION=${var.image_version}", "IMAGE_OS=${var.image_os}", "HELPER_SCRIPTS=${var.helper_script_folder}"]
|
||||
execute_command = "sudo sh -c '{{ .Vars }} {{ .Path }}'"
|
||||
scripts = ["${path.root}/../scripts/build/configure-environment.sh"]
|
||||
}
|
||||
|
||||
provisioner "shell" {
|
||||
environment_vars = ["DEBIAN_FRONTEND=noninteractive", "HELPER_SCRIPTS=${var.helper_script_folder}", "INSTALLER_SCRIPT_FOLDER=${var.installer_script_folder}"]
|
||||
execute_command = "sudo sh -c '{{ .Vars }} {{ .Path }}'"
|
||||
scripts = ["${path.root}/../scripts/build/install-apt-vital.sh"]
|
||||
}
|
||||
|
||||
provisioner "shell" {
|
||||
environment_vars = ["HELPER_SCRIPTS=${var.helper_script_folder}", "INSTALLER_SCRIPT_FOLDER=${var.installer_script_folder}"]
|
||||
execute_command = "sudo sh -c '{{ .Vars }} {{ .Path }}'"
|
||||
scripts = ["${path.root}/../scripts/build/install-powershell.sh"]
|
||||
}
|
||||
|
||||
provisioner "shell" {
|
||||
environment_vars = ["HELPER_SCRIPTS=${var.helper_script_folder}", "INSTALLER_SCRIPT_FOLDER=${var.installer_script_folder}"]
|
||||
execute_command = "sudo sh -c '{{ .Vars }} pwsh -f {{ .Path }}'"
|
||||
scripts = ["${path.root}/../scripts/build/Install-PowerShellModules.ps1", "${path.root}/../scripts/build/Install-PowerShellAzModules.ps1"]
|
||||
}
|
||||
|
||||
provisioner "shell" {
|
||||
environment_vars = ["HELPER_SCRIPTS=${var.helper_script_folder}", "INSTALLER_SCRIPT_FOLDER=${var.installer_script_folder}", "DEBIAN_FRONTEND=noninteractive"]
|
||||
execute_command = "sudo sh -c '{{ .Vars }} {{ .Path }}'"
|
||||
scripts = [
|
||||
"${path.root}/../scripts/build/install-actions-cache.sh",
|
||||
"${path.root}/../scripts/build/install-runner-package.sh",
|
||||
"${path.root}/../scripts/build/install-apt-common.sh",
|
||||
"${path.root}/../scripts/build/install-azcopy.sh",
|
||||
"${path.root}/../scripts/build/install-azure-cli.sh",
|
||||
"${path.root}/../scripts/build/install-azure-devops-cli.sh",
|
||||
"${path.root}/../scripts/build/install-bicep.sh",
|
||||
"${path.root}/../scripts/build/install-apache.sh",
|
||||
"${path.root}/../scripts/build/install-aws-tools.sh",
|
||||
"${path.root}/../scripts/build/install-clang.sh",
|
||||
"${path.root}/../scripts/build/install-cmake.sh",
|
||||
"${path.root}/../scripts/build/install-codeql-bundle.sh",
|
||||
"${path.root}/../scripts/build/install-dotnetcore-sdk.sh",
|
||||
"${path.root}/../scripts/build/install-gcc-compilers.sh",
|
||||
"${path.root}/../scripts/build/install-gfortran.sh",
|
||||
"${path.root}/../scripts/build/install-git.sh",
|
||||
"${path.root}/../scripts/build/install-git-lfs.sh",
|
||||
"${path.root}/../scripts/build/install-github-cli.sh",
|
||||
"${path.root}/../scripts/build/install-google-chrome.sh",
|
||||
"${path.root}/../scripts/build/install-haskell.sh",
|
||||
"${path.root}/../scripts/build/install-java-tools.sh",
|
||||
"${path.root}/../scripts/build/install-kubernetes-tools.sh",
|
||||
"${path.root}/../scripts/build/install-miniconda.sh",
|
||||
"${path.root}/../scripts/build/install-mysql.sh",
|
||||
"${path.root}/../scripts/build/install-nginx.sh",
|
||||
"${path.root}/../scripts/build/install-nodejs.sh",
|
||||
"${path.root}/../scripts/build/install-php.sh",
|
||||
"${path.root}/../scripts/build/install-postgresql.sh",
|
||||
"${path.root}/../scripts/build/install-pulumi.sh",
|
||||
"${path.root}/../scripts/build/install-ruby.sh",
|
||||
"${path.root}/../scripts/build/install-rust.sh",
|
||||
"${path.root}/../scripts/build/install-julia.sh",
|
||||
"${path.root}/../scripts/build/install-selenium.sh",
|
||||
"${path.root}/../scripts/build/install-vcpkg.sh",
|
||||
"${path.root}/../scripts/build/configure-dpkg.sh",
|
||||
"${path.root}/../scripts/build/install-yq.sh",
|
||||
"${path.root}/../scripts/build/install-android-sdk.sh",
|
||||
"${path.root}/../scripts/build/install-pypy.sh",
|
||||
"${path.root}/../scripts/build/install-python.sh",
|
||||
"${path.root}/../scripts/build/install-zstd.sh"
|
||||
]
|
||||
}
|
||||
|
||||
provisioner "shell" {
|
||||
environment_vars = ["HELPER_SCRIPTS=${var.helper_script_folder}", "INSTALLER_SCRIPT_FOLDER=${var.installer_script_folder}", "DOCKERHUB_PULL_IMAGES=NO"]
|
||||
execute_command = "sudo sh -c '{{ .Vars }} {{ .Path }}'"
|
||||
scripts = ["${path.root}/../scripts/build/install-docker.sh"]
|
||||
}
|
||||
|
||||
provisioner "shell" {
|
||||
environment_vars = ["HELPER_SCRIPTS=${var.helper_script_folder}", "INSTALLER_SCRIPT_FOLDER=${var.installer_script_folder}"]
|
||||
execute_command = "sudo sh -c '{{ .Vars }} {{ .Path }}'"
|
||||
scripts = ["${path.root}/../scripts/build/install-pipx-packages.sh"]
|
||||
}
|
||||
|
||||
provisioner "shell" {
|
||||
environment_vars = ["HELPER_SCRIPTS=${var.helper_script_folder}", "DEBIAN_FRONTEND=noninteractive", "INSTALLER_SCRIPT_FOLDER=${var.installer_script_folder}"]
|
||||
execute_command = "/bin/sh -c '{{ .Vars }} {{ .Path }}'"
|
||||
scripts = ["${path.root}/../scripts/build/install-homebrew.sh"]
|
||||
}
|
||||
|
||||
provisioner "shell" {
|
||||
environment_vars = ["HELPER_SCRIPTS=${var.helper_script_folder}"]
|
||||
execute_command = "sudo sh -c '{{ .Vars }} {{ .Path }}'"
|
||||
scripts = ["${path.root}/../scripts/build/configure-snap.sh"]
|
||||
}
|
||||
|
||||
provisioner "shell" {
|
||||
execute_command = "sudo sh -c '{{ .Vars }} {{ .Path }}'"
|
||||
expect_disconnect = true
|
||||
inline = ["echo 'Reboot VM'", "sudo reboot"]
|
||||
}
|
||||
|
||||
provisioner "shell" {
|
||||
execute_command = "sudo sh -c '{{ .Vars }} {{ .Path }}'"
|
||||
pause_before = "1m0s"
|
||||
scripts = ["${path.root}/../scripts/build/cleanup.sh"]
|
||||
start_retry_timeout = "10m"
|
||||
}
|
||||
|
||||
provisioner "shell" {
|
||||
environment_vars = ["IMAGE_VERSION=${var.image_version}", "INSTALLER_SCRIPT_FOLDER=${var.installer_script_folder}"]
|
||||
inline = ["pwsh -File ${var.image_folder}/SoftwareReport/Generate-SoftwareReport.ps1 -OutputDirectory ${var.image_folder}", "pwsh -File ${var.image_folder}/tests/RunAll-Tests.ps1 -OutputDirectory ${var.image_folder}"]
|
||||
}
|
||||
|
||||
provisioner "file" {
|
||||
destination = "${path.root}/../Ubuntu2404-Readme.md"
|
||||
direction = "download"
|
||||
source = "${var.image_folder}/software-report.md"
|
||||
}
|
||||
|
||||
provisioner "file" {
|
||||
destination = "${path.root}/../software-report.json"
|
||||
direction = "download"
|
||||
source = "${var.image_folder}/software-report.json"
|
||||
}
|
||||
|
||||
provisioner "shell" {
|
||||
environment_vars = ["HELPER_SCRIPT_FOLDER=${var.helper_script_folder}", "INSTALLER_SCRIPT_FOLDER=${var.installer_script_folder}", "IMAGE_FOLDER=${var.image_folder}"]
|
||||
execute_command = "sudo sh -c '{{ .Vars }} {{ .Path }}'"
|
||||
scripts = ["${path.root}/../scripts/build/configure-system.sh"]
|
||||
}
|
||||
|
||||
provisioner "shell" {
|
||||
execute_command = "sudo sh -c '{{ .Vars }} {{ .Path }}'"
|
||||
inline = ["sleep 30", "/usr/sbin/waagent -force -deprovision+user && export HISTSIZE=0 && sync"]
|
||||
}
|
||||
|
||||
}
|
||||
305
images/ubuntu/toolsets/toolset-2404.json
Normal file
305
images/ubuntu/toolsets/toolset-2404.json
Normal file
@@ -0,0 +1,305 @@
|
||||
{
|
||||
"toolcache": [
|
||||
{
|
||||
"name": "Python",
|
||||
"url" : "https://raw.githubusercontent.com/actions/python-versions/main/versions-manifest.json",
|
||||
"platform" : "linux",
|
||||
"platform_version": "24.04",
|
||||
"arch": "x64",
|
||||
"versions": []
|
||||
},
|
||||
{
|
||||
"name": "PyPy",
|
||||
"arch": "x64",
|
||||
"platform" : "linux",
|
||||
"versions": [
|
||||
"3.9",
|
||||
"3.10"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "node",
|
||||
"url" : "https://raw.githubusercontent.com/actions/node-versions/main/versions-manifest.json",
|
||||
"platform" : "linux",
|
||||
"arch": "x64",
|
||||
"versions": []
|
||||
},
|
||||
{
|
||||
"name": "go",
|
||||
"url" : "https://raw.githubusercontent.com/actions/go-versions/main/versions-manifest.json",
|
||||
"arch": "x64",
|
||||
"platform" : "linux",
|
||||
"versions": [],
|
||||
"default": "*"
|
||||
},
|
||||
{
|
||||
"name": "Ruby",
|
||||
"platform_version": "24.04",
|
||||
"arch": "x64",
|
||||
"versions": []
|
||||
},
|
||||
{
|
||||
"name": "CodeQL",
|
||||
"platform" : "linux",
|
||||
"arch": "x64",
|
||||
"versions": [
|
||||
"*"
|
||||
]
|
||||
}
|
||||
],
|
||||
"java": {
|
||||
"maven": "3.8.8"
|
||||
},
|
||||
"android": {
|
||||
"cmdline-tools": "commandlinetools-linux-11076708_latest.zip",
|
||||
"platform_min_version": "34",
|
||||
"build_tools_min_version": "34.0.0",
|
||||
"extra_list": [
|
||||
"android;m2repository",
|
||||
"google;m2repository",
|
||||
"google;google_play_services"
|
||||
],
|
||||
"addon_list": [
|
||||
],
|
||||
"additional_tools": [
|
||||
],
|
||||
"ndk": {
|
||||
"default": "26",
|
||||
"versions": [
|
||||
"24", "25", "26"
|
||||
]
|
||||
}
|
||||
},
|
||||
"powershellModules": [
|
||||
{"name": "Microsoft.Graph"},
|
||||
{"name": "Pester"},
|
||||
{"name": "PSScriptAnalyzer"}
|
||||
],
|
||||
"azureModules": [
|
||||
{
|
||||
"name": "az",
|
||||
"url" : "https://raw.githubusercontent.com/Azure/az-ps-module-versions/main/versions-manifest.json",
|
||||
"versions": [
|
||||
"11.5.0"
|
||||
],
|
||||
"zip_versions": [
|
||||
]
|
||||
}
|
||||
],
|
||||
"apt": {
|
||||
"vital_packages": [
|
||||
"bzip2",
|
||||
"curl",
|
||||
"g++",
|
||||
"gcc",
|
||||
"make",
|
||||
"jq",
|
||||
"tar",
|
||||
"unzip",
|
||||
"wget"
|
||||
],
|
||||
"common_packages": [
|
||||
"autoconf",
|
||||
"automake",
|
||||
"dbus",
|
||||
"dnsutils",
|
||||
"dpkg",
|
||||
"dpkg-dev",
|
||||
"fakeroot",
|
||||
"fonts-noto-color-emoji",
|
||||
"gnupg2",
|
||||
"iproute2",
|
||||
"iputils-ping",
|
||||
"libtool",
|
||||
"libssl-dev",
|
||||
"locales",
|
||||
"mercurial",
|
||||
"openssh-client",
|
||||
"p7zip-rar",
|
||||
"pkg-config",
|
||||
"python-is-python3",
|
||||
"rpm",
|
||||
"texinfo",
|
||||
"tk",
|
||||
"tzdata",
|
||||
"upx",
|
||||
"xvfb",
|
||||
"xz-utils",
|
||||
"zsync"
|
||||
],
|
||||
"cmd_packages": [
|
||||
"acl",
|
||||
"aria2",
|
||||
"binutils",
|
||||
"bison",
|
||||
"brotli",
|
||||
"coreutils",
|
||||
"file",
|
||||
"findutils",
|
||||
"flex",
|
||||
"ftp",
|
||||
"haveged",
|
||||
"lz4",
|
||||
"m4",
|
||||
"mediainfo",
|
||||
"netcat",
|
||||
"net-tools",
|
||||
"p7zip-full",
|
||||
"parallel",
|
||||
"patchelf",
|
||||
"pigz",
|
||||
"pollinate",
|
||||
"rsync",
|
||||
"shellcheck",
|
||||
"sphinxsearch",
|
||||
"sqlite3",
|
||||
"ssh",
|
||||
"sshpass",
|
||||
"sudo",
|
||||
"swig",
|
||||
"telnet",
|
||||
"time",
|
||||
"zip"
|
||||
]
|
||||
},
|
||||
"brew": [
|
||||
],
|
||||
"docker": {
|
||||
"images": [
|
||||
],
|
||||
"components": [
|
||||
{
|
||||
"package": "containerd.io",
|
||||
"version": "latest"
|
||||
},
|
||||
{
|
||||
"package": "docker-ce-cli",
|
||||
"version": "26.1.0"
|
||||
},
|
||||
{
|
||||
"package": "docker-ce",
|
||||
"version": "26.1.0"
|
||||
}
|
||||
],
|
||||
"plugins": [
|
||||
{
|
||||
"plugin": "buildx",
|
||||
"version": "latest",
|
||||
"asset": "linux-amd64"
|
||||
},
|
||||
{
|
||||
"plugin": "compose",
|
||||
"version": "latest",
|
||||
"asset": "linux-x86_64"
|
||||
}
|
||||
]
|
||||
},
|
||||
"pipx": [
|
||||
{
|
||||
"package": "yamllint",
|
||||
"cmd": "yamllint"
|
||||
},
|
||||
{
|
||||
"package": "ansible-core",
|
||||
"cmd": "ansible"
|
||||
}
|
||||
],
|
||||
"dotnet": {
|
||||
"aptPackages": [
|
||||
"dotnet-sdk-8.0"
|
||||
],
|
||||
"versions": [
|
||||
"8.0"
|
||||
],
|
||||
"tools": [
|
||||
{ "name": "nbgv", "test": "nbgv --version", "getversion" : "nbgv --version" }
|
||||
]
|
||||
},
|
||||
"clang": {
|
||||
"versions": [
|
||||
"16",
|
||||
"17",
|
||||
"18"
|
||||
],
|
||||
"default_version": "17"
|
||||
},
|
||||
"gcc": {
|
||||
"versions": [
|
||||
"g++-12",
|
||||
"g++-13",
|
||||
"g++-14"
|
||||
]
|
||||
},
|
||||
"gfortran": {
|
||||
"versions": [
|
||||
"gfortran-12",
|
||||
"gfortran-13",
|
||||
"gfortran-14"
|
||||
]
|
||||
},
|
||||
"php": {
|
||||
"versions": [
|
||||
"8.3"
|
||||
]
|
||||
},
|
||||
"rubygems": [
|
||||
{"name": "fastlane"}
|
||||
],
|
||||
"selenium": {
|
||||
"version": "4"
|
||||
},
|
||||
"node": {
|
||||
"default": "20"
|
||||
},
|
||||
"node_modules": [
|
||||
{
|
||||
"name": "grunt",
|
||||
"command": "grunt"
|
||||
},
|
||||
{
|
||||
"name": "gulp",
|
||||
"command": "gulp"
|
||||
},
|
||||
{
|
||||
"name": "n",
|
||||
"command": "n"
|
||||
},
|
||||
{
|
||||
"name": "parcel",
|
||||
"command": "parcel"
|
||||
},
|
||||
{
|
||||
"name": "typescript",
|
||||
"command": "tsc"
|
||||
},
|
||||
{
|
||||
"name": "newman",
|
||||
"command": "newman"
|
||||
},
|
||||
{
|
||||
"name": "webpack",
|
||||
"command": "webpack"
|
||||
},
|
||||
{
|
||||
"name": "webpack-cli",
|
||||
"command": "webpack-cli"
|
||||
},
|
||||
{
|
||||
"name": "lerna",
|
||||
"command": "lerna"
|
||||
},
|
||||
{
|
||||
"name": "yarn",
|
||||
"command": "yarn"
|
||||
}
|
||||
],
|
||||
"mongodb": {
|
||||
"version": "7.0"
|
||||
},
|
||||
"postgresql": {
|
||||
"version": "16"
|
||||
},
|
||||
"pwsh": {
|
||||
"version": "7.4"
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user