Home > OS >  Installing Java 14 on Azure pipeline for MacOS agent
Installing Java 14 on Azure pipeline for MacOS agent

Time:11-21

I need to use Java 14 on a hosted agent (macos-12) and I'm trying to install it through a script and then use the JavaToolInstaller task to make it available.

I have modified the script from enter image description here

In my zip, I have these files:

enter image description here

Uploaded to the storage account.

enter image description here

Yaml:

trigger:
- none

pool:
  vmImage: macos-12

steps:
- task: JavaToolInstaller@0
  inputs:
    versionSpec: '14'
    jdkArchitectureOption: 'x64'
    jdkSourceOption: 'AzureStorage'
    azureResourceManagerEndpoint: 'myEndpoint'
    azureStorageAccountName: 'teststorage'
    azureContainerName: 'test'
    azureCommonVirtualFile: 'homefolder.zip'
    jdkDestinationDirectory: '$(agent.toolsDirectory)/jdk14'
    cleanDestinationDirectory: false

Result: enter image description here

  • Related