-
Notifications
You must be signed in to change notification settings - Fork 1
/
azure-pipelines.yml
86 lines (84 loc) · 1.85 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
trigger:
tags:
include:
- v*
branches:
include:
- develop
- release*
paths:
exclude:
- README.md
variables:
group: 'pipelines'
stages:
- stage: Preflight
jobs:
- job: Build
steps:
- task: NodeTool@0
inputs:
versionSpec: '12.x'
displayName: 'Install Node.js'
- script: |
npm audit
displayName: 'Audit'
- script: |
npm i
displayName: 'Install dependencies'
- script: |
npm run standard
displayName: 'Standardjs report'
- stage: Test
jobs:
- job: Node_8
pool:
vmImage: 'Ubuntu-16.04'
steps:
- task: NodeTool@0
inputs:
versionSpec: '8.x'
displayName: 'Install Node.js'
- template: azure-templates/test.template.yml
- job: Node_10
pool:
vmImage: 'Ubuntu-16.04'
steps:
- task: NodeTool@0
inputs:
versionSpec: '10.x'
displayName: 'Install Node.js'
- template: azure-templates/test.template.yml
- job: Node_12
pool:
vmImage: 'Ubuntu-16.04'
steps:
- task: NodeTool@0
inputs:
versionSpec: '12.x'
displayName: 'Install Node.js'
- template: azure-templates/test.template.yml
- stage: Artifacts
jobs:
- job: 'Publish_Artifacts'
steps:
- task: NodeTool@0
inputs:
versionSpec: '12.x'
displayName: 'Install Node.js'
- script: |
npm pack
displayName: 'Package artifact'
- task: CopyFiles@2
inputs:
SourceFolder: $(System.DefaultWorkingDirectory)
TargetFolder: $(Build.ArtifactStagingDirectory)
Contents: |
*.tgz
OverWrite: true
displayName: 'Artifacts to publish'
- task: PublishBuildArtifacts@1
inputs:
PathtoPublish: '$(Build.ArtifactStagingDirectory)'
ArtifactName: 'sdk'
displayName: 'Publish artifacts'