-
Notifications
You must be signed in to change notification settings - Fork 0
/
azure-pipelines.yml
111 lines (94 loc) · 2.83 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
98
99
100
101
102
103
104
105
106
107
108
109
110
111
trigger:
- master
- develop
jobs:
- job: BuildAndUnitTests
displayName: Build and run unit tests on
strategy:
matrix:
Linux:
imageName: "ubuntu-latest"
MacOs:
imageName: "macOs-latest"
Windows:
imageName: "windows-latest"
pool:
vmImage: "$(imageName)"
steps:
- task: UseNode@1
displayName: "Install Node.js"
inputs:
version: "14.3.0"
continueOnError: false
- task: Npm@1
displayName: "NPM Install Project"
inputs:
command: "ci"
continueOnError: false
- task: CmdLine@2
displayName: "Build Project"
inputs:
script: |
npm run build
continueOnError: false
# There are currently no unit tests in this project
# - task: CmdLine@2
# displayName: "Test Project"
# inputs:
# script: |
# npm run test:ci
# continueOnError: false
# - task: PublishTestResults@2
# displayName: "Publish Test Results"
# inputs:
# testResultsFormat: "JUnit"
# testResultsFiles: "$(System.DefaultWorkingDirectory)/**/coverage/junit-reported-tests.xml"
# continueOnError: false
# - task: PublishCodeCoverageResults@1
# displayName: "Publish Coverage Results"
# inputs:
# codeCoverageTool: "Cobertura"
# summaryFileLocation: "$(System.DefaultWorkingDirectory)/**/coverage/cobertura-coverage.xml"
# continueOnError: false
- job: CreateNPMPackage
displayName: Create NPM Package
dependsOn: BuildAndUnitTests
condition: succeeded()
pool:
vmImage: "ubuntu-latest"
steps:
- task: UseNode@1
displayName: "Install Node.js"
inputs:
version: "14.3.0"
continueOnError: false
- task: Npm@1
displayName: "NPM Install Project"
inputs:
command: "ci"
continueOnError: false
- task: CmdLine@2
displayName: "Build Project"
inputs:
script: |
npm run build
continueOnError: false
- task: Npm@1
displayName: "NPM Pack"
inputs:
command: "custom"
customCommand: "pack"
continueOnError: false
- task: Bash@3
displayName: "Rename the package"
inputs:
targetType: 'inline'
script: 'for file in *.tgz; do mv "$file" "fibre-translations.tgz"; done'
workingDirectory: '$(System.DefaultWorkingDirectory)'
- task: PublishPipelineArtifact@1
displayName: "Publish Packaged Tar"
inputs:
targetPath: "$(System.DefaultWorkingDirectory)/fibre-translations.tgz"
artifact: "Fibre Translations"
publishLocation: "pipeline"
continueOnError: false