This repository has been archived by the owner on Nov 21, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 11
/
azure-pipelines.yml
90 lines (87 loc) · 2.95 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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
# ASP.NET Core (.NET Framework)
# Build and test ASP.NET Core projects targeting the full .NET Framework.
# Add steps that publish symbols, save build artifacts, and more:
# https://docs.microsoft.com/azure/devops/pipelines/languages/dotnet-core
trigger:
- master
- dev
variables:
solution: '**/*.sln'
buildPlatform: 'Any CPU'
buildConfiguration: 'Release'
sourceDir: 'src/Steeltoe.Initializr.WebApp'
templateDir: 'src/templates'
stages:
- stage: Initializr_Website
jobs:
- job: BuildTestAndPublishJob
displayName: Build Test and Publish to PWS
pool:
vmImage: 'ubuntu-16.04'
steps:
- task: UseDotNet@2
inputs:
packageType: 'sdk'
useGlobalJson: false
version: 2.2.101
- task: UseDotNet@2
inputs:
packageType: 'sdk'
useGlobalJson: true
- task: DotNetCoreCLI@2
displayName: Dotnet build
inputs:
command: 'build'
- task: DotNetCoreCLI@2
displayName: Dotnet test (Unit Tests)
inputs:
command: 'test'
arguments: '--filter Category!=Integration'
testRunTitle: 'Unit Tests'
- task: DotNetCoreCLI@2
displayName: Dotnet test (Integration Tests)
inputs:
command: 'test'
arguments: '--filter Category=Integration'
testRunTitle: 'Integration Tests'
- task: DotNetCoreCLI@2
displayName: Dotnet publish
inputs:
command: 'publish'
publishWebProjects: false
arguments: '-f netcoreapp2.2 -r ubuntu.14.04-x64'
zipAfterPublish: false
modifyOutputPath: false
workingDirectory: $(sourceDir)
- task: CloudFoundryCLIInstall@0
displayName: Install CF Cli
inputs:
cfVersion: '6.43.0'
- task: CloudFoundry@1
displayName: publish to Prod
condition: and(succeeded(), eq(variables['Build.SourceBranch'], 'refs/heads/master'))
inputs:
cfEndpoint: 'PWS-initializr'
skipSSLValidation: true
org: 'steeltoe.io'
space: 'steeltoe.io'
deploymentOptions: 'manifest'
cfManifest: '$(sourceDir)/manifest.yml'
additionalDeployArgs: '-p bin/Debug/netcoreapp2.2/ubuntu.14.04-x64/publish'
createServices: false
bindServices: false
workingDirectory: $(sourceDir)
- task: CloudFoundry@1
displayName: publish to Staging
condition: and(succeeded(), eq(variables['Build.SourceBranch'], 'refs/heads/dev'))
inputs:
cfEndpoint: 'PWS-initializr'
skipSSLValidation: true
org: 'steeltoe.io'
space: 'development'
deploymentOptions: 'manifest'
cfManifest: '$(sourceDir)/manifest-dev.yml'
additionalDeployArgs: '-p bin/Debug/netcoreapp2.2/ubuntu.14.04-x64/publish'
createServices: false
bindServices: false
workingDirectory: '$(sourceDir)'