mirror of
https://github.com/spring-projects/spring-petclinic.git
synced 2025-07-23 15:55:49 +00:00
Update azure-pipelines.yml for Azure Pipelines
This commit is contained in:
parent
06899e5770
commit
1b00148081
1 changed files with 25 additions and 34 deletions
|
@ -16,45 +16,36 @@ jobs:
|
||||||
- job: BuildTest
|
- job: BuildTest
|
||||||
displayName: Build and Test Maven Project
|
displayName: Build and Test Maven Project
|
||||||
steps:
|
steps:
|
||||||
# - task: Maven@3
|
- task: Maven@3
|
||||||
# displayName: 'Maven Package'
|
displayName: 'Maven Package'
|
||||||
# inputs:
|
inputs:
|
||||||
# mavenPomFile: 'pom.xml'
|
mavenPomFile: 'pom.xml'
|
||||||
# mavenOptions: '-Xmx3072m'
|
mavenOptions: '-Xmx3072m'
|
||||||
# javaHomeOption: 'JDKVersion'
|
javaHomeOption: 'JDKVersion'
|
||||||
# jdkVersionOption: '1.11'
|
jdkVersionOption: '1.11'
|
||||||
# jdkArchitectureOption: 'x64'
|
jdkArchitectureOption: 'x64'
|
||||||
# publishJUnitResults: true
|
publishJUnitResults: true
|
||||||
# testRunTitle: '$(Build.BuildNumber)'
|
testRunTitle: '$(Build.BuildNumber)'
|
||||||
# testResultsFiles: '**/TEST-*.xml'
|
testResultsFiles: '**/TEST-*.xml'
|
||||||
# goals: 'package'
|
goals: 'package'
|
||||||
|
|
||||||
#- task: CopyFiles@2
|
- task: CopyFiles@2
|
||||||
# displayName: 'Copy Files to artifact staging directory'
|
displayName: 'Copy Files to artifact staging directory'
|
||||||
# inputs:
|
inputs:
|
||||||
# SourceFolder: '$(System.DefaultWorkingDirectory)'
|
SourceFolder: '$(System.DefaultWorkingDirectory)'
|
||||||
# Contents: '**/target/*.?(war|jar)'
|
Contents: '**/target/*.?(war|jar)'
|
||||||
# TargetFolder: $(Build.ArtifactStagingDirectory)
|
TargetFolder: $(Build.ArtifactStagingDirectory)
|
||||||
# preserveTimestamp: true
|
preserveTimestamp: true
|
||||||
|
|
||||||
# Publish build artifacts to Azure Pipelines. Extension uses Robocopy "under the hood."
|
# Publish build artifacts to Azure Pipelines. Extension uses Robocopy "under the hood."
|
||||||
# https://docs.microsoft.com/en-us/azure/devops/pipelines/tasks/utility/publish-build-artifacts?view=azure-devops
|
# https://docs.microsoft.com/en-us/azure/devops/pipelines/tasks/utility/publish-build-artifacts?view=azure-devops
|
||||||
#- task: PublishBuildArtifacts@1
|
- task: PublishBuildArtifacts@1
|
||||||
# inputs:
|
|
||||||
# pathToPublish: '$(Build.DefaultWorkingDirectory)/target'
|
|
||||||
# artifactName: 'jar-artifact'
|
|
||||||
# publishLocation: 'Container' # Publishes inside Azure Pipelines artifact folder.
|
|
||||||
# parallel: true # Increased speed through multi-threaded copying.
|
|
||||||
# parallelCount: 8 # Dependent upon CPU capabilities.
|
|
||||||
|
|
||||||
# Enable this task for testing purposes, to reduce times by not building the code each pipeline run.
|
|
||||||
- task: DownloadPipelineArtifact@2
|
|
||||||
inputs:
|
inputs:
|
||||||
source: 'specific'
|
pathToPublish: '$(Build.DefaultWorkingDirectory)/target'
|
||||||
project: 'DevOps-CA-pipeline'
|
artifactName: 'jar-artifact'
|
||||||
pipeline: 16
|
publishLocation: 'Container' # Publishes inside Azure Pipelines artifact folder.
|
||||||
path: '$(System.DefaultWorkingDirectory)/target/spring-petclinic-2.4.2.jar'
|
parallel: true # Increased speed through multi-threaded copying.
|
||||||
runVersion: 'latest'
|
parallelCount: 8 # Dependent upon CPU capabilities.
|
||||||
|
|
||||||
- task: AzureWebApp@1
|
- task: AzureWebApp@1
|
||||||
displayName: Deploy spring-petclinic to Azure Web Apps service
|
displayName: Deploy spring-petclinic to Azure Web Apps service
|
||||||
|
|
Loading…
Reference in a new issue