-
Notifications
You must be signed in to change notification settings - Fork 1
/
azure-pipelines.yml
73 lines (62 loc) · 1.77 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
trigger:
- master
pool:
vmImage: 'Ubuntu-16.04'
demands: npm
steps:
- task: NodeTool@0
displayName: 'Use Node 10.*'
inputs:
versionSpec: '10.*'
- task: Npm@1
displayName: 'npm version'
inputs:
command: custom
verbose: false
customCommand: '--no-git-tag-version version $(baseVersionNumber).$(Build.BuildId)'
- task: Npm@1
displayName: 'npm install'
inputs:
verbose: false
- task: Npm@1
displayName: 'npm run build'
inputs:
command: custom
verbose: false
customCommand: 'run build'
#- task: Npm@1
# displayName: 'npm test'
# inputs:
# command: custom
# verbose: false
# customCommand: test
- task: PublishTestResults@2
displayName: 'Publish Test Results testResults/junit.xml'
inputs:
testResultsFiles: testResults/junit.xml
condition: succeededOrFailed()
- task: PublishCodeCoverageResults@1
displayName: 'Publish code coverage from $(System.DefaultWorkingDirectory)/coverage/cobertura-coverage.xml'
inputs:
codeCoverageTool: Cobertura
summaryFileLocation: '$(System.DefaultWorkingDirectory)/coverage/cobertura-coverage.xml'
reportDirectory: '$(System.DefaultWorkingDirectory)/coverage'
condition: succeededOrFailed()
- task: DeleteFiles@1
displayName: 'Delete files from $(System.DefaultWorkingDirectory)'
inputs:
SourceFolder: '$(System.DefaultWorkingDirectory)'
Contents: |
.git
node_modules
coverage
testResults
.gitignore
- task: ArchiveFiles@2
displayName: 'Archive $(Build.BinariesDirectory)'
inputs:
rootFolderOrFile: '$(System.DefaultWorkingDirectory)'
includeRootFolder: false
archiveFile: '$(Build.ArtifactStagingDirectory)/mgt-$(baseVersionNumber).$(Build.BuildId).zip'
- task: PublishBuildArtifacts@1
displayName: 'Publish Artifact: drop'