This commit is contained in:
Alex Dima 2019-07-12 09:42:15 +02:00
Родитель 3e41603cda
Коммит 17ec740e0a
2 изменённых файлов: 38 добавлений и 15 удалений

Просмотреть файл

@ -1,21 +1,20 @@
# Node.js
# Build a general Node.js project with npm.
# Add steps that analyze code, save build artifacts, deploy, and more:
# https://docs.microsoft.com/azure/devops/pipelines/languages/javascript
# https://docs.microsoft.com/en-us/azure/devops/pipelines/process/templates?view=azure-devops
trigger:
- master
pool:
vmImage: 'ubuntu-latest'
jobs:
- template: build-template.yml
parameters:
name: Linux
vmImage: 'ubuntu-16.04'
steps:
- task: NodeTool@0
inputs:
versionSpec: '10.x'
displayName: 'Install Node.js'
- template: build-template.yml
parameters:
name: macOS
vmImage: 'macOS-10.13'
- script: |
npm install
npm run build
displayName: 'npm install and build'
- template: build-template.yml
parameters:
name: Windows
vmImage: 'vs2017-win2016'

24
build-template.yml Normal file
Просмотреть файл

@ -0,0 +1,24 @@
# Node.js
# Build a general Node.js project with npm.
# Add steps that analyze code, save build artifacts, deploy, and more:
# https://docs.microsoft.com/azure/devops/pipelines/languages/javascript
parameters:
name: ''
vmImage: ''
jobs:
- job: ${{ parameters.name }}
pool:
vmImage: ${{ parameters.vmImage }}
strategy:
matrix:
node_10_x:
node_version: 10.x
steps:
- task: NodeTool@0
inputs:
versionSpec: $(node_version)
displayName: 'Install Node.js'
- script: npm install
- script: npm test