forked from Azure/azure-sdk-for-python
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' of https://github.com/Azure/azure-sdk-for-python …
…into new_polling * 'master' of https://github.com/Azure/azure-sdk-for-python: (68 commits) Pin Deps in "TestOldest" Regression (Azure#14316) Sync eng/common directory with azure-sdk-tools for PR 1052 (Azure#14232) [Storage][FileShare]Regenerate code for file tier (Azure#14302) [ServiceBus] ServiceBus Operation Timeout Support (Azure#13854) Increment package version after release of azure_data_tables (Azure#14309) Increment version for textanalytics releases (Azure#14295) [formrecognizer] add locale to receipt samples (Azure#14292) [form recognizer] add sample business cards to test forms (Azure#14303) add back code (Azure#14289) update release date (Azure#14291) Increment version for search releases (Azure#14290) Update Changelog for communication packages (Azure#14268) Changelog for azure-identity 1.5.0b2 (Azure#14288) [text analytics] changelog add release date, fix wording (Azure#14286) Computer Vision 0.7.0 release (Azure#14269) SetDevVersion Is Triggering Oddly (Azure#14261) Revise get_token docs (Azure#14263) Increment version for servicebus releases (Azure#14265) redo the dep update (Azure#14264) [EventGrid] Prepare for beta3 release (Azure#14262) ...
- Loading branch information
Showing
1,081 changed files
with
130,060 additions
and
18,059 deletions.
There are no files selected for viewing
Validating CODEOWNERS rules …
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
[CmdletBinding(SupportsShouldProcess = $true)] | ||
param( | ||
[Parameter(Mandatory = $true)] | ||
[string]$RepoOwner, | ||
|
||
[Parameter(Mandatory = $true)] | ||
[string]$RepoName, | ||
|
||
[Parameter(Mandatory = $true)] | ||
[string]$IssueNumber, | ||
|
||
[Parameter(Mandatory = $false)] | ||
[string]$CommentPrefix, | ||
|
||
[Parameter(Mandatory = $true)] | ||
[string]$Comment, | ||
|
||
[Parameter(Mandatory = $false)] | ||
[string]$CommentPostFix, | ||
|
||
[Parameter(Mandatory = $true)] | ||
[string]$AuthToken | ||
) | ||
|
||
. "${PSScriptRoot}\logging.ps1" | ||
|
||
$headers = @{ | ||
Authorization = "bearer $AuthToken" | ||
} | ||
|
||
$apiUrl = "https://api.github.com/repos/$RepoOwner/$RepoName/issues/$IssueNumber/comments" | ||
|
||
$commentPrefixValue = [System.Environment]::GetEnvironmentVariable($CommentPrefix) | ||
$commentValue = [System.Environment]::GetEnvironmentVariable($Comment) | ||
$commentPostFixValue = [System.Environment]::GetEnvironmentVariable($CommentPostFix) | ||
|
||
if (!$commentPrefixValue) { $commentPrefixValue = $CommentPrefix } | ||
if (!$commentValue) { $commentValue = $Comment } | ||
if (!$commentPostFixValue) { $commentPostFixValue = $CommentPostFix } | ||
|
||
$PRComment = "$commentPrefixValue $commentValue $commentPostFixValue" | ||
|
||
$data = @{ | ||
body = $PRComment | ||
} | ||
|
||
try { | ||
$resp = Invoke-RestMethod -Method POST -Headers $headers -Uri $apiUrl -Body ($data | ConvertTo-Json) | ||
} | ||
catch { | ||
LogError "Invoke-RestMethod [ $apiUrl ] failed with exception:`n$_" | ||
exit 1 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
<# | ||
.SYNOPSIS | ||
Uploads the release asset and returns the resulting object from the upload | ||
.PARAMETER ReleaseTag | ||
Tag to look up release | ||
.PARAMETER AssetPath | ||
Location of the asset file to upload | ||
.PARAMETER GitHubRepo | ||
Name of the GitHub repo to search (of the form Azure/azure-sdk-for-cpp) | ||
#> | ||
|
||
param ( | ||
[Parameter(Mandatory = $true)] | ||
[ValidateNotNullOrEmpty()] | ||
[string] $ReleaseTag, | ||
|
||
[Parameter(Mandatory = $true)] | ||
[ValidateNotNullOrEmpty()] | ||
[string] $AssetPath, | ||
|
||
[Parameter(Mandatory = $true)] | ||
[ValidateNotNullOrEmpty()] | ||
[string] $GitHubRepo, | ||
|
||
[Parameter(Mandatory = $true)] | ||
[ValidateNotNullOrEmpty()] | ||
[string] $GitHubPat | ||
) | ||
|
||
# Get information about release at $ReleaseTag | ||
$releaseInfoUrl = "https://api.github.com/repos/$GitHubRepo/releases/tags/$ReleaseTag" | ||
Write-Verbose "Requesting release info from $releaseInfoUrl" | ||
$release = Invoke-RestMethod ` | ||
-Uri $releaseInfoUrl ` | ||
-Method GET | ||
|
||
$assetFilename = Split-Path $AssetPath -Leaf | ||
|
||
# Upload URL comes in the literal form (yes, those curly braces) of: | ||
# https://uploads.github.com/repos/Azure/azure-sdk-for-cpp/releases/123/assets{?name,label} | ||
# Converts to something like: | ||
# https://uploads.github.com/repos/Azure/azure-sdk-for-cpp/releases/123/assets?name=foo.tar.gz | ||
# Docs: https://docs.github.com/en/rest/reference/repos#get-a-release-by-tag-name | ||
$uploadUrl = $release.upload_url.Split('{')[0] + "?name=$assetFilename" | ||
|
||
Write-Verbose "Uploading $assetFilename to $uploadUrl" | ||
|
||
$asset = Invoke-RestMethod ` | ||
-Uri $uploadUrl ` | ||
-Method POST ` | ||
-InFile $AssetPath ` | ||
-Credential $credentials ` | ||
-Headers @{ Authorization = "token $GitHubPat" } ` | ||
-ContentType "application/gzip" | ||
|
||
Write-Verbose "Upload complete. Browser download URL: $($asset.browser_download_url)" | ||
|
||
return $asset |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
[CmdletBinding(SupportsShouldProcess = $true)] | ||
param( | ||
[Parameter(Mandatory = $true)] | ||
[string]$Organization, | ||
|
||
[Parameter(Mandatory = $true)] | ||
[string]$Project, | ||
|
||
[Parameter(Mandatory = $true)] | ||
[string]$SourceBranch, | ||
|
||
[Parameter(Mandatory = $true)] | ||
[int]$DefinitionId, | ||
|
||
[Parameter(Mandatory = $false)] | ||
[string]$VsoQueuedPipelines, | ||
|
||
[Parameter(Mandatory = $true)] | ||
[string]$AuthToken | ||
) | ||
|
||
. "${PSScriptRoot}\logging.ps1" | ||
|
||
$headers = @{ | ||
Authorization = "Basic $AuthToken" | ||
} | ||
|
||
$apiUrl = "https://dev.azure.com/$Organization/$Project/_apis/build/builds?api-version=6.0" | ||
|
||
$body = @{ | ||
sourceBranch = $SourceBranch | ||
definition = @{ id = $DefinitionId } | ||
} | ||
|
||
Write-Verbose ($body | ConvertTo-Json) | ||
|
||
try { | ||
$resp = Invoke-RestMethod -Method POST -Headers $headers $apiUrl -Body ($body | ConvertTo-Json) -ContentType application/json | ||
} | ||
catch { | ||
LogError "Invoke-RestMethod [ $apiUrl ] failed with exception:`n$_" | ||
exit 1 | ||
} | ||
|
||
LogDebug "Pipeline [ $($resp.definition.name) ] queued at [ $($resp._links.web.href) ]" | ||
|
||
if ($VsoQueuedPipelines) { | ||
$enVarValue = [System.Environment]::GetEnvironmentVariable($VsoQueuedPipelines) | ||
$QueuedPipelineLinks = if ($enVarValue) { | ||
"$enVarValue<br>[$($resp.definition.name)]($($resp._links.web.href))" | ||
}else { | ||
"[$($resp.definition.name)]($($resp._links.web.href))" | ||
} | ||
$QueuedPipelineLinks | ||
Write-Host "##vso[task.setvariable variable=$VsoQueuedPipelines]$QueuedPipelineLinks" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -25,7 +25,10 @@ param( | |
[string] $GitUrl, | ||
|
||
[Parameter(Mandatory = $false)] | ||
[string] $PushArgs = "" | ||
[string] $PushArgs = "", | ||
|
||
[Parameter(Mandatory = $false)] | ||
[boolean] $SkipCommit = $false | ||
) | ||
|
||
# This is necessay because of the janky git command output writing to stderr. | ||
|
@@ -57,12 +60,17 @@ if ($LASTEXITCODE -ne 0) | |
exit $LASTEXITCODE | ||
} | ||
|
||
Write-Host "git -c user.name=`"azure-sdk`" -c user.email=`"[email protected]`" commit -am `"$($CommitMsg)`"" | ||
git -c user.name="azure-sdk" -c user.email="[email protected]" commit -am "$($CommitMsg)" | ||
if ($LASTEXITCODE -ne 0) | ||
{ | ||
Write-Error "Unable to add files and create commit LASTEXITCODE=$($LASTEXITCODE), see command output above." | ||
exit $LASTEXITCODE | ||
if (!$SkipCommit) { | ||
Write-Host "git -c user.name=`"azure-sdk`" -c user.email=`"[email protected]`" commit -am `"$($CommitMsg)`"" | ||
git -c user.name="azure-sdk" -c user.email="[email protected]" commit -am "$($CommitMsg)" | ||
if ($LASTEXITCODE -ne 0) | ||
{ | ||
Write-Error "Unable to add files and create commit LASTEXITCODE=$($LASTEXITCODE), see command output above." | ||
exit $LASTEXITCODE | ||
} | ||
} | ||
else { | ||
Write-Host "Skipped applying commit" | ||
} | ||
|
||
# The number of retries can be increased if necessary. In theory, the number of retries | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
https://docs.microsoft.com/python/api/overview/azure/{{package_doc_id}} | ||
https://docs.microsoft.com/python/api/overview/azure/{{package_doc_id}} | ||
https://pypi.org/project/azure-servicebus/7.0.0b7/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.