-
Notifications
You must be signed in to change notification settings - Fork 3
/
azure-pipelines.yml
78 lines (66 loc) · 2.81 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
# .NET Desktop
# Build and run tests for .NET Desktop or Windows classic desktop solutions.
# Add steps that publish symbols, save build artifacts, and more:
# https://docs.microsoft.com/vsts/pipelines/apps/windows/dot-net
name: $(increment)
pool:
vmImage: 'windows-latest'
variables:
solution: '**/*.sln'
buildPlatform: 'Any CPU'
buildConfiguration: 'Release'
buildMajor: '$(Major)'
buildMinor: '$(Minor)'
buildRevision: '$(Revision)'
increment: $[counter(1,0)]
buildTimestamp: $((Get-Date).ToUniversalTime())
steps:
- task: NuGetToolInstaller@0
- task: NuGetCommand@2
inputs:
feedsToUse: 'select'
vstsFeed: 'AzureFeed_Projects'
restoreSolution: '$(solution)'
- task: PowerShell@2
displayName: Add Copyright, Buildnumber and build time to PowerShell files
inputs:
filePath: 'AzureDevops_AddCopyRight.ps1'
arguments: '-Major $(buildMajor) -Minor $(buildMinor) -Build $(Build.BuildNumber) -Revision $(buildRevision) -Timestamp $(buildTimestamp) -HashCodeFile $(Build.ArtifactStagingDirectory)'
- task: VSBuild@1
displayName: Build powerGateServer Plugin and installers (MSI)
inputs:
solution: '$(solution)'
platform: '$(buildPlatform)'
configuration: '$(buildConfiguration)'
msbuildArgs: '/property:Major=$(buildMajor);Minor=$(buildMinor);Build=$(Build.BuildNumber);Revision=$(buildRevision);RunWixToolsOutofProc=true;VersionAssembly=$(buildMajor).$(buildMinor).$(buildRevision).$(Build.BuildNumber)'
- task: CopyFiles@2
displayName: Copy installers (MSI) to ArtifactStagingDirectory
inputs:
sourceFolder: '$(Build.SourcesDirectory)'
contents: 'Installer\bin\**\en-us\*.msi'
targetFolder: '$(Build.ArtifactStagingDirectory)\Setups'
cleanTargetFolder: true
overWrite: true
flattenFolders: true
- task: PublishBuildArtifacts@1
displayName: Publish installers (MSI) as artifacts
inputs:
pathtoPublish: '$(Build.ArtifactStagingDirectory)\Setups'
artifactName: 'Setups_$(Build.DefinitionName)_v$(buildMajor).$(buildMinor).$(buildRevision).$(Build.BuildNumber)'
- task: CopyFiles@2
displayName: Copy powerEvents files to ArtifactStagingDirectory
inputs:
sourceFolder: '$(Build.SourcesDirectory)\Files\Client Customizations\'
contents: '**'
targetFolder: '$(Build.ArtifactStagingDirectory)\Source\Client Customizations'
- task: CopyFiles@2
displayName: Copy powerJobs files to ArtifactStagingDirectory
inputs:
sourceFolder: '$(Build.SourcesDirectory)\Files\powerJobs\'
contents: '**'
targetFolder: '$(Build.ArtifactStagingDirectory)\Source\powerJobs'
- task: PublishBuildArtifacts@1
displayName: Publish all source files as artifacts
inputs:
pathtoPublish: '$(Build.ArtifactStagingDirectory)\Source'
artifactName: 'SourceFiles_$(Build.DefinitionName)_v$(buildMajor).$(buildMinor).$(buildRevision).$(Build.BuildNumber)'