[Ubuntu] Add Ubuntu-24.04 base image (#9754)

Co-authored-by: Alexey Ayupov <alexey-ayupov@github.com>
This commit is contained in:
Erik Bershel
2024-04-26 23:18:26 +02:00
committed by GitHub
parent 54f59dcb98
commit 3d2dd97aa7
23 changed files with 931 additions and 136 deletions

View File

@@ -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
}

View File

@@ -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
}

View File

@@ -24,7 +24,7 @@ Describe "PHP" {
}
}
Describe "Swift" {
Describe "Swift" -Skip:((-not (Test-IsUbuntu20)) -and (-not (Test-IsUbuntu22))) {
It "swift" {
"swift --version" | Should -ReturnZeroExitCode
}

View File

@@ -1,4 +1,4 @@
Describe "MongoDB" -Skip:(Test-IsUbuntu22) {
Describe "MongoDB" -Skip:(-not (Test-IsUbuntu20)) {
It "<ToolName>" -TestCases @(
@{ ToolName = "mongo" }
@{ ToolName = "mongod" }

View File

@@ -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
}
}

View File

@@ -1,3 +1,4 @@
Import-Module "$PSScriptRoot/../helpers/Common.Helpers.psm1"
Describe "azcopy" {
It "azcopy" {
"azcopy --version" | Should -ReturnZeroExitCode
@@ -36,8 +37,12 @@ Describe "Rust" {
It "Rustfmt is installed" {
"rustfmt --version" | Should -ReturnZeroExitCode
}
It "cargo" {
"cargo --version" | Should -ReturnZeroExitCode
}
Context "Cargo dependencies" {
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
}

View File

@@ -1,4 +1,4 @@
Describe "Toolset" {
Describe "Toolset" -Skip:((-not (Test-IsUbuntu20)) -and (-not (Test-IsUbuntu22))) {
$tools = (Get-ToolsetContent).toolcache
$toolsExecutables = @{