forked from microsoft/azure-pipelines-task-lib
-
Notifications
You must be signed in to change notification settings - Fork 0
/
azure-pipelines.yml
97 lines (82 loc) · 2.6 KB
/
azure-pipelines.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
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
94
95
96
97
trigger:
- master
- features/*
- releases/*
variables:
nodeVersion: 10.23.0
jobs:
#################################################
- job: windows
#################################################
displayName: windows
pool:
vmImage: windows-2019
steps:
################################################################################
# azure-pipelines-task-lib
################################################################################
- template: azure-pipelines-steps-node.yml
parameters:
nodeVersion: $(nodeVersion)
# test
- script: |
chcp 437
node make.js test
workingDirectory: node
displayName: (azure-pipelines-task-lib) node make.js test
# build
- script: |
chcp 437
node make.js build
displayName: (azure-pipelines-task-lib) node make.js build
workingDirectory: node
################################################################################
# VstsTaskSdk
################################################################################
# npm install
- task: Npm@1
displayName: (VstsTaskSdk) npm install
inputs:
command: install
workingDir: powershell
# npm test
- script: npm test
displayName: (VstsTaskSdk) npm test
workingDirectory: powershell
#################################################
- job: linux
#################################################
displayName: Linux
pool:
vmImage: ubuntu-18.04
steps:
- template: azure-pipelines-steps-node.yml
parameters:
nodeVersion: $(nodeVersion)
- template: azure-pipelines-steps-test-build.yml
- task: PublishPipelineArtifact@1
inputs:
targetPath: 'node/_build'
artifactType: 'pipeline'
artifactName: 'npm-package'
# For CI runs on master, automatically publish packages
- bash: |
echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" > .npmrc
cd _build
npm publish || true # Ignore publish failures, usually will happen because package already exists
displayName: (azure-pipelines-task-lib) npm publish
workingDirectory: node
condition: and(succeeded(), in(variables['build.reason'], 'IndividualCI', 'BatchedCI', 'Manual'), in(variables['build.sourcebranchname'], 'master', 'releases/3.x'))
env:
NPM_TOKEN: $(npmPublishToken)
#################################################
- job: macOS
#################################################
displayName: macOS
pool:
vmImage: macOS-10.15
steps:
- template: azure-pipelines-steps-node.yml
parameters:
nodeVersion: $(nodeVersion)
- template: azure-pipelines-steps-test-build.yml