-
Notifications
You must be signed in to change notification settings - Fork 1
/
azure-pipelines-1.yml
70 lines (61 loc) · 1.51 KB
/
azure-pipelines-1.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
resources:
- repo: self
trigger:
- master
pool:
vmImage: 'vs2017-win2016'
demands:
- npm
- node.js
steps:
#install node 10.x
- task: NodeTool@0
displayName: 'Use Node 10.x'
inputs:
versionSpec: 10.x
checkLatest: true
#install nodejs modules with npm
- task: Npm@1
displayName: 'npm install'
inputs:
workingDir: '$(Build.SourcesDirectory)'
verbose: false
#start unit tests
- task: Npm@1
displayName: 'npm test'
inputs:
command: custom
customCommand: 'test'
workingDir: '$(Build.SourcesDirectory)'
verbose: false
# Publish Test Results to Azure Pipelines/TFS
- task: PublishTestResults@2
inputs:
testResultsFiles: './jest/summary-jest-junit.xml'
searchFolder: '$(Build.SourcesDirectory)'
#bundle code with gulp
- task: Gulp@0
displayName: 'gulp bundle'
inputs:
gulpFile: '$(Build.SourcesDirectory)/gulpfile.js'
targets: bundle
arguments: '--ship'
continueOnError: true
#package solution with gulp
- task: Gulp@0
displayName: 'gulp package-solution'
inputs:
gulpFile: '$(Build.SourcesDirectory)/gulpfile.js'
targets: 'package-solution'
arguments: '--ship'
#copy files to artifact repository
- task: CopyFiles@2
displayName: 'Copy Files to: $(build.artifactstagingdirectory)/drop'
inputs:
Contents: '**\*.sppkg'
TargetFolder: '$(build.artifactstagingdirectory)/drop'
#publish artifacts
- task: PublishBuildArtifacts@1
displayName: 'Publish Artifact: drop'
inputs:
PathtoPublish: '$(build.artifactstagingdirectory)/drop'