-
Notifications
You must be signed in to change notification settings - Fork 615
Expand file tree
/
Copy pathazure-pipelines-cd.yml
More file actions
93 lines (80 loc) · 3.07 KB
/
azure-pipelines-cd.yml
File metadata and controls
93 lines (80 loc) · 3.07 KB
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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
trigger: none
pr: none
schedules:
- cron: '0 0 * * *'
displayName: Daily Release
branches:
include:
- main
# The `resources` specify the location and version of the 1ES PT.
resources:
repositories:
- repository: fastPipelines
type: git
name: open-source/FASTPipelineTemplates
ref: main
- 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
settings:
networkIsolationPolicy: Permissive
stages:
- stage: Stage
jobs:
- job: HostJob
variables:
npm_config_cache: $(Pipeline.Workspace)/.npm
steps:
- checkout: self
persistCredentials: "true"
- script: |
git config --global user.email fastsvc@microsoft.com
git config --global user.name "Microsoft FAST Builds"
git remote set-url origin https://$(GH_TOKEN)@github.com/microsoft/fast.git
- task: UseNode@1
inputs:
version: "22.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: |
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain stable
export PATH="$HOME/.cargo/bin:$PATH"
echo "##vso[task.prependpath]$HOME/.cargo/bin"
rustup target add wasm32-unknown-unknown
cargo install wasm-pack
displayName: "Install Rust and wasm-pack"
- script: |
npm run build
displayName: "Build workspaces"
- script: |
npm run publish-ci
displayName: "Use Beachball publish to bump, pack, and commit without publishing"
env:
GH_TOKEN: $(GH_TOKEN)
- template: FAST.Release.PipelineTemplate.yml@fastPipelines # Template reference