-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathazure-pipelines.yaml
85 lines (72 loc) · 2.08 KB
/
azure-pipelines.yaml
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
# Node.js with Angular
# Build a Node.js project that uses Angular.
# Add steps that analyze code, save build artifacts, deploy, and more:
# https://docs.microsoft.com/azure/devops/pipelines/languages/javascript
name: 1.1.$(Rev:r)
trigger:
batch: true
branches:
include:
- master
paths:
exclude:
- README.md
- CONTRIBUTING.md
- LICENSE
pr:
branches:
include:
- master
paths:
exclude:
- README.md
- CONTRIBUTING.md
- LICENSE
stages:
- stage: Build
jobs:
- job: Build
pool:
vmImage: 'ubuntu-latest'
steps:
- checkout: self
submodules: recursive
- task: NodeTool@0
inputs:
versionSpec: '10.x'
displayName: 'Install Node.js'
- script: |
npm ci
displayName: 'Install npm Packages'
- script: |
npm run ci-test
displayName: 'Unit Test'
- task: PublishTestResults@2
inputs:
testResultsFiles: 'unit-test-result.xml'
failTaskOnFailedTests: true
displayName: 'Publish Unit Test Result'
- task: PublishCodeCoverageResults@1
inputs:
codeCoverageTool: cobertura
summaryFileLocation: coverage/cobertura-coverage.xml
displayName: 'Publish Unit Test Code Coverage Result'
# E2E test may fail in Azure Pipeline as the version of Chrome installed on the pool image
# doesn't always match the version of ChromeDriver specified in package-lock.json. So
# skip E2E for now.
#
# - script: |
# npm run ci-e2e
# displayName: 'E2E Test'
- script: |
npm run build-prd
condition: and(succeeded(), eq(variables['Build.SourceBranch'], 'refs/heads/master'))
displayName: 'Build'
- script: |
./make-zip $BUILD_BUILDNUMBER
condition: and(succeeded(), eq(variables['Build.SourceBranch'], 'refs/heads/master'))
displayName: 'Package Build Result'
- publish: 'dist/WebPortal-$(Build.BuildNumber).zip'
artifact: Package
condition: and(succeeded(), eq(variables['Build.SourceBranch'], 'refs/heads/master'))
displayName: 'Publish Build Result'