Last active
February 26, 2020 15:27
-
-
Save CedricL46/a2bce9ff5e5c45fc0a2aeaaec2ee2ee2 to your computer and use it in GitHub Desktop.
Check-out the full tutorial here : https://cedricleruth.com/how-to-create-a-ci-cd-pipeline-for-java-on-azure-devops/
This file contains 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 package Java | |
# Build your Java project | |
# Add steps that analyze code, save build artifacts, deploy, and more: | |
# https://docs.microsoft.com/azure/devops/pipelines/languages/java | |
trigger: | |
- master | |
variables: | |
# Agent VM image name | |
vmImageName: 'ubuntu-latest' | |
stages: | |
- stage: Build | |
displayName: Build stage | |
jobs: | |
- job: MavenPackageAndPublishArtifacts | |
displayName: Maven Package and Publish Artifacts | |
pool: | |
vmImage: $(vmImageName) | |
steps: | |
- task: Maven@3 | |
displayName: 'Maven Package' | |
inputs: | |
mavenPomFile: 'pom.xml' | |
- task: CopyFiles@2 | |
displayName: 'Copy Files to artifact staging directory' | |
inputs: | |
SourceFolder: '$(System.DefaultWorkingDirectory)' | |
Contents: '**/target/*.?(war|jar)' | |
TargetFolder: $(Build.ArtifactStagingDirectory) | |
- upload: $(Build.ArtifactStagingDirectory) | |
artifact: drop | |
- Save and run |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment