Skip to content

Commit

Permalink
Enable SDK Automation V2 in CI (Azure#7548)
Browse files Browse the repository at this point in the history
* Update config for SDK Automation

* Update registry name

* Update display name
  • Loading branch information
Phoenix He authored and AnuTalluri committed Dec 11, 2019
1 parent 3b3b3b0 commit 0b3da58
Show file tree
Hide file tree
Showing 3 changed files with 66 additions and 16 deletions.
55 changes: 55 additions & 0 deletions .azure-pipelines/SDKAutomation.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
trigger:
batch: false
branches:
include:
- master

jobs:
- job: "SDKAutomation"
displayName: SDK
pool:
vmImage: 'Ubuntu 18.04'
container:
image: azopenapi.azurecr.io/openapi/sdk-automation:prod
endpoint: azopenapi-registry
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
Go:
SDK_REPO_NAME: azure-sdk-for-go
steps:
- checkout: none
- script: printenv
displayName: Display ENV
- script: git config --global user.email "sdkautomation@microsoft.com" && git config --global user.name "SDK Automation"
displayName: Configure Git
- 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 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')
- script: sudo chown `id -ng`:`id -ng` . && 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
workingDirectory: /z
3 changes: 0 additions & 3 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
name: "Azure OpenAPI"

trigger: none

variables:
TRAVIS: 'true'
TRAVIS_BRANCH: $(System.PullRequest.TargetBranch)
Expand All @@ -19,6 +17,5 @@ jobs:
- template: .azure-pipelines/ModelValidation.yml
- template: .azure-pipelines/BreakingChange.yml
- template: .azure-pipelines/LintDiff.yml
- template: .azure-pipelines/SwaggerToSDK.yml
- template: .azure-pipelines/NetworkValidation.yml
- template: .azure-pipelines/Spellcheck.yml
24 changes: 11 additions & 13 deletions specificationRepositoryConfiguration.json
Original file line number Diff line number Diff line change
@@ -1,34 +1,32 @@
{
"$schema": "https://openapistorageprod.blob.core.windows.net/sdkautomation/prod/schemas/specificationRepositoryConfiguration.schema.json",
"pipelineName": "automation - sdk",
"sdkRepositoryMappings": {
"azure-sdk-for-go": {
"mainBranch": "latest",
"integrationBranchPrefix": "sdkAutomationProdTest",
"generationRepository": "AzureSDKAutomation/azure-sdk-for-go",
"integrationRepository": "AzureSDKAutomation/azure-sdk-for-go",
"mainRepository": "test-repo-billy/azure-sdk-for-go"
"mainRepository": "Azure/azure-sdk-for-go"
},
"azure-sdk-for-java": {
"generationRepository": "AzureSDKAutomation/azure-sdk-for-java",
"mainRepository": "test-repo-billy/azure-sdk-for-java"
"integrationRepository": "AzureSDKAutomation/azure-sdk-for-java",
"mainRepository": "Azure/azure-sdk-for-java"
},
"azure-sdk-for-js": {
"generationRepository": "AzureSDKAutomation/azure-sdk-for-js",
"mainRepository": "test-repo-billy/azure-sdk-for-js"
"integrationRepository": "AzureSDKAutomation/azure-sdk-for-js",
"mainRepository": "Azure/azure-sdk-for-js"
},
"azure-sdk-for-net": {
"generationRepository": "AzureSDKAutomation/azure-sdk-for-net",
"mainRepository": "test-repo-billy/azure-sdk-for-net"
"integrationRepository": "AzureSDKAutomation/azure-sdk-for-net",
"mainRepository": "Azure/azure-sdk-for-net"
},
"azure-sdk-for-python": {
"generationRepository": "AzureSDKAutomation/azure-sdk-for-python",
"integrationRepository": "AzureSDKAutomation/azure-sdk-for-python",
"mainRepository": "test-repo-billy/azure-sdk-for-python"
"mainRepository": "Azure/azure-sdk-for-python"
},
"azure-sdk-for-ruby": {
"mainBranch": "latest",
"generationRepository": "AzureSDKAutomation/azure-sdk-for-ruby",
"mainRepository": "test-repo-billy/azure-sdk-for-ruby"
"integrationRepository": "AzureSDKAutomation/azure-sdk-for-ruby",
"mainRepository": "Azure/azure-sdk-for-ruby"
}
}
}

0 comments on commit 0b3da58

Please sign in to comment.