Skip to content

Commit e5873ca

Browse files
gavinbarronCopilot
andauthored
ci: Use Maven task in release pipeline (#1376)
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
1 parent f2ff2f1 commit e5873ca

1 file changed

Lines changed: 36 additions & 4 deletions

File tree

‎.azure-pipelines/ci-build.yml‎

Lines changed: 36 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -110,21 +110,53 @@ extends:
110110
inputs:
111111
artifactsFeeds: 'GraphDeveloperExperiences_Public'
112112

113-
- script: ./mvnw install -Psigning --no-transfer-progress
113+
- task: Maven@4
114114
displayName: Publish to local Maven for verification
115115
condition: contains(variables['build.sourceBranch'], 'refs/tags/v')
116+
inputs:
117+
mavenPomFile: 'pom.xml'
118+
goals: 'install'
119+
options: '-Psigning --no-transfer-progress'
120+
publishJUnitResults: false
121+
javaHomeOption: 'JDKVersion'
122+
jdkVersionOption: '1.21'
123+
jdkArchitectureOption: 'x64'
116124

117-
- script: ./mvnw install -Psigning --no-transfer-progress
125+
- task: Maven@4
118126
displayName: Publish to local Maven for verification
119127
condition: not(contains(variables['build.sourceBranch'], 'refs/tags/v'))
128+
inputs:
129+
mavenPomFile: 'pom.xml'
130+
goals: 'install'
131+
options: '-Psigning --no-transfer-progress'
132+
publishJUnitResults: false
133+
javaHomeOption: 'JDKVersion'
134+
jdkVersionOption: '1.21'
135+
jdkArchitectureOption: 'x64'
120136

121-
- script: ./mvnw deploy -Psigning --no-transfer-progress -DaltDeploymentRepository=ADO::default::file://$(Build.SourcesDirectory)/target/staging-deploy
137+
- task: Maven@4
122138
displayName: Stage artifacts for ESRP
123139
condition: contains(variables['build.sourceBranch'], 'refs/tags/v')
140+
inputs:
141+
mavenPomFile: 'pom.xml'
142+
goals: 'deploy'
143+
options: '-Psigning --no-transfer-progress -DaltDeploymentRepository=ADO::default::file://$(Build.SourcesDirectory)/target/staging-deploy'
144+
publishJUnitResults: false
145+
javaHomeOption: 'JDKVersion'
146+
jdkVersionOption: '1.21'
147+
jdkArchitectureOption: 'x64'
124148

125-
- script: ./mvnw deploy -Psigning --no-transfer-progress -DaltDeploymentRepository=ADO::default::file://$(Build.SourcesDirectory)/target/staging-deploy
149+
- task: Maven@4
126150
displayName: Stage artifacts for ESRP
127151
condition: not(contains(variables['build.sourceBranch'], 'refs/tags/v'))
152+
inputs:
153+
mavenPomFile: 'pom.xml'
154+
goals: 'deploy'
155+
options: '-Psigning --no-transfer-progress -DaltDeploymentRepository=ADO::default::file://$(Build.SourcesDirectory)/target/staging-deploy'
156+
publishJUnitResults: false
157+
javaHomeOption: 'JDKVersion'
158+
jdkVersionOption: '1.21'
159+
jdkArchitectureOption: 'x64'
128160

129161
- pwsh: |
130162
$pomXml = [xml](Get-Content pom.xml -Raw)

0 commit comments

Comments
 (0)