Update azure-pipelines.yml for Azure Pipelines

This commit is contained in:
James Flynn 2021-03-01 19:55:57 +00:00
parent dc893d663d
commit 06899e5770

View file

@ -16,18 +16,18 @@ 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'
@ -47,7 +47,19 @@ jobs:
# parallel: true # Increased speed through multi-threaded copying. # parallel: true # Increased speed through multi-threaded copying.
# parallelCount: 8 # Dependent upon CPU capabilities. # 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:
source: 'specific'
project: 'DevOps-CA-pipeline'
pipeline: 16
path: '$(System.DefaultWorkingDirectory)/target/spring-petclinic-2.4.2.jar'
runVersion: 'latest'
- task: AzureWebApp@1 - task: AzureWebApp@1
displayName: Deploy spring-petclinic to Azure Web Apps service
# Only deploy from main branch (for release purposes)
# condition: and(succeeded(), eq(variables['Build.SourceBranch'], 'refs/heads/main'))
inputs: inputs:
azureSubscription: 'azure-svc-connection' azureSubscription: 'azure-svc-connection'
appType: webAppLinux appType: webAppLinux