mirror of
https://github.com/spring-projects/spring-petclinic.git
synced 2025-07-23 07:45:49 +00:00
Added: CI and CD stages
This commit is contained in:
parent
817287ce04
commit
5ef90348d4
1 changed files with 91 additions and 80 deletions
|
@ -21,11 +21,14 @@ variables:
|
|||
# see: https://docs.microsoft.com/en-us/azure/devops/pipelines/process/run-number?view=azure-devops&tabs=yaml
|
||||
name: $(Build.DefinitionName).$(SourceBranchName).$(Date:yyyyMMdd)$(Rev:.r)
|
||||
|
||||
stages:
|
||||
- stage: CI
|
||||
displayName: 'Continuous Integration'
|
||||
dependsOn: []
|
||||
jobs:
|
||||
- job: BuildTestDeploy
|
||||
displayName: Build Test and Deploy spring-petclinic Java Web App
|
||||
steps:
|
||||
- script: echo $(SonarExtraProperties)
|
||||
|
||||
# Azure DevOps extension for configuring SonarCloud properties
|
||||
# see: https://marketplace.visualstudio.com/items?itemName=SonarSource.sonarcloud
|
||||
|
@ -39,7 +42,7 @@ jobs:
|
|||
scannerMode: 'Other'
|
||||
ProjectKey: 'james-flynn-ie_spring-petclinic'
|
||||
ProjectName: 'spring-petclinic'
|
||||
extraProperties: $(SonarExtraProperties)
|
||||
extraProperties: '$(SonarExtraProperties)'
|
||||
|
||||
# https://docs.microsoft.com/en-us/azure/devops/pipelines/tasks/build/maven?view=azure-devops
|
||||
- task: Maven@3
|
||||
|
@ -88,6 +91,14 @@ jobs:
|
|||
parallel: true # Increased speed through multi-threaded copying.
|
||||
parallelCount: 8 # Dependent upon CPU capabilities.
|
||||
|
||||
- stage: CI
|
||||
displayName: 'Continuous Deployment'
|
||||
dependsOn: [CI]
|
||||
condition: and(succeeded(), eq(variables['Build.SourceBranch'], 'refs/heads/main'))
|
||||
jobs:
|
||||
- job: DeployWebApp
|
||||
displayName: Build Test and Deploy spring-petclinic Java Web App
|
||||
steps:
|
||||
# Deploy JAR into Azure Web App Service https://docs.microsoft.com/en-us/azure/app-service/overview
|
||||
# Azure App Service offers a Web application hosting Platform-as-a-Service, offering:
|
||||
# - Security
|
||||
|
|
Loading…
Reference in a new issue