Skip to content

Instantly share code, notes, and snippets.

@emoran
Created September 19, 2020 12:19
Show Gist options
  • Save emoran/ee0ce97a18bae7115ea18d8e648a176b to your computer and use it in GitHub Desktop.
Save emoran/ee0ce97a18bae7115ea18d8e648a176b to your computer and use it in GitHub Desktop.
# Maven
# Aurthor: Edgar Moran
# 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
trigger:
- test
- emoran
pool:
vmImage: 'ubuntu-latest'
steps:
- task: Maven@3
condition: and(succeeded(), eq(variables['Build.SourceBranch'], 'refs/heads/test'))
inputs:
mavenPomFile: '$(system.defaultWorkingDirectory)/pom.xml'
mavenOptions: '-Xmx3072m'
javaHomeOption: 'JDKVersion'
jdkVersionOption: '1.8'
jdkArchitectureOption: 'x64'
publishJUnitResults: true
testResultsFiles: '**/surefire-reports/TEST-*.xml'
goals: 'clean deploy -Danypoint.username=$(ANYPOINT_USERNAME) -Danypoint.password=$(ANYPOINT_PASSWORD) -Denv=test -Dazure.password=$(AZURE_TOKEN) -Dnexus.username=$(NEXUS_UERNAME) -Dnexus.password=$(NEXUS_PASSWORD) -s settings.xml -e'
- task: Maven@3
inputs:
mavenPomFile: '$(system.defaultWorkingDirectory)/pom.xml'
mavenOptions: '-Xmx3072m'
javaHomeOption: 'JDKVersion'
jdkVersionOption: '1.8'
jdkArchitectureOption: 'x64'
publishJUnitResults: true
testResultsFiles: '**/surefire-reports/TEST-*.xml'
goals: 'clean install -Dazure.password=$(AZURE_TOKEN) -Dnexus.username=$(NEXUS_UERNAME) -Dnexus.password=$(NEXUS_PASSWORD) -s settings.xml -e'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment