@@ -61,12 +61,26 @@ extends:
6161 steps :
6262 - checkout : self
6363 fetchTags : false
64+ # The image does not have jdk preinstalled, we need to download it first.
65+ - task : Bash@3
66+ displayName : Download JDK 25
67+ inputs :
68+ targetType : inline
69+ script : |-
70+ mkdir -p "$(Agent.TempDirectory)/downloadjdk"
71+ curl --fail --location --silent --show-error \
72+ "https://aka.ms/download-jdk/microsoft-jdk-25-linux-x64.tar.gz" \
73+ --output "$(Agent.TempDirectory)/downloadjdk/microsoft-jdk-25-linux-x64.tar.gz"
6474 - task : JavaToolInstaller@0
6575 displayName : Use Java 25
6676 inputs :
6777 versionSpec : " 25"
6878 jdkArchitectureOption : x64
69- jdkSourceOption : PreInstalled
79+ jdkSourceOption : LocalDirectory
80+ jdkFile : $(Agent.TempDirectory)/downloadjdk/microsoft-jdk-25-linux-x64.tar.gz
81+ jdkDestinationDirectory : $(Agent.ToolsDirectory)/ms-jdk25
82+ - script : java --version
83+ displayName : ' Check Java installation'
7084 - task : NodeTool@0
7185 displayName : Use Node 20.x
7286 inputs :
@@ -93,12 +107,26 @@ extends:
93107 steps :
94108 - checkout : self
95109 fetchTags : false
110+ # The image does not have jdk preinstalled, we need to download it first.
111+ - task : Bash@3
112+ displayName : Download JDK 25
113+ inputs :
114+ targetType : inline
115+ script : |-
116+ mkdir -p "$(Agent.TempDirectory)/downloadjdk"
117+ curl --fail --location --silent --show-error \
118+ "https://aka.ms/download-jdk/microsoft-jdk-25-linux-x64.tar.gz" \
119+ --output "$(Agent.TempDirectory)/downloadjdk/microsoft-jdk-25-linux-x64.tar.gz"
96120 - task : JavaToolInstaller@0
97121 displayName : Use Java 25
98122 inputs :
99123 versionSpec : " 25"
100124 jdkArchitectureOption : x64
101- jdkSourceOption : PreInstalled
125+ jdkSourceOption : LocalDirectory
126+ jdkFile : $(Agent.TempDirectory)/downloadjdk/microsoft-jdk-25-linux-x64.tar.gz
127+ jdkDestinationDirectory : $(Agent.ToolsDirectory)/ms-jdk25
128+ - script : java --version
129+ displayName : ' Check Java installation'
102130 - task : NodeTool@0
103131 displayName : Use Node 20.x
104132 inputs :
0 commit comments