From bc834aa0838b2d9260e6e809d0d3dce1bc7187e2 Mon Sep 17 00:00:00 2001 From: Shamil Mubarakshin <127750046+shamil-mubarakshin@users.noreply.github.com> Date: Thu, 6 Apr 2023 15:41:26 +0200 Subject: [PATCH] [ubuntu] remove GraalVM (#7399) --- .../SoftwareReport/SoftwareReport.Common.psm1 | 15 ----------- .../SoftwareReport.Generator.ps1 | 3 --- images/linux/scripts/installers/graalvm.sh | 25 ------------------- images/linux/scripts/tests/Tools.Tests.ps1 | 10 -------- images/linux/ubuntu2004.json | 1 - images/linux/ubuntu2204.pkr.hcl | 1 - 6 files changed, 55 deletions(-) delete mode 100644 images/linux/scripts/installers/graalvm.sh diff --git a/images/linux/scripts/SoftwareReport/SoftwareReport.Common.psm1 b/images/linux/scripts/SoftwareReport/SoftwareReport.Common.psm1 index 873f35ce8..c23d1d6d5 100644 --- a/images/linux/scripts/SoftwareReport/SoftwareReport.Common.psm1 +++ b/images/linux/scripts/SoftwareReport/SoftwareReport.Common.psm1 @@ -344,21 +344,6 @@ function Get-PipxVersion { return $Matches.Version } -function Get-GraalVMVersion { - $version = & "$env:GRAALVM_11_ROOT\bin\java" --version | Select-String -Pattern "GraalVM" | Take-OutputPart -Part 5,6 - return $version -} - -function Build-GraalVMTable { - $version = Get-GraalVMVersion - $envVariables = "GRAALVM_11_ROOT" - - return [PSCustomObject] @{ - "Version" = $version - "Environment variables" = $envVariables - } -} - function Build-PackageManagementEnvironmentTable { return @( [PSCustomObject] @{ diff --git a/images/linux/scripts/SoftwareReport/SoftwareReport.Generator.ps1 b/images/linux/scripts/SoftwareReport/SoftwareReport.Generator.ps1 index 5edc90683..daa32686e 100644 --- a/images/linux/scripts/SoftwareReport/SoftwareReport.Generator.ps1 +++ b/images/linux/scripts/SoftwareReport/SoftwareReport.Generator.ps1 @@ -168,9 +168,6 @@ $cliTools.AddToolVersion("Vercel CLI", $(Get-VerselCliversion)) $installedSoftware.AddHeader("Java").AddTable($(Get-JavaVersionsTable)) -if ((Test-IsUbuntu20) -or (Test-IsUbuntu22)) { - $installedSoftware.AddHeader("GraalVM").AddTable($(Build-GraalVMTable)) -} $phpTools = $installedSoftware.AddHeader("PHP Tools") $phpTools.AddToolVersionsListInline("PHP", $(Get-PHPVersions), "^\d+\.\d+") diff --git a/images/linux/scripts/installers/graalvm.sh b/images/linux/scripts/installers/graalvm.sh deleted file mode 100644 index 0d50db2ef..000000000 --- a/images/linux/scripts/installers/graalvm.sh +++ /dev/null @@ -1,25 +0,0 @@ -#!/bin/bash -e -################################################################################ -## File: graalvm.sh -## Desc: Installs GraalVM -################################################################################ - -source $HELPER_SCRIPTS/install.sh -source $HELPER_SCRIPTS/etc-environment.sh - -# Install GraalVM -GRAALVM_ROOT=/usr/local/graalvm -export GRAALVM_11_ROOT=$GRAALVM_ROOT/graalvm-ce-java11* - -downloadUrl=$(get_github_package_download_url "graalvm/graalvm-ce-builds" "contains(\"graalvm-ce-java11-linux-amd64\") and endswith(\"tar.gz\")") -download_with_retries "$downloadUrl" "/tmp" "graalvm-archive.tar.gz" -mkdir $GRAALVM_ROOT -tar -xzf "/tmp/graalvm-archive.tar.gz" -C $GRAALVM_ROOT - -# Set environment variable for GraalVM root -setEtcEnvironmentVariable "GRAALVM_11_ROOT" $GRAALVM_11_ROOT - -# Install Native Image -$GRAALVM_11_ROOT/bin/gu install native-image - -invoke_tests "Tools" "GraalVM" diff --git a/images/linux/scripts/tests/Tools.Tests.ps1 b/images/linux/scripts/tests/Tools.Tests.ps1 index c02d058fa..24bd2ea9f 100644 --- a/images/linux/scripts/tests/Tools.Tests.ps1 +++ b/images/linux/scripts/tests/Tools.Tests.ps1 @@ -331,16 +331,6 @@ Describe "Phantomjs" -Skip:(Test-IsUbuntu22) { } } -Describe "GraalVM" { - It "graalvm" { - '$GRAALVM_11_ROOT/bin/java -version' | Should -ReturnZeroExitCode - } - - It "native-image" { - '$GRAALVM_11_ROOT/bin/native-image --version' | Should -ReturnZeroExitCode - } -} - Describe "Containers" { $testCases = @("podman", "buildah", "skopeo") | ForEach-Object { @{ContainerCommand = $_} } diff --git a/images/linux/ubuntu2004.json b/images/linux/ubuntu2004.json index 05677d2ab..97f539b33 100644 --- a/images/linux/ubuntu2004.json +++ b/images/linux/ubuntu2004.json @@ -253,7 +253,6 @@ "{{template_dir}}/scripts/installers/android.sh", "{{template_dir}}/scripts/installers/pypy.sh", "{{template_dir}}/scripts/installers/python.sh", - "{{template_dir}}/scripts/installers/graalvm.sh", "{{template_dir}}/scripts/installers/zstd.sh" ], "environment_vars": [ diff --git a/images/linux/ubuntu2204.pkr.hcl b/images/linux/ubuntu2204.pkr.hcl index d59d6903d..9b6e0851a 100644 --- a/images/linux/ubuntu2204.pkr.hcl +++ b/images/linux/ubuntu2204.pkr.hcl @@ -334,7 +334,6 @@ build { "${path.root}/scripts/installers/android.sh", "${path.root}/scripts/installers/pypy.sh", "${path.root}/scripts/installers/python.sh", - "${path.root}/scripts/installers/graalvm.sh", "${path.root}/scripts/installers/zstd.sh" ] }