-
Notifications
You must be signed in to change notification settings - Fork 2
/
azure-pipelines.yml
108 lines (91 loc) · 2.8 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
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
trigger:
batch: true
branches:
include:
- main
pr:
branches:
include:
- main
schedules:
- cron: '0 0 * * 0'
displayName: Weekly build
branches:
include:
- main
always: true
resources:
repositories:
- repository: OpsGuildAutomationRepo
type: git
name: DevOps/opsguild.automation
ref: refs/heads/main
- repository: OpsGuildPipelineTools
type: git
name: Devops/opsguild.pipeline-tools
ref: refs/heads/main
- repository: templates
type: github
name: AVEVA/AVEVA-Samples
endpoint: AVEVA
variables:
- name: analysisProject
value: PI_AFSDKCustomCalcTimer_DotNet
parameters:
- name: pool
default: DevOps Managed Containers Build
- name: containerDemands
type: object
default: ['Agent.OS -equals Windows_NT']
jobs:
- job: Tests
condition: ne(variables['Build.Reason'], 'Schedule')
pool:
name: ${{ parameters.pool }}
demands: ${{ parameters.containerDemands }}
variables:
- name: AFDatabaseName
value: $(AFDatabaseName1)
steps:
- checkout: self
- checkout: OpsGuildPipelineTools
- template: '/miscellaneous/build_templates/appsettings.yml@templates'
parameters:
secrets: 'AFServerName, AFDatabaseName1, Username, Password'
- template: '/Templates/Utilities/InstallAFSDK.step.v0.yml@OpsGuildPipelineTools'
- task: NuGetCommand@2
displayName: 'nuget restore'
inputs:
command: 'restore'
restoreSolution: '**/*.sln'
- task: VSBuild@1
displayName: 'Build solution'
inputs:
vsVersion: 16.0
- task: DotNetCoreCLI@2
displayName: 'Run tests'
inputs:
command: test
publishTestResults: true
testRunTitle: '$(Agent.JobName) on $(Agent.OS)'
projects: '$(Build.SourcesDirectory)\sample-afsdk-timer_triggered_calculation-dotnet\TimerTriggeredCalc.sln'
- template: '/miscellaneous/build_templates/code-analysis.yml@templates'
parameters:
projectPath: '\sample-afsdk-timer_triggered_calculation-dotnet'
buildSteps:
- checkout: self
- checkout: OpsGuildPipelineTools
- template: '/Templates/Utilities/InstallAFSDK.step.v0.yml@OpsGuildPipelineTools'
- template: '/miscellaneous/build_templates/appsettings.yml@templates'
- task: NuGetCommand@2
displayName: 'nuget restore'
inputs:
command: 'restore'
restoreSolution: '**/*.sln'
- task: VSBuild@1
displayName: 'Build solution'
inputs:
vsVersion: 16.0
- template: '/miscellaneous/build_templates/binskim.yml@templates'
parameters:
deleteBinSkim: 'AFSDKInstallKit/*'