forked from Azure/azure-rest-api-specs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
preproduction-azure-pipelines.yml
124 lines (113 loc) · 3.27 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
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
112
113
114
115
116
117
118
119
120
121
122
123
124
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: "Syntax"
pool:
vmImage: 'Ubuntu 16.04'
steps:
- script: |
echo TRAVIS: $(TRAVIS)
echo TRAVIS_BRANCH: $(TRAVIS_BRANCH)
echo TRAVIS_REPO_SLUG: $(TRAVIS_REPO_SLUG)
echo TRAVIS_PULL_REQUEST: $(TRAVIS_PULL_REQUEST)
echo TRAVIS_PULL_REQUEST_SLUG: $(TRAVIS_PULL_REQUEST_SLUG)
echo TRAVIS_PULL_REQUEST_SHA: $(TRAVIS_PULL_REQUEST_SHA)
echo PR_ONLY: $(PR_ONLY)
displayName: "Info"
- task: Npm@1
displayName: 'npm install'
inputs:
verbose: false
- script: 'npm install -D @azure/rest-api-specs-scripts@0.3.9'
- script: 'npm test -- test/syntax.js'
displayName: 'Syntax validation'
- job: "Semantic"
pool:
vmImage: 'Ubuntu 16.04'
steps:
- task: Npm@1
displayName: 'npm install'
inputs:
verbose: false
- script: 'npm install -D @azure/rest-api-specs-scripts@0.3.9'
- script: 'npm run tsc && node scripts/semanticValidation.js'
displayName: 'Semantic Validation'
- job: "ModelValidation"
pool:
vmImage: 'Ubuntu 16.04'
steps:
- task: Npm@1
displayName: 'npm install'
inputs:
verbose: false
- script: 'npm install -D @azure/rest-api-specs-scripts@0.3.9'
- script: 'npm run tsc && node scripts/modelValidation.js'
displayName: 'Model Validation'
- job: "Avocado"
pool:
vmImage: 'Ubuntu 16.04'
continueOnError: true
steps:
- task: Npm@1
displayName: 'npm install'
inputs:
verbose: false
- script: './node_modules/.bin/avocado'
displayName: 'Avocado'
- job: "BreakingChange"
pool:
vmImage: 'Ubuntu 16.04'
steps:
- script: 'scripts/install-dotnet.sh'
displayName: 'Install .Net'
- task: Npm@1
displayName: 'npm install'
inputs:
verbose: false
- script: 'npm install -D @azure/rest-api-specs-scripts@0.3.9'
- script: 'npm run tsc && node scripts/breaking-change.js'
displayName: 'Breaking Changes'
- job: "LintDiff"
variables:
NODE_OPTIONS: '--max-old-space-size=8192'
pool:
vmImage: 'Ubuntu 16.04'
steps:
- task: Npm@1
displayName: 'npm install'
inputs:
verbose: false
- script: 'scripts/install-dotnet.sh'
displayName: 'install .Net'
- script: 'npm install -D @azure/rest-api-specs-scripts@0.3.9'
- script: 'npm run tsc && node scripts/momentOfTruth.js && node scripts/momentOfTruthPostProcessing.js'
displayName: 'LintDiff'
- 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'