Skip to content

Commit

Permalink
Use templates
Browse files Browse the repository at this point in the history
  • Loading branch information
devongovett committed Sep 23, 2018
1 parent c16695f commit 2e3c124
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 44 deletions.
22 changes: 22 additions & 0 deletions azure-pipelines-template.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
jobs:
- job: ${{ parameters.name }}
pool:
vmImage: ${{ parameters.vmImage }}
strategy:
matrix:
node_6_x:
node_version: 6.x
node_8_x:
node_version: 8.x
node_10_x:
node_version: 10.x
steps:
- task: NodeTool@0
inputs:
version: $(node_version)
displayName: 'Install Node.js'

- script: |
yarn
yarn test-ci
yarn lint
56 changes: 12 additions & 44 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
@@ -1,47 +1,15 @@
# 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

jobs:
- job: Linux
pool:
vmImage: 'ubuntu-16.04'
strategy:
matrix:
node_6_x:
node_version: 6.x
node_8_x:
node_version: 8.x
node_10_x:
node_version: 10.x
steps:
- script: echo hello from Linux
- template: azure-pipelines-template.yml
parameters:
name: macOS
vmImage: macOS-10.13

- job: macOS
pool:
vmImage: 'macOS-10.13'
strategy:
matrix:
node_6_x:
node_version: 6.x
node_8_x:
node_version: 8.x
node_10_x:
node_version: 10.x
steps:
- script: echo hello from macOS
- template: azure-pipelines-template.yml
parameters:
name: Linux
vmImage: ubuntu-1604

- job: Windows
pool:
vmImage: 'vs2017-win2016'
strategy:
matrix:
node_6_x:
node_version: 6.x
node_8_x:
node_version: 8.x
node_10_x:
node_version: 10.x
steps:
- script: echo hello from Windows
- template: azure-pipelines-template.yml
parameters:
name: Windows
vmImage: vs2017-win2016

0 comments on commit 2e3c124

Please sign in to comment.