Skip to content

Commit 224c483

Browse files
authored
Merge pull request #8 from Azure/master
Merge master
2 parents 99947a4 + 04b845f commit 224c483

File tree

34,617 files changed

+4864490
-114393
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

34,617 files changed

+4864490
-114393
lines changed
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
jobs:
2+
- job: "BranchProtectionForPrivateRepo"
3+
pool:
4+
vmImage: 'Ubuntu 16.04'
5+
condition: and(variables['PRIVATE'], eq(variables['System.PullRequest.TargetBranch'], 'master'))
6+
steps:
7+
- script: '>&2 echo "the branch is protected"'
8+
failOnStderr: true
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
jobs:
2+
- job: "NetworkValidation"
3+
condition: and(startsWith(variables['System.PullRequest.TargetBranch'], 'network-'), endsWith(variables['System.PullRequest.TargetBranch'], '-release'))
4+
continueOnError: true
5+
pool:
6+
vmImage: vs2017-win2016
7+
variables:
8+
NRP_SWAGGER_VALIDATION_OVERRIDE_PS_BRANCH: 'true'
9+
NRP_BUILD_TOOLS_SKIP_GENERATE_PS1: 'true'
10+
NRP_BUILD_TOOLS_OUTPUT_PATH: '$(System.DefaultWorkingDirectory)\Out'
11+
steps:
12+
- powershell: |
13+
& "C:/Program Files (x86)/Microsoft SDKs/Windows/v10.0A/bin/NETFX 4.6.1 Tools/sn.exe" -Vr *,31bf3856ad364e35
14+
displayName: Bypass Strong Name validation
15+
- task: NodeTool@0
16+
inputs:
17+
versionSpec: '10.16.3'
18+
displayName: Install Node.js
19+
- script: npm install autorest -g
20+
displayName: Install autorest
21+
- script: git clone --depth 1 -- https://dev.azure.com/nrp-swagger/swagger-stack/_git/automation-scripts ..\BuildScripts
22+
displayName: Clone build tools
23+
- powershell: |
24+
$swgrPath = (Get-Item ".\").FullName
25+
$outputPath = $env:NRP_BUILD_TOOLS_OUTPUT_PATH
26+
New-Item -Path $outputPath -ItemType "Directory" -Force | Out-Null
27+
..\BuildScripts\Test-SwaggerRelease.ps1 -Component Network -SwaggerRepoPath $swgrPath -OutputFolder $outputPath
28+
failOnStderr: false
29+
displayName: Test Swagger updates
30+
- powershell: |
31+
Copy-Item "..\BuildScripts\.azure-pipelines\.artifactignore" -Destination "$($env:NRP_BUILD_TOOLS_OUTPUT_PATH)\.artifactignore" -Force -ErrorAction "SilentlyContinue"
32+
failOnStderr: false
33+
condition: always()
34+
displayName: Copy .artifactignore
35+
- task: PublishPipelineArtifact@0
36+
condition: always()
37+
inputs:
38+
artifactName: SwaggerTestOutput
39+
targetPath: $(NRP_BUILD_TOOLS_OUTPUT_PATH)

.azure-pipelines/PrettierCheck.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
jobs:
2+
- job: "PrettierCheck"
3+
variables:
4+
NODE_OPTIONS: '--max-old-space-size=8192'
5+
pool:
6+
vmImage: 'Ubuntu 18.04'
7+
continueOnError: true
8+
steps:
9+
- task: Npm@1
10+
displayName: 'npm install'
11+
inputs:
12+
verbose: false
13+
- script: 'npm run prettier-check'
14+
displayName: 'Run Prettier Check'

.azure-pipelines/SDKAutomation.yml

Lines changed: 94 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,94 @@
1+
trigger:
2+
batch: false
3+
branches:
4+
include:
5+
- master
6+
7+
pr:
8+
autoCancel: false
9+
10+
variables:
11+
IMAGE: azopenapi.azurecr.io/openapi/sdk-automation:prod
12+
REGISTRY_ENDPOINT: azopenapi-registry
13+
14+
jobs:
15+
- job: "SDKAutomation"
16+
displayName: SDK
17+
pool:
18+
vmImage: 'Ubuntu 18.04'
19+
timeoutInMinutes: 180
20+
21+
variables:
22+
NODE_OPTIONS: '--max-old-space-size=8192'
23+
SPEC_REPO: $(Build.Repository.Name)
24+
PR_NUMBER: $(System.PullRequest.PullRequestNumber)
25+
BUILD_ID: $(Build.BuildId)
26+
strategy:
27+
matrix:
28+
Net:
29+
SDK_REPO_NAME: azure-sdk-for-net
30+
Java:
31+
SDK_REPO_NAME: azure-sdk-for-java
32+
JavaScript:
33+
SDK_REPO_NAME: azure-sdk-for-js
34+
Python:
35+
SDK_REPO_NAME: azure-sdk-for-python
36+
PythonT2:
37+
SDK_REPO_NAME: azure-sdk-for-python-track2
38+
Cliextension:
39+
SDK_REPO_NAME: azure-cli-extensions
40+
Go:
41+
SDK_REPO_NAME: azure-sdk-for-go
42+
Trenton:
43+
SDK_REPO_NAME: azure-sdk-for-trenton
44+
Schema:
45+
SDK_REPO_NAME: azure-resource-manager-schemas
46+
steps:
47+
- checkout: none
48+
- script: |
49+
curl \
50+
-s https://api.github.com/repos/$(Build.Repository.Name)/commits/$(Build.SourceVersion)/pulls \
51+
-H "Accept: application/vnd.github.groot-preview+json" \
52+
| 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')"
53+
displayName: Get PR_NUMBER
54+
condition: in(variables['Build.Reason'], 'IndividualCI', 'Manual')
55+
- task: Docker@2
56+
displayName: Login into ACR
57+
inputs:
58+
command: login
59+
containerRegistry: $(REGISTRY_ENDPOINT)
60+
- script: |
61+
docker pull $IMAGE
62+
docker tag $IMAGE sdk-automation:latest
63+
displayName: Pull SDK Automation Image
64+
- script: |
65+
docker run \
66+
-e BLOB_PROXY_PREFIX \
67+
-e BLOB_STORAGE_PREFIX \
68+
-e BLOB_STORAGE_IS_PUBLIC \
69+
-e BLOB_DOWNLOAD_COMMAND \
70+
-e BLOB_STORAGE_NAME \
71+
-e BLOB_STORAGE_KEY \
72+
-e GITHUB_COMMENT_AUTHOR_NAME \
73+
-e GITHUBAPP_ID \
74+
-e GITHUBAPP_PRIVATE_KEY \
75+
-e NODE_OPTIONS \
76+
-e SPEC_REPO \
77+
-e PR_NUMBER \
78+
-e SDK_REPO_NAME \
79+
-e AZURE_DEVOPS_EXT_PAT \
80+
-e BUILD_ID \
81+
sdk-automation:latest npm start
82+
condition: or(ne(variables['SDK_REPO_NAME'], 'azure-resource-manager-schemas'), endsWith(variables['SPEC_REPO'], '/azure-rest-api-specs'))
83+
env:
84+
BLOB_STORAGE_NAME: $(blob-storage-name)
85+
BLOB_STORAGE_KEY: $(blob-storage-key)
86+
BLOB_STORAGE_PREFIX: $(blob-storage-prefix)
87+
BLOB_PROXY_PREFIX: $(blob-proxy-prefix)
88+
BLOB_STORAGE_IS_PUBLIC: $(blob-is-public)
89+
BLOB_DOWNLOAD_COMMAND: $(blob-download-command)
90+
GITHUB_COMMENT_AUTHOR_NAME: $(github-comment-author-name)
91+
GITHUBAPP_ID: $(githubapp-id)
92+
GITHUBAPP_PRIVATE_KEY: $(githubapp-private-key)
93+
AZURE_DEVOPS_EXT_PAT: $(azure-devops-ext-pat)
94+
displayName: SDK Automation

.azure-pipelines/Spellcheck.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
jobs:
2+
- job: "Spellcheck"
3+
variables:
4+
NODE_OPTIONS: '--max-old-space-size=8192'
5+
pool:
6+
vmImage: 'Ubuntu 16.04'
7+
continueOnError: true
8+
steps:
9+
- task: Npm@1
10+
displayName: 'npm install'
11+
inputs:
12+
verbose: false
13+
- script: 'npm run spellcheck'
14+
displayName: 'Run cSpell'

.azure-pipelines/SwaggerToSDK.yml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
jobs:
2+
- job: "SDK"
3+
timeoutInMinutes: 180
4+
strategy:
5+
matrix:
6+
java:
7+
AZURE_SDK_REPO: azure-sdk-for-java
8+
AZURE_SDK_PARAMS: ''
9+
javascript:
10+
AZURE_SDK_REPO: azure-sdk-for-js
11+
AZURE_SDK_PARAMS: ''
12+
python:
13+
AZURE_SDK_REPO: azure-sdk-for-python
14+
AZURE_SDK_PARAMS: ''
15+
cliextension:
16+
AZURE_SDK_REPO: azure-cli-extensions
17+
AZURE_SDK_PARAMS: ''
18+
trenton:
19+
AZURE_SDK_REPO: azure-sdk-for-trenton
20+
AZURE_SDK_PARAMS: ''
21+
go:
22+
AZURE_SDK_REPO: azure-sdk-for-go
23+
AZURE_SDK_PARAMS: '-o latest'
24+
pool:
25+
vmImage: 'Ubuntu 16.04'
26+
variables:
27+
NODE_OPTIONS: '--max-old-space-size=8192'
28+
steps:
29+
- script: echo $(NODE_OPTIONS)
30+
- script: "scripts/swagger-to-sdk.sh Azure/$(AZURE_SDK_REPO) -v $(AZURE_SDK_PARAMS)"
31+
displayName: "Swagger to SDK script"

.azure-pipelines/Syntax.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
jobs:
2+
- job: "Syntax"
3+
pool:
4+
vmImage: 'Ubuntu 16.04'
5+
steps:
6+
- script: |
7+
echo TRAVIS: $(TRAVIS)
8+
echo TRAVIS_BRANCH: $(TRAVIS_BRANCH)
9+
echo TRAVIS_REPO_SLUG: $(TRAVIS_REPO_SLUG)
10+
echo TRAVIS_PULL_REQUEST: $(TRAVIS_PULL_REQUEST)
11+
echo TRAVIS_PULL_REQUEST_SLUG: $(TRAVIS_PULL_REQUEST_SLUG)
12+
echo TRAVIS_PULL_REQUEST_SHA: $(TRAVIS_PULL_REQUEST_SHA)
13+
echo PR_ONLY: $(PR_ONLY)
14+
displayName: "Info"
15+
- task: Npm@1
16+
displayName: 'npm install'
17+
inputs:
18+
verbose: false
19+
- script: 'npm test -- test/syntax.js'
20+
displayName: 'Syntax validation'
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
schedules:
2+
- cron: "0 0 * * *"
3+
displayName: Daily build
4+
branches:
5+
include:
6+
- master
7+
always: true
8+
9+
pool:
10+
vmImage: 'Ubuntu-16.04'
11+
12+
variables:
13+
IMAGE_TAG_PREFIX: $[format('1.0.{0:HHm}', pipeline.startTime)]
14+
15+
steps:
16+
- task: Docker@2
17+
displayName: Login to production ACR
18+
inputs:
19+
command: login
20+
containerRegistry: $(CONTAINER_REGISTRY_SERVICE_CONNECTION)
21+
22+
- task: Docker@2
23+
displayName: Login to dogfood ACR
24+
inputs:
25+
command: login
26+
containerRegistry: $(DOGFOOD_CONTAINER_REGISTRY_SERVICE_CONNECTION)
27+
28+
- task: CopyFiles@2
29+
inputs:
30+
SourceFolder: $(Build.SourcesDirectory)
31+
contents: .git/**
32+
targetFolder: $(Build.SourcesDirectory)/scripts/datacontainer
33+
34+
- task: Docker@2
35+
displayName: Build and Push
36+
inputs:
37+
command: buildAndPush
38+
Dockerfile: scripts/datacontainer/Dockerfile
39+
repository: $(CONTAINER_REGISTRY_REPOSITORY_NAME)
40+
tags: |
41+
latest

.github/CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
### *This is an outdated document. Please refer the new [wiki](https://github.com/Azure/adx-documentation-pr/wiki) for up to date details.*
1+
### *This is an outdated document. Please refer the new [wiki](https://github.com/Azure/azure-rest-api-specs/wiki) for up to date details.*
22
([`Link your GitHub account`](https://repos.opensource.microsoft.com/) to the 'Azure' organization for access.)
33

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 51 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,54 @@
1-
### Latest improvements:
21
<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.
3-
</i><br>
2+
</i>
3+
4+
### Changelog
5+
Please ensure to add changelog with this PR by answering the following questions.
6+
1. What's the purpose of the update?
7+
- [ ] new service onboarding
8+
- [ ] new API version
9+
- [ ] update existing version for new feature
10+
- [ ] update existing version to fix swagger quality issue in s360
11+
- [ ] Other, please clarify
12+
2. When you are targeting to deploy new service/feature to public regions? Please provide date, or month to public if date is not available yet.
13+
3. When you expect to publish swagger? Please provide date, or month to public if date is not available yet.
14+
4. If it's an update to existing version, please select SDKs of specific language and CLIs that require refresh after swagger is published.
15+
- [ ] SDK of .NET (need service team to ensure code readiness)
16+
- [ ] SDK of Python
17+
- [ ] SDK of Java
18+
- [ ] SDK of Js
19+
- [ ] SDK of Go
20+
- [ ] PowerShell
21+
- [ ] CLI
22+
- [ ] Terraform
23+
- [ ] No, no need to refresh for updates in this PR
24+
425
### Contribution checklist:
5-
- [ ] I have reviewed the [documentation](https://github.com/Azure/azure-rest-api-specs#basics) for the workflow.
6-
- [ ] [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.
7-
- [ ] The [OpenAPI Hub](https://aka.ms/openapiportal) was used for checking validation status and next steps.
26+
- [ ] I commit to follow the [Breaking Change Policy](http://aka.ms/bcforapi) of "no breaking changes"
27+
- [ ] I have reviewed the [documentation](https://aka.ms/ameonboard) for the workflow.
28+
- [ ] [Validation tools](https://aka.ms/swaggertools) were run on swagger spec(s) and errors have all been fixed in this PR. [How to fix?](https://aka.ms/ci-fix)
29+
30+
If any further question about AME onboarding or validation tools, please view the [FAQ](https://aka.ms/faqinprreview).
31+
832
### ARM API Review Checklist
9-
- [ ] Service team MUST add the "WaitForARMFeedback" label if the management plane API changes fall into one of the below categories.
10-
- adding/removing APIs.
11-
- adding/removing properties.
12-
- adding/removing API-version.
13-
- adding a new service in Azure.
14-
15-
Failure to comply may result in delays for manifest application. Note this does not apply to data plane APIs.
16-
- [ ] If you are blocked on ARM review and want to get the PR merged urgently, please get the ARM oncall for reviews (RP Manifest Approvers team under Azure Resource Manager service) from IcM and reach out to them.
17-
Please follow the link to find more details on [API review process](https://armwiki.azurewebsites.net/rp_onboarding/ResourceProviderOnboardingAPIRevieworkflow.html).
33+
- [ ] Ensure to check this box if one of the following scenarios meet updates in the PR, so that label “WaitForARMFeedback” will be added automatically to involve ARM API Review. Failure to comply may result in delays for manifest application. Note this does not apply to data plane APIs, all “removals” and “adding a new property” no more require ARM API review.
34+
- Adding new API(s)
35+
- Adding a new API version
36+
- [ ] Ensure to copy the existing version into new directory structure for first commit (including refactoring) and then push new changes including version updates in separate commits. This is required to review the changes efficiently.
37+
- Adding a new service
38+
39+
- [ ] Please ensure you've reviewed following [guidelines](https://aka.ms/rpguidelines) including [ARM resource provider contract](https://github.com/Azure/azure-resource-manager-rpc) and [REST guidelines](https://github.com/microsoft/api-guidelines/blob/vNext/azure/Guidelines.md). Estimated time (4 hours). This is required before you can request review from ARM API Review board.
40+
41+
- [ ] If you are blocked on ARM review and want to get the PR merged with urgency, please get the ARM oncall for reviews (*RP Manifest Approvers* team under <ins>Azure Resource Manager service</ins>) from IcM and reach out to them.
42+
43+
### Breaking Change Review Checklist
44+
If there are following updates in the PR, ensure to request an approval from Breaking Change Review Board as defined in the [Breaking Change Policy](http://aka.ms/bcforapi).
45+
46+
- [ ] Removing API(s) in stable version
47+
- [ ] Removing properties in stable version
48+
- [ ] Removing API version(s) in stable version
49+
- [ ] Updating API in stable or public preview version with Breaking Change Validation errors
50+
- [ ] Updating API(s) in public preview over 1 year (refer to [Retirement of Previews](https://dev.azure.com/msazure/AzureWiki/_wiki/wikis/AzureWiki.wiki/37683/Retirement-of-Previews))
51+
52+
**Action**: to initiate an evaluation of the breaking change, create a new intake using the [template for breaking changes](https://aka.ms/Breakingchangetemplate). Addition details on the process and office hours are on the [Breaking change Wiki](https://dev.azure.com/msazure/AzureWiki/_wiki/wikis/AzureWiki.wiki/37684/Breaking-Changes).
53+
54+
Please follow the link to find more details on [PR review process](https://aka.ms/SwaggerPRReview).

0 commit comments

Comments
 (0)