Skip to content

Commit

Permalink
Merge pull request #2 from Azure/master
Browse files Browse the repository at this point in the history
Merge upstream
  • Loading branch information
MehaKaushik authored May 1, 2020
2 parents 27ae535 + 0780243 commit 1602eb5
Show file tree
Hide file tree
Showing 12,315 changed files with 1,637,954 additions and 81,008 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
5,970 changes: 5,970 additions & 0 deletions .azure-pipelines-preproduction/package-lock.json

Large diffs are not rendered by default.

46 changes: 46 additions & 0 deletions .azure-pipelines-preproduction/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
{
"name": "azure-rest-api-specs-tests",
"private": true,
"author": {
"name": "Microsoft Corporation",
"email": "[email protected]",
"url": "https://github.com/azure/azure-rest-api-specs"
},
"version": "0.1.0",
"description": "Tests for Azure REST API Specifications",
"license": "MIT",
"devDependencies": {
"@azure/avocado": "^0.6.3",
"@azure/rest-api-specs-scripts": "^0.8.0",
"@ts-common/commonmark-to-markdown": "^1.2.0",
"@ts-common/fs": "0.2.0",
"@ts-common/iterator": "^0.3.6",
"@types/js-yaml": "^3.12.1",
"@types/mocha": "^5.2.6",
"@types/prettier": "^1.18.3",
"cspell": "^4.0.30",
"js-yaml": "^3.13.1",
"json-schema-ref-parser": "^6.1.0",
"mocha": "*",
"ts-node": "^8.1.0",
"tslib": "^1.10.0",
"typescript": "3.5.3",
"prettier": "^1.18.2"
},
"homepage": "https://github.com/azure/azure-rest-api-specs",
"repository": {
"type": "git",
"url": "[email protected]:azure/azure-rest-api-specs.git"
},
"bugs": {
"url": "http://github.com/azure/azure-rest-api-specs/issues"
},
"scripts": {
"test": "tsc && mocha -t 500000 --reporter min",
"spellcheck": "ts-node ./scripts/spellcheck.ts",
"prettier-check": "tsc && ts-node ./scripts/prettier-check.ts",
"prettier": "prettier",
"tsc": "tsc",
"multiapi": "ts-node ./scripts/multiapi.ts"
}
}
12 changes: 12 additions & 0 deletions .azure-pipelines/Avocado.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
jobs:
- job: "Avocado"
pool:
vmImage: 'Ubuntu 16.04'
steps:
- task: Npm@1
displayName: 'npm install'
inputs:
verbose: false
- script: './node_modules/.bin/avocado'
displayName: 'Avocado'
condition: ne(variables['Build.SourceBranch'], 'refs/heads/master')
8 changes: 8 additions & 0 deletions .azure-pipelines/BranchProtectionForPrivateRepo.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
jobs:
- job: "BranchProtectionForPrivateRepo"
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
13 changes: 13 additions & 0 deletions .azure-pipelines/BreakingChange.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
jobs:
- 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 run tsc && node scripts/breaking-change.js'
displayName: 'Breaking Changes'
15 changes: 15 additions & 0 deletions .azure-pipelines/LintDiff.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
jobs:
- 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 run tsc && node scripts/momentOfTruth.js && node scripts/momentOfTruthPostProcessing.js'
displayName: 'LintDiff'
13 changes: 13 additions & 0 deletions .azure-pipelines/ModelValidation.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
jobs:
- job: "ModelValidation"
pool:
vmImage: 'Ubuntu 16.04'
steps:
- task: Npm@1
displayName: 'npm ci'
inputs:
command: custom
verbose: false
customCommand: ci
- script: 'npm run tsc && node scripts/modelValidation.js'
displayName: 'Model Validation'
39 changes: 39 additions & 0 deletions .azure-pipelines/NetworkValidation.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
jobs:
- job: "NetworkValidation"
condition: and(startsWith(variables['System.PullRequest.TargetBranch'], 'network-'), endsWith(variables['System.PullRequest.TargetBranch'], '-release'))
continueOnError: true
pool:
vmImage: vs2017-win2016
variables:
NRP_SWAGGER_VALIDATION_OVERRIDE_PS_BRANCH: 'true'
NRP_BUILD_TOOLS_SKIP_GENERATE_PS1: 'true'
NRP_BUILD_TOOLS_OUTPUT_PATH: '$(System.DefaultWorkingDirectory)\Out'
steps:
- powershell: |
& "C:/Program Files (x86)/Microsoft SDKs/Windows/v10.0A/bin/NETFX 4.6.1 Tools/sn.exe" -Vr *,31bf3856ad364e35
displayName: Bypass Strong Name validation
- task: NodeTool@0
inputs:
versionSpec: '10.16.3'
displayName: Install Node.js
- script: npm install autorest -g
displayName: Install autorest
- script: git clone --depth 1 -- https://dev.azure.com/v-anevse/BuildScripts/_git/BuildScripts ..\BuildScripts
displayName: Clone build tools
- powershell: |
$swgrPath = (Get-Item ".\").FullName
$outputPath = $env:NRP_BUILD_TOOLS_OUTPUT_PATH
New-Item -Path $outputPath -ItemType "Directory" -Force | Out-Null
..\BuildScripts\Test-SwaggerRelease.ps1 -Component Network -SwaggerRepoPath $swgrPath -OutputFolder $outputPath
failOnStderr: false
displayName: Test Swagger updates
- powershell: |
Copy-Item "..\BuildScripts\.azure-pipelines\.artifactignore" -Destination "$($env:NRP_BUILD_TOOLS_OUTPUT_PATH)\.artifactignore" -Force -ErrorAction "SilentlyContinue"
failOnStderr: false
condition: always()
displayName: Copy .artifactignore
- task: PublishPipelineArtifact@0
condition: always()
inputs:
artifactName: SwaggerTestOutput
targetPath: $(NRP_BUILD_TOOLS_OUTPUT_PATH)
15 changes: 15 additions & 0 deletions .azure-pipelines/PrettierCheck.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
jobs:
- job: "PrettierCheck"
condition: "not(variables['PRIVATE'])"
variables:
NODE_OPTIONS: '--max-old-space-size=8192'
pool:
vmImage: 'Ubuntu 18.04'
continueOnError: true
steps:
- task: Npm@1
displayName: 'npm install'
inputs:
verbose: false
- script: 'npm run prettier-check'
displayName: 'Run Prettier Check'
79 changes: 79 additions & 0 deletions .azure-pipelines/SDKAutomation.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
trigger:
batch: false
branches:
include:
- master

pr:
autoCancel: false

variables:
IMAGE: azopenapi.azurecr.io/openapi/sdk-automation:prod
REGISTRY_ENDPOINT: azopenapi-registry

jobs:
- job: "SDKAutomation"
displayName: SDK
pool:
vmImage: 'Ubuntu 18.04'
timeoutInMinutes: 180

variables:
NODE_OPTIONS: '--max-old-space-size=8192'
BLOB_STORAGE_PREFIX: sdkautomation-pipeline
SPEC_REPO: $(Build.Repository.Name)
PR_NUMBER: $(System.PullRequest.PullRequestNumber)
strategy:
matrix:
Net:
SDK_REPO_NAME: azure-sdk-for-net
Java:
SDK_REPO_NAME: azure-sdk-for-java
JavaScript:
SDK_REPO_NAME: azure-sdk-for-js
Python:
SDK_REPO_NAME: azure-sdk-for-python
Cliextension:
SDK_REPO_NAME: azure-cli-extensions
Go:
SDK_REPO_NAME: azure-sdk-for-go
Trenton:
SDK_REPO_NAME: azure-sdk-for-trenton
steps:
- checkout: none
- script: |
curl \
-s https://api.github.com/repos/$(Build.Repository.Name)/commits/$(Build.SourceVersion)/pulls \
-H "Accept: application/vnd.github.groot-preview+json" \
| python3 -c "import sys,json; a=json.load(sys.stdin); print(f'##vso[task.setvariable variable=PR_NUMBER]{a[0][\"number\"]}' if len(a)>0 and a[0][\"base\"][\"ref\"]=='master' else '##vso[task.logissue type=error]Last commit $(Build.SourceVersion) doesnot have a related PR')"
displayName: Get PR_NUMBER
condition: in(variables['Build.Reason'], 'IndividualCI', 'Manual')
- task: Docker@2
displayName: Login into ACR
inputs:
command: login
containerRegistry: $(REGISTRY_ENDPOINT)
- script: |
docker pull $IMAGE
docker tag $IMAGE sdk-automation:latest
displayName: Pull SDK Automation Image
- script: |
docker run \
-e BLOB_STORAGE_NAME \
-e BLOB_STORAGE_KEY \
-e GITHUB_COMMENT_AUTHOR_NAME \
-e GITHUBAPP_ID \
-e GITHUBAPP_PRIVATE_KEY \
-e NODE_OPTIONS \
-e BLOB_STORAGE_PREFIX \
-e SPEC_REPO \
-e PR_NUMBER \
-e SDK_REPO_NAME \
sdk-automation:latest npm start
env:
BLOB_STORAGE_NAME: $(blob-storage-name)
BLOB_STORAGE_KEY: $(blob-storage-key)
GITHUB_COMMENT_AUTHOR_NAME: $(github-comment-author-name)
GITHUBAPP_ID: $(githubapp-id)
GITHUBAPP_PRIVATE_KEY: $(githubapp-private-key)
displayName: SDK Automation
13 changes: 13 additions & 0 deletions .azure-pipelines/Semantic.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
jobs:
- job: "Semantic"
pool:
vmImage: 'Ubuntu 16.04'
steps:
- task: Npm@1
displayName: 'npm ci'
inputs:
command: custom
verbose: false
customCommand: ci
- script: 'npm run tsc && node scripts/semanticValidation.js'
displayName: 'Semantic Validation'
15 changes: 15 additions & 0 deletions .azure-pipelines/Spellcheck.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
jobs:
- 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'
31 changes: 31 additions & 0 deletions .azure-pipelines/SwaggerToSDK.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
jobs:
- job: "SDK"
timeoutInMinutes: 180
strategy:
matrix:
java:
AZURE_SDK_REPO: azure-sdk-for-java
AZURE_SDK_PARAMS: ''
javascript:
AZURE_SDK_REPO: azure-sdk-for-js
AZURE_SDK_PARAMS: ''
python:
AZURE_SDK_REPO: azure-sdk-for-python
AZURE_SDK_PARAMS: ''
cliextension:
AZURE_SDK_REPO: azure-cli-extensions
AZURE_SDK_PARAMS: ''
trenton:
AZURE_SDK_REPO: azure-sdk-for-trenton
AZURE_SDK_PARAMS: ''
go:
AZURE_SDK_REPO: azure-sdk-for-go
AZURE_SDK_PARAMS: '-o latest'
pool:
vmImage: 'Ubuntu 16.04'
variables:
NODE_OPTIONS: '--max-old-space-size=8192'
steps:
- script: echo $(NODE_OPTIONS)
- script: "scripts/swagger-to-sdk.sh Azure/$(AZURE_SDK_REPO) -v $(AZURE_SDK_PARAMS)"
displayName: "Swagger to SDK script"
20 changes: 20 additions & 0 deletions .azure-pipelines/Syntax.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
jobs:
- 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 test -- test/syntax.js'
displayName: 'Syntax validation'
2 changes: 1 addition & 1 deletion .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<i>MSFT employees can try out our new experience at <b>[OpenAPI Hub](https://aka.ms/openapiportal) </b> - one location for using our validation tools and finding your workflow.
</i><br>
### Contribution checklist:
- [ ] I have reviewed the [documentation](https://github.com/Azure/azure-rest-api-specs#basics) for the workflow.
- [ ] I have reviewed the [documentation](https://github.com/Azure/adx-documentation-pr/wiki/Overall-basic-flow) for the workflow.
- [ ] [Validation tools](https://github.com/Azure/azure-rest-api-specs/blob/master/documentation/swagger-checklist.md#validation-tools-for-swagger-checklist) were run on swagger spec(s) and have all been fixed in this PR.
- [ ] The [OpenAPI Hub](https://aka.ms/openapiportal) was used for checking validation status and next steps.
### ARM API Review Checklist
Expand Down
Loading

0 comments on commit 1602eb5

Please sign in to comment.