Skip to content

Instantly share code, notes, and snippets.

@j-tim
Created October 26, 2020 12:23
Show Gist options
  • Save j-tim/7d61e3389bfff3f296c07de5071454df to your computer and use it in GitHub Desktop.
Save j-tim/7d61e3389bfff3f296c07de5071454df to your computer and use it in GitHub Desktop.
Azure Pipelines example to build OCI (Docker) image using the Spring Boot Maven plugin
# 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
trigger:
- master
pool:
vmImage: 'ubuntu-latest'
steps:
- task: Maven@3
inputs:
mavenPomFile: 'pom.xml'
mavenOptions: '-Xmx3072m'
javaHomeOption: 'JDKVersion'
jdkVersionOption: '1.11'
jdkArchitectureOption: 'x64'
publishJUnitResults: true
testResultsFiles: '**/surefire-reports/TEST-*.xml'
goals: 'package'
- task: Maven@3
displayName: Build Docker image
inputs:
mavenPomFile: 'pom.xml'
goals: 'spring-boot:build-image'
publishJUnitResults: false
jdkVersionOption: '1.11'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment