Skip to content

Commit

Permalink
Update AutoRest C# version (Azure#14407)
Browse files Browse the repository at this point in the history
  • Loading branch information
azure-sdk authored Aug 25, 2020
1 parent 19d3705 commit 4e3bbea
Show file tree
Hide file tree
Showing 572 changed files with 72,439 additions and 58,008 deletions.
9 changes: 8 additions & 1 deletion eng/CodeGeneration.targets
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<PropertyGroup>
<_AutoRestVersion>https://github.com/Azure/autorest/releases/download/autorest-3.0.6236/autorest-3.0.6236.tgz</_AutoRestVersion>
<_AutoRestCoreVersion>3.0.6306</_AutoRestCoreVersion>
<_AutoRestCSharpVersion>https://github.com/Azure/autorest.csharp/releases/download/3.0.0-dev.20200811.1/autorest-csharp-v3-3.0.0-dev.20200811.1.tgz</_AutoRestCSharpVersion>
<_AutoRestCSharpVersion>https://github.com/Azure/autorest.csharp/releases/download/3.0.0-dev.20200825.1/autorest-csharp-v3-3.0.0-dev.20200825.1.tgz</_AutoRestCSharpVersion>
<_SupportsCodeGeneration Condition="'$(IsClientLibrary)' == 'true'">true</_SupportsCodeGeneration>
<_DefaultInputName Condition="Exists('$(MSBuildProjectDirectory)/autorest.md')">$(MSBuildProjectDirectory)/autorest.md</_DefaultInputName>
<AutoRestInput Condition="'$(AutoRestInput)' == ''">$(_DefaultInputName)</AutoRestInput>
Expand All @@ -18,6 +18,12 @@
<_GenerateCode Condition="'$(_SupportsCodeGeneration)' == 'true' AND '$(AutoRestInput)' != ''">true</_GenerateCode>
</PropertyGroup>

<PropertyGroup>
<_AutoRestVersion Condition="'$(TemporaryUsePreviousGeneratorVersion)' == 'true'">https://github.com/Azure/autorest/releases/download/autorest-3.0.6236/autorest-3.0.6236.tgz</_AutoRestVersion>
<_AutoRestCoreVersion Condition="'$(TemporaryUsePreviousGeneratorVersion)' == 'true'">3.0.6306</_AutoRestCoreVersion>
<_AutoRestCSharpVersion Condition="'$(TemporaryUsePreviousGeneratorVersion)' == 'true'">https://github.com/Azure/autorest.csharp/releases/download/3.0.0-dev.20200811.1/autorest-csharp-v3-3.0.0-dev.20200811.1.tgz</_AutoRestCSharpVersion>
</PropertyGroup>

<Target Name="GenerateCode" Condition="'$(_GenerateCode)' == 'true'" >
<ReadLinesFromFile File="$(AutoRestInput)">
<Output TaskParameter="Lines" ItemName="AutoRestInputLines"/>
Expand Down Expand Up @@ -50,3 +56,4 @@




42 changes: 37 additions & 5 deletions eng/scripts/Download-DevOpsRecordings.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,35 @@
.\eng\scripts\Download-DevOpsRecordings.ps1 14153
#>
[CmdletBinding()]
param ([Parameter(Mandatory=$True)][int] $PR, [switch] $NoWait = $false)
param (
[Parameter(Mandatory=$True)][int] $PR,
[Parameter(ValueFromRemainingArguments=$true)][string[]]$SDKs,
[switch] $NoWait = $false)

$repoRoot = Resolve-Path "$PSScriptRoot/../..";
$artifactsPath = Join-Path $repoRoot "artifacts"
$commonParameter = @("--organization", "https://dev.azure.com/azure-sdk", "--project", "internal", "-o", "json", "--only-show-errors")

$token = (az account get-access-token --resource=https://management.core.windows.net/ -o json | ConvertFrom-Json).accessToken

function SkipBuild($build)
{
if (!$SDKs)
{
return $false;
}

foreach ($sdk in $SDKs)
{
if ($build.definition.name -eq "net - $sdk - tests")
{
return $false;
}
}

return $true;
}

Write-Host "Processing builds for PR $PR"

if ($NoWait)
Expand All @@ -36,11 +57,20 @@ else

foreach ($build in $builds)
{
if (SkipBuild($build)) { continue; }
if ($build.status -ne "completed")
{
Write-Host "Waiting for '$($build.definition.name)' ($($build.status)) to finish - https://dev.azure.com/azure-sdk/internal/_build/results?buildId=$($build.id)"
Write-Host "Waiting for '$($build.definition.name)' ($($build.status)) to finish - https://dev.azure.com/azure-sdk/internal/_build/results?buildId=$($build.id)" -ForegroundColor Blue
$allCompleted = $false;
}
elseif ($build.result -eq "succeeded")
{
Write-Host "Completed '$($build.definition.name)' ($($build.result)) - https://dev.azure.com/azure-sdk/internal/_build/results?buildId=$($build.id)" -ForegroundColor Green
}
else
{
Write-Warning "Non-successful '$($build.definition.name)' ($($build.result)) - https://dev.azure.com/azure-sdk/internal/_build/results?buildId=$($build.id)"
}
}

if (!$allCompleted)
Expand All @@ -56,6 +86,7 @@ $ProcessedDefinitions = @();

foreach ($build in $builds)
{
if (SkipBuild($build)) { continue; }
$definitionName = $build.definition.name;
if ($ProcessedDefinitions -contains $definitionName)
{
Expand All @@ -76,9 +107,10 @@ foreach ($build in $builds)
Write-Host "Downloading artifact $downloadUrl to '$destination'"
Invoke-WebRequest -Uri $downloadUrl -OutFile $destination -Headers @{Authorization="Bearer $token"}
Expand-Archive -Path $destination -DestinationPath $artifactsPath -Force

$sessionRecordsPaths = Join-Path $artifactsPath "SessionRecords" "sdk"
Copy-Item -Path $sessionRecordsPaths -Filter "*.json" -Recurse -Destination $repoRoot -Container -Force
Remove-Item $sessionRecordsPaths -Recurse -Force
}
}
}

$sessionRecordsPaths = Join-Path $artifactsPath "SessionRecords" "sdk"
Copy-Item -Path $sessionRecordsPaths -Filter "*.json" -Recurse -Destination $repoRoot -Container -Force
29 changes: 14 additions & 15 deletions eng/scripts/Start-DevOpsRecordings.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -22,26 +22,25 @@ param (
$invokeParameter = @("--organization", "https://dev.azure.com/azure-sdk", "-o", "json", "--only-show-errors")
$commonParameters = $invokeParameter + @( "--project", "internal")

if (!$NoCancel)
{
$builds = az pipelines runs list @commonParameters --tags Recording --branch "refs/pull/$PR/merge" --query-order FinishTimeDesc | ConvertFrom-Json;

$cancelPatchFile = New-TemporaryFile;
"{`"status`": `"Cancelling`"}" > $cancelPatchFile;
$builds = az pipelines runs list @commonParameters --tags Recording --branch "refs/pull/$PR/merge" --query-order FinishTimeDesc | ConvertFrom-Json;
$cancelPatchFile = New-TemporaryFile;
"{`"status`": `"Cancelling`"}" > $cancelPatchFile;

foreach ($build in $builds)
foreach ($sdk in $SDKs)
{
$pipeline = "net - $sdk - tests";
if (!$NoCancel)
{
if ($build.status -ne "completed")
foreach ($build in $builds)
{
Write-Warning "Cancelling existing recording run '$($build.definition.name)' before we start recordings - https://dev.azure.com/azure-sdk/internal/_build/results?buildId=$($build.id)"
az devops invoke @invokeParameter --area build --resource builds --route-parameters "buildId=$($build.id)" project=internal --in-file $cancelPatchFile --http-method patch > $null;
if (($build.status -ne "completed") -and ($build.definition.name -eq $pipeline))
{
Write-Warning "Cancelling existing recording run '$($build.definition.name)' before we start recordings - https://dev.azure.com/azure-sdk/internal/_build/results?buildId=$($build.id)"
az devops invoke @invokeParameter --area build --resource builds --route-parameters "buildId=$($build.id)" project=internal --in-file $cancelPatchFile --http-method patch > $null;
}
}

}
}

foreach ($sdk in $SDKs)
{
$pipeline = "net - $sdk - tests";
Write-Host "Starting pipeline '$pipeline' for PR $PR"
$build = az pipelines run --name $pipeline @commonParameters --branch "refs/pull/$PR/merge" --variables Record=true | ConvertFrom-Json;
az pipelines runs tag add @commonParameters --run-id $build.id --tags Recording > $null;
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 4e3bbea

Please sign in to comment.