-
Notifications
You must be signed in to change notification settings - Fork 443
/
build.yml
111 lines (93 loc) · 2.67 KB
/
build.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
pool:
name: Hosted macOS
demands:
- npm
- node.js
steps:
- task: ArchiveFiles@1
displayName: 'Archive source '
inputs:
rootFolder: '$(Build.SourcesDirectory)'
includeRootFolder: false
archiveType: tar
archiveFile: '$(Build.BinariesDirectory)/source.tar.gz'
- task: PublishBuildArtifacts@1
displayName: 'Publish Artifact: source'
inputs:
PathtoPublish: '$(Build.BinariesDirectory)/source.tar.gz'
ArtifactName: source
- task: Npm@1
displayName: 'Use npm 6.5.0'
inputs:
command: custom
verbose: false
customCommand: 'install -g npm@6.5.0'
- task: Npm@1
displayName: 'npm install'
inputs:
workingDir: '$(Build.SourcesDirectory)'
verbose: false
- task: Npm@1
displayName: 'npm custom'
inputs:
command: custom
verbose: false
customCommand: 'install -g gulp-cli'
- bash: |
export BUILDMACHINE=true
export VsMsSqlEnv=dev
node node_modules/gulp/bin/gulp.js build --gulpfile $(Build.SourcesDirectory)/gulpfile.js
displayName: 'gulp build (dev)'
condition: and(succeeded(), eq(variables['release'], false))
- bash: |
export BUILDMACHINE=true
export VsMsSqlEnv=production
node node_modules/gulp/bin/gulp.js build --gulpfile $(Build.SourcesDirectory)/gulpfile.js
displayName: 'gulp build (release)'
condition: and(succeeded(), eq(variables['release'], true))
- bash: 'npm install -g vsce'
displayName: 'npm install vsce'
- task: Gulp@0
displayName: 'gulp package:offline'
inputs:
targets: 'package:offline'
- task: Gulp@0
displayName: 'gulp package:online'
inputs:
targets: 'package:online'
- task: CopyFiles@2
displayName: 'Copy Files to: $(Build.ArtifactStagingDirectory)'
inputs:
SourceFolder: '$(Build.SourcesDirectory)'
Contents: '*.vsix'
TargetFolder: '$(Build.ArtifactStagingDirectory)'
- task: PublishBuildArtifacts@1
displayName: 'Publish Artifact: drop'
- script: |
brew update
brew cask install visual-studio-code
displayName: 'Install VS Code for testing'
- task: Gulp@0
displayName: 'gulp ext:install-service'
inputs:
targets: 'ext:install-service'
- task: Gulp@0
displayName: 'gulp cover:jenkins'
inputs:
targets: 'cover:jenkins'
publishJUnitResults: true
testResultsFiles: '$(Build.SourcesDirectory)/test-reports/*.xml'
continueOnError: true
- task: PublishCodeCoverageResults@1
displayName: 'Publish code coverage from $(Build.SourcesDirectory)/coverage/cobertura-coverage.xml'
inputs:
codeCoverageTool: Cobertura
summaryFileLocation: '$(Build.SourcesDirectory)/coverage/cobertura-coverage.xml'
trigger: none
pr: none
schedules:
- cron: "0 3 * * Mon-Fri"
displayName: Mon-Fri at 3:00AM
branches:
include:
- master