-
Notifications
You must be signed in to change notification settings - Fork 1
/
_azure-pipelines.yml
63 lines (55 loc) · 1.76 KB
/
_azure-pipelines.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
# Starter pipeline
# Start with a minimal pipeline that you can customize to build and deploy your code.
# Add steps that build, run tests, deploy, and more:
# https://aka.ms/yaml
trigger:
- main
variables:
# Environment name
environmentName: 'ansalemo-sb-test'
# 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
- stage: Deploy
displayName: Deploy stage
dependsOn: Build
condition: succeeded()
jobs:
- deployment: DeployLinuxWebApp
displayName: Deploy Linux Web App
environment: $(environmentName)
pool:
vmImage: $(vmImageName)
strategy:
runOnce:
deploy:
steps:
- task: AzureSpringCloud@0
inputs:
azureSubscription: 'Ansalemo(4388fa06-bf66-4497-82c2-991ba75ecb97)'
Action: 'Deploy'
AzureSpringCloud: '/subscriptions/4388fa06-bf66-4497-82c2-991ba75ecb97/resourceGroups/ansalemo-rg/providers/Microsoft.AppPlatform/Spring/ansalemo-springboot'
AppName: 'ansalemo-sb-test'
UseStagingDeployment: false
DeploymentName: 'default'
Package: '$(Pipeline.Workspace)/drop/**/target/*.?(war|jar)'