Created
October 26, 2020 12:23
-
-
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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