diff --git a/.azure-pipelines/ci.yml b/.azure-pipelines/ci.yml index be27833b..ae84d112 100644 --- a/.azure-pipelines/ci.yml +++ b/.azure-pipelines/ci.yml @@ -61,12 +61,26 @@ extends: steps: - checkout: self fetchTags: false + # The image does not have jdk preinstalled, we need to download it first. + - task: Bash@3 + displayName: Download JDK 25 + inputs: + targetType: inline + script: |- + mkdir -p "$(Agent.TempDirectory)/downloadjdk" + curl --fail --location --silent --show-error \ + "https://aka.ms/download-jdk/microsoft-jdk-25-linux-x64.tar.gz" \ + --output "$(Agent.TempDirectory)/downloadjdk/microsoft-jdk-25-linux-x64.tar.gz" - task: JavaToolInstaller@0 displayName: Use Java 25 inputs: versionSpec: "25" jdkArchitectureOption: x64 - jdkSourceOption: PreInstalled + jdkSourceOption: LocalDirectory + jdkFile: $(Agent.TempDirectory)/downloadjdk/microsoft-jdk-25-linux-x64.tar.gz + jdkDestinationDirectory: $(Agent.ToolsDirectory)/ms-jdk25 + - script: java --version + displayName: 'Check Java installation' - task: NodeTool@0 displayName: Use Node 20.x inputs: @@ -93,12 +107,26 @@ extends: steps: - checkout: self fetchTags: false + # The image does not have jdk preinstalled, we need to download it first. + - task: Bash@3 + displayName: Download JDK 25 + inputs: + targetType: inline + script: |- + mkdir -p "$(Agent.TempDirectory)/downloadjdk" + curl --fail --location --silent --show-error \ + "https://aka.ms/download-jdk/microsoft-jdk-25-linux-x64.tar.gz" \ + --output "$(Agent.TempDirectory)/downloadjdk/microsoft-jdk-25-linux-x64.tar.gz" - task: JavaToolInstaller@0 displayName: Use Java 25 inputs: versionSpec: "25" jdkArchitectureOption: x64 - jdkSourceOption: PreInstalled + jdkSourceOption: LocalDirectory + jdkFile: $(Agent.TempDirectory)/downloadjdk/microsoft-jdk-25-linux-x64.tar.gz + jdkDestinationDirectory: $(Agent.ToolsDirectory)/ms-jdk25 + - script: java --version + displayName: 'Check Java installation' - task: NodeTool@0 displayName: Use Node 20.x inputs: