forked from Azure/azure-rest-api-specs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
preproduction-azure-pipelines.yml
49 lines (43 loc) · 1.2 KB
/
preproduction-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
name: "Preproduction CI for Azure Rest API specifications"
trigger: none
variables:
TRAVIS: 'true'
TRAVIS_BRANCH: $(System.PullRequest.TargetBranch)
TRAVIS_PULL_REQUEST: $(System.PullRequest.PullRequestNumber)
TRAVIS_REPO_SLUG: $(Build.Repository.Name)
TRAVIS_PULL_REQUEST_SLUG: $(Build.Repository.Name)
TRAVIS_PULL_REQUEST_SHA: $(Build.SourceVersion)
PR_ONLY: 'true'
jobs:
- job: "BranchProtection"
pool:
vmImage: 'Ubuntu 16.04'
condition: and(variables['PRIVATE'], eq(variables['System.PullRequest.TargetBranch'], 'master'))
steps:
- script: '>&2 echo "the branch is protected"'
failOnStderr: true
- job: "Spellcheck"
condition: "not(variables['PRIVATE'])"
variables:
NODE_OPTIONS: '--max-old-space-size=8192'
pool:
vmImage: 'Ubuntu 16.04'
continueOnError: true
steps:
- task: Npm@1
displayName: 'npm install'
inputs:
verbose: false
- script: 'npm run spellcheck'
displayName: 'Run cSpell'
- job: "Avocado"
pool:
vmImage: 'Ubuntu 16.04'
steps:
- task: Npm@1
displayName: 'npm install'
inputs:
verbose: false
- script: 'npm install -D @azure/avocado@0.5.1'
- script: './node_modules/.bin/avocado'
displayName: 'Avocado'