Skip to content
This repository was archived by the owner on Jan 6, 2025. It is now read-only.

Commit f964d28

Browse files
author
Mark McLaughlin
authored
Microsoft security and compliance tasks (#301)
Description of changes Updated Azure Pipelines tasks that split build and compliance steps into stages, with specific jobs that meet Microsoft internal security requirements.
1 parent 856e69e commit f964d28

File tree

1 file changed

+104
-32
lines changed

1 file changed

+104
-32
lines changed

azure-pipelines.yml

Lines changed: 104 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,108 @@
1-
trigger:
2-
- main
1+
pr:
2+
branches:
3+
include:
4+
- main
35

4-
jobs:
5-
- job: Compliance
6+
stages:
7+
- stage: security_compliance
8+
displayName: 'Security & Compliance'
69
pool:
710
vmImage: 'windows-latest'
8-
steps:
9-
- task: PoliCheck@1
10-
displayName: '🌎 PoliCheck'
11-
inputs:
12-
inputType: 'Basic'
13-
targetType: 'F'
14-
targetArgument: '$(Build.SourcesDirectory)'
15-
result: 'PoliCheck.xml'
16-
optionsXS: 1 # Scan subfolders
17-
optionsPE: 1 # Enable exclusions
18-
optionsUEPATH: '$(Build.SourcesDirectory)/policheck/UserExclusion.xml'
19-
- task: PublishBuildArtifacts@1
20-
displayName: 'Create log artifact'
21-
inputs:
22-
pathToPublish: '..\_sdt\logs\PoliCheck\PoliCheck.xml'
23-
artifactName: 'PoliCheck'
24-
25-
- job: Security
11+
jobs:
12+
- job: compliance
13+
steps:
14+
- task: PoliCheck@1
15+
displayName: 'Run PoliCheck 🌎'
16+
inputs:
17+
inputType: 'Basic'
18+
targetType: 'F'
19+
targetArgument: '$(Build.SourcesDirectory)'
20+
result: 'PoliCheck.xml'
21+
optionsXS: 1
22+
optionsPE: 1
23+
optionsUEPATH: '$(Build.SourcesDirectory)/policheck/UserExclusion.xml'
24+
- task: PublishBuildArtifacts@1
25+
displayName: 'Create log artifact'
26+
inputs:
27+
pathToPublish: '..\_sdt\logs\PoliCheck\PoliCheck.xml'
28+
artifactName: 'PoliCheck'
29+
30+
- job: security
31+
steps:
32+
- task: ESLint@1
33+
displayName: 'Guardian: ESLint 🛡'
34+
inputs:
35+
Configuration: 'recommended'
36+
TargetType: 'eslint'
37+
TargetsESLint: |
38+
$(Build.SourcesDirectory)/**/*.ts
39+
ErrorLevel: 'warn'
40+
41+
- stage: build_test
42+
displayName: 'Build & Test'
2643
pool:
27-
vmImage: 'windows-latest'
28-
steps:
29-
- task: ESLint@1
30-
displayName: '🛡 Guardian: ESLint'
31-
inputs:
32-
Configuration: 'recommended'
33-
TargetType: 'eslint'
34-
TargetsESLint: |
35-
$(Build.SourcesDirectory)/**/*.js
36-
ErrorLevel: 'warn'
44+
vmImage: 'ubuntu-latest'
45+
46+
jobs:
47+
- job: test
48+
timeoutInMinutes: 10
49+
50+
steps:
51+
- task: NodeTool@0
52+
displayName: 'Setup Node 💾'
53+
inputs:
54+
versionSpec: '14.x'
55+
56+
- script: npm install
57+
displayName: 'Install Dependencies 📥'
58+
59+
- script: npm run test
60+
displayName: 'Run Tests 🧪'
61+
62+
- job: lint
63+
timeoutInMinutes: 10
64+
65+
steps:
66+
- task: NodeTool@0
67+
displayName: 'Setup Node 💾'
68+
inputs:
69+
versionSpec: '14.x'
70+
71+
- script: npm install
72+
displayName: 'Install Dependencies 📥'
73+
74+
- script: npm run lint
75+
displayName: 'Run Lint Check 🔍'
76+
77+
- script: npm run fmt
78+
displayName: 'Run Format Check 🌸'
79+
80+
- job: build
81+
timeoutInMinutes: 10
82+
83+
steps:
84+
- task: NodeTool@0
85+
displayName: 'Setup Node 💾'
86+
inputs:
87+
versionSpec: '14.x'
88+
89+
- script: npm install
90+
displayName: 'Install Dependencies 📥'
91+
92+
- script: npm run build
93+
displayName: 'Build Toolkit 🏗'
94+
95+
- job: docs
96+
timeoutInMinutes: 10
97+
98+
steps:
99+
- task: NodeTool@0
100+
displayName: 'Setup Node 💾'
101+
inputs:
102+
versionSpec: '14.x'
103+
104+
- script: npm install
105+
displayName: 'Install Dependencies 📥'
106+
107+
- script: npm run build:docs
108+
displayName: 'Build Docs 🏗'

0 commit comments

Comments
 (0)