-
Notifications
You must be signed in to change notification settings - Fork 42
/
azure-pipelines.yaml
100 lines (83 loc) · 3.22 KB
/
azure-pipelines.yaml
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
# ASP.NET Core
# Build and test ASP.NET Core projects targeting .NET Core.
# Add steps that run tests, create a NuGet package, deploy, and more:
# https://docs.microsoft.com/azure/devops/pipelines/languages/dotnet-core
trigger:
- master
jobs:
- job: compile_on_windows
pool:
vmImage: 'windows-latest'
variables:
buildConfiguration: 'Release'
steps:
- task: GitVersion@5
displayName: 'Generate a version number using GitVersion'
inputs:
updateAssemblyInfo: true
configFilePath: gitversion.yml
- task: NuGetToolInstaller@1
displayName: 'Use NuGet 4.4.1'
inputs:
versionSpec: 4.4.1
checkLatest: true
- task: MSBuild@1
displayName: 'Build dotnet core application using MSBuild on Windows'
inputs:
msbuildLocationMethod: version
msbuildVersion: latest
msbuildArchitecture: x86
msbuildArguments: /r /p:Configuration=$(buildConfiguration) /p:OutputPath=app /p:Version=$(GitVersion.InformationalVersion) /p:AssemblyVersion=$(GitVersion.AssemblySemVer) /p:FileVersion=$(GitVersion.MajorMinorPatch) /t:Publish /detailedsummary /m:16 /bl:$(build.artifactstagingdirectory)\build.binlog
clean: false
maximumCpuCount: true
restoreNugetPackages: false
logProjectEvents: false
createLogFile: false
- task: CopyFiles@2
displayName: 'Copy compiled file into artifacts'
inputs:
SourceFolder: 'Zigbee2MqttAssistant/apppublish'
Contents: '**'
TargetFolder: '$(Build.ArtifactStagingDirectory)/app'
- task: CmdLine@2
displayName: 'Create a script file to restore version number on during release management'
inputs:
script: |
echo ##vso[task.setvariable variable=GitVersion.SemVer]$(GitVersion.SemVer)>> "$(Build.ArtifactStagingDirectory)/restore-version.txt"
- task: PublishBuildArtifacts@1
condition: always()
inputs:
PathtoPublish: '$(Build.ArtifactStagingDirectory)'
ArtifactName: 'Application'
ArtifactType: Container
# List of microsoft dotnet core images: https://hub.docker.com/_/microsoft-dotnet-core-runtime/ (for "imageTag")
- template: azure-pipelines.buildimage.yaml
parameters:
target: linux-x64
vmImage: 'ubuntu-latest'
imageTag: '3.1-alpine'
osTag: 'amd64'
- template: azure-pipelines.buildimage.yaml
parameters:
target: linux-arm32
vmImage: 'ubuntu-latest'
imageTag: '3.1-buster-slim-arm32v7'
osTag: 'armv7'
- template: azure-pipelines.buildimage.yaml
parameters:
target: linux-arm64
vmImage: 'ubuntu-latest'
imageTag: '3.1-alpine-arm64v8'
osTag: 'aarch64'
- template: azure-pipelines.buildimage.yaml
parameters:
target: win-64
vmImage: 'windows-2019' # https://docs.microsoft.com/en-us/azure/devops/pipelines/agents/hosted?view=azure-devops
imageTag: '3.1-nanoserver-1809'
osTag: 'win64'
- template: azure-pipelines.buildimage.yaml
parameters:
target: win-arm32
vmImage: 'windows-2019' # https://docs.microsoft.com/en-us/azure/devops/pipelines/agents/hosted?view=azure-devops
imageTag: '3.1-nanoserver-1809-arm32v7'
osTag: 'winarm32'