Skip to content

Commit 09d659a

Browse files
committed
Creating a PR pipeline for Azure pipelines.
1 parent d2ecb56 commit 09d659a

File tree

1 file changed

+84
-0
lines changed

1 file changed

+84
-0
lines changed
Lines changed: 84 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
1+
parameters:
2+
- name: buildConfigs
3+
type: object
4+
default:
5+
- pool:
6+
name: Azure-Pipelines-1ESPT-ExDShared
7+
image: windows-latest
8+
os: windows
9+
- pool:
10+
name: Azure-Pipelines-1ESPT-ExDShared
11+
image: ubuntu-latest
12+
os: linux
13+
- pool:
14+
name: Azure Pipelines
15+
image: macOS-latest
16+
os: macOS
17+
18+
trigger: none
19+
20+
resources:
21+
repositories:
22+
- repository: OfficePipelineTemplates
23+
type: git
24+
name: 1ESPipelineTemplates/OfficePipelineTemplates
25+
ref: refs/tags/release
26+
27+
extends:
28+
template: v1/Office.Unofficial.PipelineTemplate.yml@OfficePipelineTemplates
29+
parameters:
30+
pool:
31+
name: Azure-Pipelines-1ESPT-ExDShared
32+
image: ubuntu-latest
33+
os: linux
34+
sdl:
35+
sourceAnalysisPool:
36+
name: Azure-Pipelines-1ESPT-ExDShared
37+
image: windows-latest
38+
os: windows
39+
# This prevents auto-injected Roslyn task from running the build again.
40+
roslyn:
41+
copyLogsOnly: true
42+
stages:
43+
- stage: build
44+
displayName: Build
45+
jobs:
46+
- ${{ each config in parameters.buildConfigs }}:
47+
- job: build_${{ replace(config.runtime,'-', '_') }}
48+
displayName: Building for ${{ config.runtime }} on ${{ config.pool.name }}
49+
pool:
50+
name: ${{ config.pool.name }}
51+
image: ${{ config.pool.image }}
52+
os: ${{ config.pool.os }}
53+
templateContext:
54+
outputs:
55+
- output: pipelineArtifact
56+
targetPath: dist/${{ config.runtime }}
57+
artifactName: azureauth-${{ parameters.version }}-${{ config.runtime }}
58+
steps:
59+
- checkout: self
60+
- task: UseDotNet@2
61+
displayName: Use .NET Core sdk 8.x
62+
inputs:
63+
version: 8.x
64+
- task: DotNetCoreCLI@2
65+
displayName: Install dependencies
66+
inputs:
67+
command: restore
68+
feedsToUse: select
69+
vstsFeed: $(VSTS_FEED_ID)
70+
includeNuGetOrg: false
71+
# 1ES PT requires explicit build task for Roslyn analysis. Auto-injected Roslyn task will use build logs from this build.
72+
- task: DotNetCoreCLI@2
73+
displayName: Build projects
74+
env:
75+
ADO_TOKEN: $(System.AccessToken)
76+
inputs:
77+
command: 'build'
78+
arguments: --no-restore
79+
projects: '**/*.csproj'
80+
- task: DotNetCoreCLI@2
81+
displayName: Test
82+
inputs:
83+
command: test
84+
arguments: --no-restore --no-build --verbosity normal

0 commit comments

Comments
 (0)