forked from EngineHub/CommandHelper
-
Notifications
You must be signed in to change notification settings - Fork 0
/
azure-pipelines.yml
37 lines (35 loc) · 1.36 KB
/
azure-pipelines.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
# Maven
# Build your Java project and run tests with Apache Maven.
# Add steps that analyze code, save build artifacts, deploy, and more:
# https://docs.microsoft.com/azure/devops/pipelines/languages/java
pool:
vmImage: 'windows-2019'
steps:
- task: JavaToolInstaller@0
inputs:
versionSpec: '21'
jdkArchitectureOption: x64
jdkSourceOption: 'AzureStorage'
azureResourceManagerEndpoint: Azure Resource Manager
azureStorageAccountName: methodscriptjdkbuilds
azureContainerName: jdks
azureCommonVirtualFile: 'OpenJDK21U-jdk_x64_windows_hotspot_21.0.3_9.zip'
jdkDestinationDirectory: '$(agent.toolsDirectory)/jdk21'
cleanDestinationDirectory: true
- task: Maven@3
inputs:
mavenPomFile: 'pom.xml'
javaHomeOption: 'Path'
jdkDirectory: '$(agent.toolsDirectory)\jdk21\JAVA_HOME_21_X64_OpenJDK21U-jdk_x64_windows_hotspot_21.0.3_9_zip\jdk-21.0.3+9'
jdkArchitectureOption: 'x64'
publishJUnitResults: true
testResultsFiles: '**/TEST-*.xml'
goals: 'package'
- task: PowerShell@2
inputs:
targetType: 'inline'
script: '[xml]$pomXml = Get-Content "pom.xml"; $version = $pomXml.project.version; Write-Host "##vso[task.setvariable variable=version]$version"'
- task: PublishPipelineArtifact@0
inputs:
targetPath: 'target/commandhelper-$(version)-full.jar'
artifactName: 'CommandHelper-$(version)-$(Build.BuildNumber).jar'