Skip to content

Commit f8915b0

Browse files
committed
Move windows pipeline to separate file
1 parent 8ac7c7d commit f8915b0

File tree

2 files changed

+67
-61
lines changed

2 files changed

+67
-61
lines changed

azure-pipelines.yml

Lines changed: 2 additions & 61 deletions
Original file line numberDiff line numberDiff line change
@@ -8,64 +8,5 @@ pr:
88
- master
99
- rel/*
1010

11-
# Microsoft-hosted agent pool for Visual Studio 2019
12-
pool:
13-
vmImage: windows-2019
14-
15-
variables:
16-
BuildConfiguration: Release
17-
18-
steps:
19-
# Setup Environment Variables
20-
- task: BatchScript@1
21-
inputs:
22-
filename: "C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Enterprise\\Common7\\Tools\\VsDevCmd.bat"
23-
arguments: -no_logo
24-
modifyEnvironment: true
25-
displayName: Setup Environment Variables
26-
27-
# Install Nuget Tool Installer
28-
- task: NuGetToolInstaller@0
29-
displayName: Use NuGet 5.0.0
30-
inputs:
31-
versionSpec: 5.0.0
32-
33-
# Install NBGV Tool
34-
- task: DotNetCoreCLI@2
35-
inputs:
36-
command: custom
37-
custom: tool
38-
arguments: install --tool-path . nbgv
39-
displayName: Install NBGV tool
40-
41-
# Set cloud build variables
42-
- script: nbgv cloud
43-
displayName: Set Version
44-
45-
# Install Windows SDK 18362 (minimum compatible sdk)
46-
- powershell: .\build\Install-WindowsSdkISO.ps1 18362
47-
displayName: Insider SDK
48-
49-
# Run cake build
50-
- powershell: .\build.ps1 -target=Package
51-
displayName: Build
52-
workingDirectory: .\build
53-
54-
# Sign Nuget package
55-
- task: PowerShell@2
56-
displayName: Authenticode Sign Packages
57-
inputs:
58-
filePath: build/Sign-Package.ps1
59-
env:
60-
SignClientUser: $(SignClientUser)
61-
SignClientSecret: $(SignClientSecret)
62-
ArtifactDirectory: bin\nupkg
63-
condition: and(succeeded(), not(eq(variables['build.reason'], 'PullRequest')), not(eq(variables['SignClientSecret'], '')), not(eq(variables['SignClientUser'], '')))
64-
65-
# Publish nuget package
66-
- task: PublishBuildArtifacts@1
67-
displayName: Publish Package Artifacts
68-
inputs:
69-
pathToPublish: .\bin\nupkg
70-
artifactType: container
71-
artifactName: Packages
11+
jobs:
12+
- template: azure-windows-pipeline.yml

azure-windows-pipeline.yml

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
jobs:
2+
3+
- job: Windows
4+
5+
# Microsoft-hosted agent pool for Visual Studio 2019
6+
pool:
7+
vmImage: windows-2019
8+
9+
variables:
10+
BuildConfiguration: Release
11+
12+
steps:
13+
# Setup Environment Variables
14+
- task: BatchScript@1
15+
inputs:
16+
filename: "C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Enterprise\\Common7\\Tools\\VsDevCmd.bat"
17+
arguments: -no_logo
18+
modifyEnvironment: true
19+
displayName: Setup Environment Variables
20+
21+
# Install Nuget Tool Installer
22+
- task: NuGetToolInstaller@0
23+
displayName: Use NuGet 5.0.0
24+
inputs:
25+
versionSpec: 5.0.0
26+
27+
# Install NBGV Tool
28+
- task: DotNetCoreCLI@2
29+
inputs:
30+
command: custom
31+
custom: tool
32+
arguments: install --tool-path . nbgv
33+
displayName: Install NBGV tool
34+
35+
# Set cloud build variables
36+
- script: nbgv cloud
37+
displayName: Set Version
38+
39+
# Install Windows SDK 18362 (minimum compatible sdk)
40+
- powershell: .\build\Install-WindowsSdkISO.ps1 18362
41+
displayName: Insider SDK
42+
43+
# Run cake build
44+
- powershell: .\build.ps1 -target=Package
45+
displayName: Build
46+
workingDirectory: .\build
47+
48+
# Sign Nuget package
49+
- task: PowerShell@2
50+
displayName: Authenticode Sign Packages
51+
inputs:
52+
filePath: build/Sign-Package.ps1
53+
env:
54+
SignClientUser: $(SignClientUser)
55+
SignClientSecret: $(SignClientSecret)
56+
ArtifactDirectory: bin\nupkg
57+
condition: and(succeeded(), not(eq(variables['build.reason'], 'PullRequest')), not(eq(variables['SignClientSecret'], '')), not(eq(variables['SignClientUser'], '')))
58+
59+
# Publish nuget package
60+
- task: PublishBuildArtifacts@1
61+
displayName: Publish Package Artifacts
62+
inputs:
63+
pathToPublish: .\bin\nupkg
64+
artifactType: container
65+
artifactName: Packages

0 commit comments

Comments
 (0)