Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
…into feature/text_analytics_v3.0

* 'master' of https://github.com/Azure/azure-sdk-for-python: (28 commits)
  Kaihuis maps (#11574)
  [formrecognizer] support Copy API (#11372)
  Artifact Powered Docs.MS Release (#11395)
  Sync eng/common directory with azure-sdk-tools repository (#11562)
  Updated changelog (#11554)
  update pinned versions in autorest_req.txt (#11557)
  Add user authentication API to UsernamePasswordCredential (#11528)
  Reduce Build Matrix (#11539)
  Prevent Key Vault test failure due to operation timing (#11552)
  update tests (#11534)
  Datashare 2019 11 01 (#11540)
  Search Renames / Regen (#11342)
  update unit test according to the latest uamqp update (#11533)
  Sync eng/common directory with azure-sdk-tools repository (#11472)
  rename input parameters (#11518)
  [cosmos] readme review feedback (#11527)
  Update CODEOWNERS (#11516)
  [Core] Support multipart changesets (#10972)
  fix AttributeException (#11463)
  release-for-hanaonazure-mgmt (#11441)
  ...
  • Loading branch information
iscai-msft committed May 21, 2020
2 parents 6ac0ed0 + b22a709 commit a38f5ef
Show file tree
Hide file tree
Showing 227 changed files with 13,463 additions and 7,958 deletions.
2 changes: 1 addition & 1 deletion .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

# Core
/sdk/core/ @lmazuel @xiangyan99 @johanste
/sdk/core/azure-core/ @xiangyan99 @bryevdv @lmazuel
/sdk/core/azure-core/ @xiangyan99 @lmazuel

# Service team
/sdk/identity/ @chlowell @schaabs
Expand Down
26 changes: 14 additions & 12 deletions common/smoketest/smoke-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,58 +9,58 @@ jobs:
PythonVersion: '2.7'
InstallAsyncRequirements: false
OSVmImage: ubuntu-18.04
CloudType: AzureCloud
SubscriptionConfiguration: $(sub-config-azure-cloud-test-resources)
ArmTemplateParameters: $(azureCloudArmParameters)
Python_37_Linux (AzureCloud):
PythonVersion: '3.7'
OSVmImage: ubuntu-18.04
CloudType: AzureCloud
SubscriptionConfiguration: $(sub-config-azure-cloud-test-resources)
ArmTemplateParameters: $(azureCloudArmParameters)
Python_38_Linux (AzureCloud):
PythonVersion: '3.8'
OSVmImage: ubuntu-18.04
CloudType: AzureCloud
SubscriptionConfiguration: $(sub-config-azure-cloud-test-resources)
ArmTemplateParameters: $(azureCloudArmParameters)
Python_37_Windows (AzureCloud):
PythonVersion: '3.7'
OSVmImage: windows-2019
CloudType: AzureCloud
SubscriptionConfiguration: $(sub-config-azure-cloud-test-resources)
ArmTemplateParameters: $(azureCloudArmParameters)
Python_38_Windows (AzureCloud):
PythonVersion: '3.8'
OSVmImage: windows-2019
CloudType: AzureCloud
SubscriptionConfiguration: $(sub-config-azure-cloud-test-resources)
ArmTemplateParameters: $(azureCloudArmParameters)
Python_37_Mac (AzureCloud):
PythonVersion: '3.7'
OSVmImage: macOS-10.15
CloudType: AzureCloud
SubscriptionConfiguration: $(sub-config-azure-cloud-test-resources)
ArmTemplateParameters: $(azureCloudArmParameters)
Python_38_Mac (AzureCloud):
PythonVersion: '3.8'
OSVmImage: macOS-10.15
CloudType: AzureCloud
SubscriptionConfiguration: $(sub-config-azure-cloud-test-resources)
ArmTemplateParameters: $(azureCloudArmParameters)
Python_38_Linux (AzureUSGovernment):
PythonVersion: '3.8'
OSVmImage: ubuntu-18.04
CloudType: AzureUSGovernment
SubscriptionConfiguration: $(sub-config-gov-test-resources)
ArmTemplateParameters: $(azureUSGovernmentArmParameters)
Python_37_Windows (AzureUSGovernment):
PythonVersion: '3.7'
OSVmImage: windows-2019
CloudType: AzureUSGovernment
SubscriptionConfiguration: $(sub-config-gov-test-resources)
ArmTemplateParameters: $(azureUSGovernmentArmParameters)
Python_38_Linux (AzureChinaCloud):
PythonVersion: '3.8'
OSVmImage: ubuntu-18.04
CloudType: AzureChinaCloud
SubscriptionConfiguration: $(sub-config-cn-test-resources)
Location: 'chinanorth'
ArmTemplateParameters: $(azureChinaCloudArmParameters)
Python_37_Windows (AzureChinaCloud):
PythonVersion: '3.7'
OSVmImage: windows-2019
CloudType: AzureChinaCloud
SubscriptionConfiguration: $(sub-config-cn-test-resources)
Location: 'chinanorth'
ArmTemplateParameters: $(azureChinaCloudArmParameters)

Expand Down Expand Up @@ -103,7 +103,7 @@ jobs:
- template: /eng/common/TestResources/deploy-test-resources.yml
parameters:
ServiceDirectory: '$(Build.SourcesDirectory)/common/smoketest/'
CloudType: $(CloudType)
SubscriptionConfiguration: $(SubscriptionConfiguration)
Location: $(Location)
ArmTemplateParameters: $(ArmTemplateParameters)

Expand All @@ -113,3 +113,5 @@ jobs:
- template: /eng/common/TestResources/remove-test-resources.yml
parameters:
ServiceDirectory: '$(Build.SourcesDirectory)/common/smoketest/'
SubscriptionConfiguration: $(SubscriptionConfiguration)

8 changes: 4 additions & 4 deletions eng/autorest_req.txt
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
pytest==5.4.1; python_version >= '3.5'
pytest==5.4.2; python_version >= '3.5'
pytest==4.6.9; python_version == '2.7'
pytest-cov==2.8.1
pytest-asyncio==0.10.0; python_version >= '3.5'
pytest-asyncio==0.12.0; python_version >= '3.5'
isodate==0.6.0
msrest==0.6.13
msrest==0.6.14
aiohttp==3.6.2
wheel
wheel==0.34.2
1 change: 1 addition & 0 deletions eng/common/TestResources/remove-test-resources.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,5 @@ steps:
-Force `
-Verbose
displayName: Remove test resources
condition: and(ne(variables['AZURE_RESOURCEGROUP_NAME'], ''), succeededOrFailed())
continueOnError: true
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,4 @@ steps:
PRTitle: "Docs.MS Readme Update."
BaseBranchName: smoke-test
WorkingDirectory: ${{parameters.WorkingDirectory}}/repo
ScriptDirectory: ${{parameters.WorkingDirectory}}/${{parameters.ScriptDirectory}}



ScriptDirectory: ${{parameters.WorkingDirectory}}/${{parameters.ScriptDirectory}}
12 changes: 6 additions & 6 deletions eng/common/scripts/artifact-metadata-parsing.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -358,7 +358,7 @@ function GetExistingTags($apiUrl) {
}

# Walk across all build artifacts, check them against the appropriate repository, return a list of tags/releases
function VerifyPackages($pkgRepository, $artifactLocation, $workingDirectory, $apiUrl, $releaseSha, $exitOnError = $True) {
function VerifyPackages($pkgRepository, $artifactLocation, $workingDirectory, $apiUrl, $releaseSha, $continueOnError = $false) {
$pkgList = [array]@()
$ParsePkgInfoFn = ""
$packagePattern = ""
Expand Down Expand Up @@ -404,7 +404,7 @@ function VerifyPackages($pkgRepository, $artifactLocation, $workingDirectory, $a
continue
}

if ($parsedPackage.Deployable -ne $True -and $exitOnError) {
if ($parsedPackage.Deployable -ne $True -and !$continueOnError) {
Write-Host "Package $($parsedPackage.PackageId) is marked with version $($parsedPackage.PackageVersion), the version $($parsedPackage.PackageVersion) has already been deployed to the target repository."
Write-Host "Maybe a pkg version wasn't updated properly?"
exit(1)
Expand All @@ -430,8 +430,8 @@ function VerifyPackages($pkgRepository, $artifactLocation, $workingDirectory, $a

$intersect = $results | % { $_.Tag } | ? { $existingTags -contains $_ }

if ($intersect.Length -gt 0 -and $exitOnError) {
CheckArtifactShaAgainstTagsList -priorExistingTagList $intersect -releaseSha $releaseSha -apiUrl $apiUrl -exitOnError $exitOnError
if ($intersect.Length -gt 0 -and !$continueOnError) {
CheckArtifactShaAgainstTagsList -priorExistingTagList $intersect -releaseSha $releaseSha -apiUrl $apiUrl -continueOnError $continueOnError

# all the tags are clean. remove them from the list of releases we will publish.
$results = $results | ? { -not ($intersect -contains $_.Tag ) }
Expand All @@ -443,7 +443,7 @@ function VerifyPackages($pkgRepository, $artifactLocation, $workingDirectory, $a
# given a set of tags that we want to release, we need to ensure that if they already DO exist.
# if they DO exist, quietly exit if the commit sha of the artifact matches that of the tag
# if the commit sha does not match, exit with error and report both problem shas
function CheckArtifactShaAgainstTagsList($priorExistingTagList, $releaseSha, $apiUrl, $exitOnError) {
function CheckArtifactShaAgainstTagsList($priorExistingTagList, $releaseSha, $apiUrl, $continueOnError) {
$headers = @{
"Content-Type" = "application/json"
"Authorization" = "token $($env:GH_TOKEN)"
Expand All @@ -465,7 +465,7 @@ function CheckArtifactShaAgainstTagsList($priorExistingTagList, $releaseSha, $ap
}
}

if ($unmatchedTags.Length -gt 0 -and $exitOnError) {
if ($unmatchedTags.Length -gt 0 -and !$continueOnError) {
Write-Host "Tags already existing with different SHA versions. Exiting."
exit(1)
}
Expand Down
4 changes: 2 additions & 2 deletions eng/common/scripts/create-tags-and-git-release.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ param (
$repoOwner = "", # the owning organization of the repository. EG "Azure"
$repoName = "", # the name of the repository. EG "azure-sdk-for-java"
$repoId = "$repoOwner/$repoName", # full repo id. EG azure/azure-sdk-for-net DevOps: $(Build.Repository.Id),
[switch]$forceCreate = $false
[switch]$continueOnError = $false
)

Write-Host "> $PSCommandPath $args"
Expand All @@ -26,7 +26,7 @@ $apiUrl = "https://api.github.com/repos/$repoId"
Write-Host "Using API URL $apiUrl"

# VERIFY PACKAGES
$pkgList = VerifyPackages -pkgRepository $packageRepository -artifactLocation $artifactLocation -workingDirectory $workingDirectory -apiUrl $apiUrl -releaseSha $releaseSha
$pkgList = VerifyPackages -pkgRepository $packageRepository -artifactLocation $artifactLocation -workingDirectory $workingDirectory -apiUrl $apiUrl -releaseSha $releaseSha -continueOnError $continueOnError

if ($pkgList) {
Write-Host "Given the visible artifacts, github releases will be created for the following:"
Expand Down
2 changes: 1 addition & 1 deletion eng/common/scripts/update-docs-metadata.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ $pkgs = VerifyPackages -pkgRepository $Repository `
-workingDirectory $WorkDirectory `
-apiUrl $apiUrl `
-releaseSha $ReleaseSHA `
-exitOnError $False
-continueOnError $True

if ($pkgs) {
Write-Host "Given the visible artifacts, readmes will be copied for the following packages"
Expand Down
51 changes: 1 addition & 50 deletions eng/pipelines/templates/jobs/archetype-sdk-client.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,18 +20,6 @@ parameters:
PythonVersion: '3.5'
CoverageArg: ''
RunForPR: false
Linux_Python36:
OSName: 'Linux'
OSVmImage: 'ubuntu-18.04'
PythonVersion: '3.6'
CoverageArg: ''
RunForPR: false
Linux_Python37:
OSName: 'Linux'
OSVmImage: 'ubuntu-18.04'
PythonVersion: '3.7'
CoverageArg: ''
RunForPR: false
Linux_Python38:
OSName: 'Linux'
OSVmImage: 'ubuntu-18.04'
Expand Down Expand Up @@ -90,6 +78,7 @@ jobs:
parameters:
ServiceDirectory: ${{ parameters.ServiceDirectory }}
BuildTargetingString: ${{ parameters.BuildTargetingString }}
TestMarkArgument: ${{ parameters.TestMarkArgument }}

- job: 'Test'
condition: and(succeededOrFailed(), ne(variables['Skip.Test'], 'true'))
Expand Down Expand Up @@ -146,44 +135,6 @@ jobs:
ServiceDirectory: ${{ parameters.ServiceDirectory }}
BuildTargetingString: ${{ parameters.BuildTargetingString }}

- job: 'RunMyPy'
condition: and(succeededOrFailed(), ne(variables['Skip.MyPy'], 'true'))
displayName: 'Run MyPy'
variables:
- template: ../variables/globals.yml

dependsOn:
- 'Build'

pool:
vmImage: 'ubuntu-18.04'

steps:
- template: ../steps/run_mypy.yml
parameters:
ServiceDirectory: ${{ parameters.ServiceDirectory }}
BuildTargetingString: ${{ parameters.BuildTargetingString }}
TestMarkArgument: ${{ parameters.TestMarkArgument }}

- job: 'RunPyLint'
condition: and(succeededOrFailed(), ne(variables['Skip.Pylint'], 'true'))
displayName: 'Run Pylint'
variables:
- template: ../variables/globals.yml

dependsOn:
- 'Build'

pool:
vmImage: 'ubuntu-18.04'

steps:
- template: ../steps/run_pylint.yml
parameters:
ServiceDirectory: ${{ parameters.ServiceDirectory }}
BuildTargetingString: ${{ parameters.BuildTargetingString }}
TestMarkArgument: ${{ parameters.TestMarkArgument }}

- job: 'RunRegression'
condition: and(succeededOrFailed(), or(eq(variables['Run.Regression'], 'true'), and(eq(variables['Build.Reason'], 'Schedule'), eq(variables['System.TeamProject'],'internal'))))
displayName: 'Run Regression'
Expand Down
85 changes: 62 additions & 23 deletions eng/pipelines/templates/stages/archetype-python-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ parameters:
DependsOn: Build
DocArtifact: 'documentation'
DevFeedName: public/azure-sdk-for-python
TargetDocRepoOwner: ''
TargetDocRepoName: ''

stages:
- ${{if and(eq(variables['Build.Reason'], 'Manual'), eq(variables['System.TeamProject'], 'internal'))}}:
Expand All @@ -26,15 +28,15 @@ stages:
deploy:
steps:
- checkout: self
- template: /eng/pipelines/templates/steps/stage-filtered-artifacts.yml
parameters:
SourceFolder: ${{parameters.ArtifactName}}
TargetFolder: ${{artifact.safeName}}
PackageName: ${{artifact.name}}
- pwsh: |
Get-ChildItem $(Pipeline.Workspace)/${{parameters.ArtifactName}}
New-Item -Type Directory -Name ${{artifact.safeName}} -Path $(Pipeline.Workspace)
$underscorePrefix = "${{artifact.name}}"
$dashPrefix = "${{artifact.name}}".Replace("_", "-")
Copy-Item $(Pipeline.Workspace)/${{parameters.ArtifactName}}/$dashPrefix-[0-9]*.[0-9]*.[0-9]* $(Pipeline.Workspace)/${{artifact.safeName}}
Copy-Item $(Pipeline.Workspace)/${{parameters.ArtifactName}}/$underscorePrefix-[0-9]*.[0-9]*.[0-9]* $(Pipeline.Workspace)/${{artifact.safeName}}
Get-ChildItem $(Pipeline.Workspace)/${{artifact.safeName}}
displayName: Stage artifacts
Get-ChildItem -Recurse $(Pipeline.Workspace)/${{artifact.safeName}}
workingDirectory: $(Pipeline.Workspace)
displayName: Output Visible Artifacts
- template: /eng/common/pipelines/templates/steps/create-tags-and-git-release.yml
parameters:
ArtifactLocation: $(Pipeline.Workspace)/${{artifact.safeName}}
Expand Down Expand Up @@ -62,14 +64,11 @@ stages:
artifact: ${{parameters.ArtifactName}}
timeoutInMinutes: 5

- pwsh: |
Get-ChildItem $(Pipeline.Workspace)/${{parameters.ArtifactName}}
New-Item -Type Directory -Name ${{artifact.safeName}} -Path $(Pipeline.Workspace)
$underscorePrefix = "${{artifact.name}}"
$dashPrefix = "${{artifact.name}}".Replace("_", "-")
Copy-Item $(Pipeline.Workspace)/${{parameters.ArtifactName}}/$dashPrefix-[0-9]*.[0-9]*.[0-9]* $(Pipeline.Workspace)/${{artifact.safeName}}
Copy-Item $(Pipeline.Workspace)/${{parameters.ArtifactName}}/$underscorePrefix-[0-9]*.[0-9]*.[0-9]* $(Pipeline.Workspace)/${{artifact.safeName}}
Get-ChildItem $(Pipeline.Workspace)/${{artifact.safeName}}
- template: /eng/pipelines/templates/steps/stage-filtered-artifacts.yml
parameters:
SourceFolder: ${{parameters.ArtifactName}}
TargetFolder: ${{artifact.safeName}}
PackageName: ${{artifact.name}}

- task: UsePythonVersion@0

Expand Down Expand Up @@ -105,7 +104,7 @@ stages:
displayName: 'Publish package to feed: ${{parameters.DevFeedName}}'
- ${{if ne(artifact.options.skipPublishDocs, 'true')}}:
- deployment: PublishDocs
- deployment: PublishGitHubIODocs
displayName: Publish Docs to GitHubIO Blob Storage
condition: and(succeeded(), ne(variables['Skip.PublishDocs'], 'true'))
environment: githubio
Expand All @@ -119,12 +118,12 @@ stages:
deploy:
steps:
- checkout: self
- pwsh: |
Get-ChildItem $(Pipeline.Workspace)/${{parameters.DocArtifact}}
New-Item -Type Directory -Name ${{artifact.safeName}} -Path $(Pipeline.Workspace)
$dashPrefix = "${{artifact.name}}".Replace("_", "-")
Copy-Item $(Pipeline.Workspace)/${{parameters.DocArtifact}}/$dashPrefix.zip $(Pipeline.Workspace)/${{artifact.safeName}}
displayName: Stage artifacts
- template: /eng/pipelines/templates/steps/stage-filtered-artifacts.yml
parameters:
SourceFolder: ${{parameters.DocArtifact}}
TargetFolder: ${{artifact.safeName}}
PackageName: ${{artifact.name}}
AdditionalRegex: '.zip'
- pwsh: |
Get-ChildItem -Recurse $(Pipeline.Workspace)/${{artifact.safeName}}
workingDirectory: $(Pipeline.Workspace)
Expand All @@ -138,6 +137,46 @@ stages:
# we override the regular script path because we have cloned the build tools repo as a separate artifact.
ScriptPath: 'eng/common/scripts/copy-docs-to-blobstorage.ps1'

- ${{if ne(artifact.options.skipPublishDocs, 'true')}}:
- deployment: PublishDocs
displayName: "Docs.MS Release"
condition: and(succeeded(), ne(variables['Skip.PublishDocs'], 'true'))
environment: githubio
dependsOn: PublishPackage

pool:
vmImage: ubuntu-18.04

strategy:
runOnce:
deploy:
steps:
- checkout: self
- template: /eng/pipelines/templates/steps/stage-filtered-artifacts.yml
parameters:
SourceFolder: ${{parameters.ArtifactName}}
TargetFolder: ${{artifact.safeName}}
PackageName: ${{artifact.name}}
- pwsh: |
Get-ChildItem -Recurse $(Pipeline.Workspace)/${{artifact.safeName}}
workingDirectory: $(Pipeline.Workspace)
displayName: Output Visible Artifacts
- template: /eng/common/pipelines/templates/steps/docs-metadata-release.yml
parameters:
ArtifactLocation: $(Pipeline.Workspace)/${{artifact.safeName}}
PackageRepository: PyPI
ReleaseSha: $(Build.SourceVersion)
RepoId: Azure/azure-sdk-for-python
WorkingDirectory: $(System.DefaultWorkingDirectory)
TargetDocRepo: 'MicrosoftDocs/azure-docs-sdk-python'
TargetDocRepoOwner: ${{parameters.TargetDocRepoOwner}}
TargetDocRepoName: ${{parameters.TargetDocRepoName}}
PRBranchName: 'smoke-test-rdme'
ArtifactName: ${{parameters.ArtifactName}}
Language: 'python'
ServiceDirectory: ${{ parameters.ServiceDirectory }}
DocRepoDestinationPath: 'docs-ref-services/'

- ${{if ne(artifact.options.skipUpdatePackageVersion, 'true')}}:
- deployment: UpdatePackageVersion
displayName: "Update Package Version"
Expand Down
Loading

0 comments on commit a38f5ef

Please sign in to comment.