|
3 | 3 | # Add steps that publish symbols, save build artifacts, and more: |
4 | 4 | # https://docs.microsoft.com/azure/devops/pipelines/apps/windows/dot-net |
5 | 5 |
|
6 | | -pool: |
7 | | - vmImage: 'windows-latest' |
| 6 | +jobs: |
| 7 | +- job: build_and_test |
| 8 | + displayName: 'Build and test GitHub for Visual Studio and GitHub Essentials' |
8 | 9 |
|
9 | | -workspace: |
10 | | - clean: outputs |
| 10 | + pool: |
| 11 | + vmImage: 'windows-latest' |
11 | 12 |
|
12 | | -strategy: |
13 | | - maxParallel: 2 |
14 | | - matrix: |
15 | | - VSMarketplace: |
16 | | - MatrixName: 'VSMarketplace' |
17 | | - IsProductComponent: false |
18 | | - VSInstaller: |
19 | | - MatrixName: 'VSInstaller' |
20 | | - IsProductComponent: true |
| 13 | + strategy: |
| 14 | + maxParallel: 2 |
| 15 | + matrix: |
| 16 | + VSMarketplace: |
| 17 | + MatrixName: 'VSMarketplace' |
| 18 | + IsProductComponent: false |
| 19 | + VSInstaller: |
| 20 | + MatrixName: 'VSInstaller' |
| 21 | + IsProductComponent: true |
21 | 22 |
|
22 | | -variables: |
23 | | - githubvsSolution: 'GitHubVS.sln' |
24 | | - essentialsSolution: 'src\GitHub.VisualStudio.16.sln' |
25 | | - buildPlatform: 'Any CPU' |
26 | | - buildConfiguration: 'Release' |
| 23 | + variables: |
| 24 | + githubvsSolution: 'GitHubVS.sln' |
| 25 | + essentialsSolution: 'src\GitHub.VisualStudio.16.sln' |
| 26 | + buildPlatform: 'Any CPU' |
| 27 | + buildConfiguration: 'Release' |
27 | 28 |
|
28 | | -steps: |
29 | | -- checkout: self |
30 | | - submodules: true |
| 29 | + steps: |
| 30 | + - checkout: self |
| 31 | + submodules: true |
31 | 32 |
|
32 | | -# Can't use the NuGet tasks because of https://github.com/Microsoft/azure-pipelines-tasks/issues/6790 |
33 | | -#- task: NuGetToolInstaller@0 |
34 | | -#- task: NuGetCommand@2 |
35 | | -# inputs: |
36 | | -# restoreSolution: '$(solution)' |
37 | | -# feedsToUse: 'config' |
38 | | -# nugetConfigPath: nuget.config |
| 33 | + # Can't use the NuGet tasks because of https://github.com/Microsoft/azure-pipelines-tasks/issues/6790 |
| 34 | + #- task: NuGetToolInstaller@0 |
| 35 | + #- task: NuGetCommand@2 |
| 36 | + # inputs: |
| 37 | + # restoreSolution: '$(solution)' |
| 38 | + # feedsToUse: 'config' |
| 39 | + # nugetConfigPath: nuget.config |
39 | 40 |
|
40 | | -# Instead run nuget manually. |
| 41 | + # Instead run nuget manually. |
41 | 42 |
|
42 | | -- script: tools\nuget\nuget.exe restore $(githubvsSolution) |
43 | | - displayName: NuGet restore $(githubvsSolution) |
| 43 | + - script: tools\nuget\nuget.exe restore $(githubvsSolution) |
| 44 | + displayName: NuGet restore $(githubvsSolution) |
44 | 45 |
|
45 | | -- script: tools\nuget\nuget.exe restore $(essentialsSolution) |
46 | | - displayName: NuGet restore $(essentialsSolution) |
| 46 | + - script: tools\nuget\nuget.exe restore $(essentialsSolution) |
| 47 | + displayName: NuGet restore $(essentialsSolution) |
47 | 48 |
|
48 | | -# Ideally we'd run NerdBank.GitVersioning but that will come later. For now bump the |
49 | | -# version with the azure BuildId |
50 | | -- task: PowerShell@2 |
51 | | - displayName: Bump version |
52 | | - inputs: |
53 | | - targetType: filePath |
54 | | - filePath: '$(Build.SourcesDirectory)\scripts\Bump-Version.ps1' |
55 | | - arguments: -BumpBuild -BuildNumber:$(Build.BuildId) |
| 49 | + # Ideally we'd run NerdBank.GitVersioning but that will come later. For now bump the |
| 50 | + # version with the azure BuildId |
| 51 | + - task: PowerShell@2 |
| 52 | + displayName: Bump version |
| 53 | + inputs: |
| 54 | + targetType: filePath |
| 55 | + filePath: '$(Build.SourcesDirectory)\scripts\Bump-Version.ps1' |
| 56 | + arguments: -BumpBuild -BuildNumber:$(Build.BuildId) |
56 | 57 |
|
57 | | -- script: mkdir $(Build.ArtifactStagingDirectory)\$(MatrixName) |
58 | | - displayName: Create VSIX staging directory |
| 58 | + - script: mkdir $(Build.ArtifactStagingDirectory)\$(MatrixName) |
| 59 | + displayName: Create VSIX staging directory |
59 | 60 |
|
60 | | -- task: MSBuild@1 |
61 | | - displayName: GitHub for Visual Studio |
62 | | - inputs: |
63 | | - solution: $(githubvsSolution) |
64 | | - platform: '$(buildPlatform)' |
65 | | - configuration: '$(buildConfiguration)' |
66 | | - msbuildVersion: '16.0' |
67 | | - msbuildArguments: '/property:TargetVsixContainer=$(Build.ArtifactStagingDirectory)\$(MatrixName)\GitHub.VisualStudio.vsix;IsProductComponent=$(IsProductComponent);DeployExtension=False;GitHubVS_ClientId=$(GitHubVS_ClientId);GitHubVS_ClientSecret=$(GitHubVS_ClientSecret)' |
| 61 | + - task: MSBuild@1 |
| 62 | + displayName: GitHub for Visual Studio |
| 63 | + inputs: |
| 64 | + solution: $(githubvsSolution) |
| 65 | + platform: '$(buildPlatform)' |
| 66 | + configuration: '$(buildConfiguration)' |
| 67 | + msbuildVersion: '16.0' |
| 68 | + msbuildArguments: '/property:TargetVsixContainer=$(Build.ArtifactStagingDirectory)\$(MatrixName)\GitHub.VisualStudio.vsix;IsProductComponent=$(IsProductComponent);DeployExtension=False;GitHubVS_ClientId=$(GitHubVS_ClientId);GitHubVS_ClientSecret=$(GitHubVS_ClientSecret)' |
68 | 69 |
|
69 | | -- task: MSBuild@1 |
70 | | - displayName: GitHub Essentials |
71 | | - inputs: |
72 | | - solution: $(essentialsSolution) |
73 | | - platform: '$(buildPlatform)' |
74 | | - configuration: '$(buildConfiguration)' |
75 | | - msbuildVersion: '16.0' |
76 | | - msbuildArguments: '/property:TargetVsixContainer=$(Build.ArtifactStagingDirectory)\$(MatrixName)\GitHub.VisualStudio.16.vsix;IsProductComponent=$(IsProductComponent);DeployExtension=False' |
| 70 | + - task: MSBuild@1 |
| 71 | + displayName: GitHub Essentials |
| 72 | + inputs: |
| 73 | + solution: $(essentialsSolution) |
| 74 | + platform: '$(buildPlatform)' |
| 75 | + configuration: '$(buildConfiguration)' |
| 76 | + msbuildVersion: '16.0' |
| 77 | + msbuildArguments: '/property:TargetVsixContainer=$(Build.ArtifactStagingDirectory)\$(MatrixName)\GitHub.VisualStudio.16.vsix;IsProductComponent=$(IsProductComponent);DeployExtension=False' |
77 | 78 |
|
78 | | -- task: VSTest@2 |
79 | | - inputs: |
80 | | - searchFolder: '$(Build.SourcesDirectory)\test' |
81 | | - testAssemblyVer2: '**\bin\**\*Tests.dll' |
82 | | - platform: '$(buildPlatform)' |
83 | | - configuration: '$(buildConfiguration)' |
84 | | - diagnosticsEnabled: true |
85 | | - runSettingsFile: '$(Build.SourcesDirectory)\test\test.runsettings' |
| 79 | + - task: VSTest@2 |
| 80 | + inputs: |
| 81 | + searchFolder: '$(Build.SourcesDirectory)\test' |
| 82 | + testAssemblyVer2: '**\bin\**\*Tests.dll' |
| 83 | + platform: '$(buildPlatform)' |
| 84 | + configuration: '$(buildConfiguration)' |
| 85 | + diagnosticsEnabled: true |
| 86 | + runSettingsFile: '$(Build.SourcesDirectory)\test\test.runsettings' |
86 | 87 |
|
87 | | -- task: PublishBuildArtifacts@1 |
88 | | - inputs: |
89 | | - pathToPublish: $(Build.ArtifactStagingDirectory) |
90 | | - artifactName: 'vsix' |
| 88 | +- job: publish |
| 89 | + displayName: 'Publish GitHub for Visual Studio and GitHub Essentials' |
| 90 | + pool: |
| 91 | + vmImage: 'windows-latest' |
| 92 | + steps: |
| 93 | + - task: PublishBuildArtifacts@1 |
| 94 | + inputs: |
| 95 | + pathToPublish: $(Build.ArtifactStagingDirectory) |
| 96 | + artifactName: 'vsix' |
0 commit comments