-
Notifications
You must be signed in to change notification settings - Fork 601
/
azure-pipelines-ci.yml
66 lines (58 loc) · 2.25 KB
/
azure-pipelines-ci.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
pr:
- master
# The `resources` specify the location and version of the 1ES PT.
resources:
repositories:
- repository: 1esPipelines
type: git
name: 1ESPipelineTemplates/1ESPipelineTemplates
ref: refs/tags/release
extends:
# The pipeline extends the 1ES PT which will inject different SDL and compliance tasks.
# For non-production pipelines, use "Unofficial" as defined below.
# For productions pipelines, use "Official".
template: v1/1ES.Official.PipelineTemplate.yml@1esPipelines
parameters:
# Update the pool with your team's 1ES hosted pool.
pool:
name: OneESPool # Name of your hosted pool
image: HostedPoolLinuxImage # Name of the image in your pool. If not specified, first image of the pool is used
os: linux # OS of the image. This value cannot be a variable. Allowed values: windows, linux, macOS
sdl:
sourceAnalysisPool:
name: OneESPool # Name of your hosted pool
image: HostedPoolWindowsImage # Name of the image in your pool. If not specified, first image of the pool is used
os: windows # OS of the image. Allowed values: windows, linux, macOS
stages:
- stage: Stage
jobs:
- job: HostJob
# If the pipeline publishes artifacts, use `templateContext` to define the artifacts.
# This will enable 1ES PT to run SDL analysis tools on the artifacts and then upload them.
templateContext:
outputs:
- output: pipelineArtifact
targetPath: $(System.ArtifactsDirectory)
artifactName: drop
variables:
npm_config_cache: $(Pipeline.Workspace)/.npm
steps:
- checkout: self
persistCredentials: "true"
- task: UseNode@1
inputs:
version: "20.x"
displayName: "Install Node.js"
- task: Cache@2
inputs:
key: 'npm | "$(Agent.OS)" | package-lock.json'
restoreKeys: |
npm | "$(Agent.OS)"
path: $(npm_config_cache)
displayName: "Cache npm"
- script: |
npm ci
displayName: "Install package dependencies"
- script: |
npm run build
displayName: "Build workspaces"