Skip to content

Commit

Permalink
Merge pull request #3 from jitterbit/feature/JIT-96177
Browse files Browse the repository at this point in the history
JIT-96177: Update to AspNetCore 6.0.25.
  • Loading branch information
jb-preston-jennings committed Dec 22, 2023
2 parents 06bce6c + f77aae4 commit 05f7886
Show file tree
Hide file tree
Showing 128 changed files with 13,972 additions and 5,116 deletions.
6 changes: 4 additions & 2 deletions NuGet.config
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
<clear />
<!--Begin: Package sources managed by Dependency Flow automation. Do not edit the sources below.-->
<!-- Begin: Package sources from dotnet-runtime -->
<add key="darc-pub-dotnet-runtime-e37fab9" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/darc-pub-dotnet-runtime-e37fab9f/nuget/v3/index.json" />
<add key="darc-int-dotnet-runtime-492abbe" value="https://pkgs.dev.azure.com/dnceng/internal/_packaging/darc-int-dotnet-runtime-492abbee/nuget/v3/index.json" />
<!-- End: Package sources from dotnet-runtime -->
<!-- Begin: Package sources from dotnet-efcore -->
<add key="darc-pub-dotnet-efcore-6c0296b" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/darc-pub-dotnet-efcore-6c0296b5/nuget/v3/index.json" />
<add key="darc-int-dotnet-efcore-ebac228" value="https://pkgs.dev.azure.com/dnceng/internal/_packaging/darc-int-dotnet-efcore-ebac2284/nuget/v3/index.json" />
<!-- End: Package sources from dotnet-efcore -->
<!--End: Package sources managed by Dependency Flow automation. Do not edit the sources above.-->
<add key="dotnet-eng" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-eng/nuget/v3/index.json" />
Expand All @@ -25,8 +25,10 @@
<clear />
<!--Begin: Package sources managed by Dependency Flow automation. Do not edit the sources below.-->
<!-- Begin: Package sources from dotnet-efcore -->
<add key="darc-int-dotnet-efcore-ebac228" value="true" />
<!-- End: Package sources from dotnet-efcore -->
<!-- Begin: Package sources from dotnet-runtime -->
<add key="darc-int-dotnet-runtime-492abbe" value="true" />
<!-- End: Package sources from dotnet-runtime -->
<!--End: Package sources managed by Dependency Flow automation. Do not edit the sources above.-->
</disabledPackageSources>
Expand Down
498 changes: 249 additions & 249 deletions eng/Baseline.Designer.props

Large diffs are not rendered by default.

214 changes: 107 additions & 107 deletions eng/Baseline.xml

Large diffs are not rendered by default.

84 changes: 42 additions & 42 deletions eng/Version.Details.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,37 +9,37 @@
-->
<Dependencies>
<ProductDependencies>
<Dependency Name="dotnet-ef" Version="6.0.19">
<Dependency Name="dotnet-ef" Version="6.0.25">
<Uri>https://dev.azure.com/dnceng/internal/_git/dotnet-efcore</Uri>
<Sha>6c0296b50a5af5aa6483b0b3ba89819fb0550c63</Sha>
<Sha>ebac2284d2825218fa91c188a3f428f244aa6fe3</Sha>
</Dependency>
<Dependency Name="Microsoft.EntityFrameworkCore.InMemory" Version="6.0.19">
<Dependency Name="Microsoft.EntityFrameworkCore.InMemory" Version="6.0.25">
<Uri>https://dev.azure.com/dnceng/internal/_git/dotnet-efcore</Uri>
<Sha>6c0296b50a5af5aa6483b0b3ba89819fb0550c63</Sha>
<Sha>ebac2284d2825218fa91c188a3f428f244aa6fe3</Sha>
</Dependency>
<Dependency Name="Microsoft.EntityFrameworkCore.Relational" Version="6.0.19">
<Dependency Name="Microsoft.EntityFrameworkCore.Relational" Version="6.0.25">
<Uri>https://dev.azure.com/dnceng/internal/_git/dotnet-efcore</Uri>
<Sha>6c0296b50a5af5aa6483b0b3ba89819fb0550c63</Sha>
<Sha>ebac2284d2825218fa91c188a3f428f244aa6fe3</Sha>
</Dependency>
<Dependency Name="Microsoft.EntityFrameworkCore.Sqlite" Version="6.0.19">
<Dependency Name="Microsoft.EntityFrameworkCore.Sqlite" Version="6.0.25">
<Uri>https://dev.azure.com/dnceng/internal/_git/dotnet-efcore</Uri>
<Sha>6c0296b50a5af5aa6483b0b3ba89819fb0550c63</Sha>
<Sha>ebac2284d2825218fa91c188a3f428f244aa6fe3</Sha>
</Dependency>
<Dependency Name="Microsoft.EntityFrameworkCore.SqlServer" Version="6.0.19">
<Dependency Name="Microsoft.EntityFrameworkCore.SqlServer" Version="6.0.25">
<Uri>https://dev.azure.com/dnceng/internal/_git/dotnet-efcore</Uri>
<Sha>6c0296b50a5af5aa6483b0b3ba89819fb0550c63</Sha>
<Sha>ebac2284d2825218fa91c188a3f428f244aa6fe3</Sha>
</Dependency>
<Dependency Name="Microsoft.EntityFrameworkCore.Tools" Version="6.0.19">
<Dependency Name="Microsoft.EntityFrameworkCore.Tools" Version="6.0.25">
<Uri>https://dev.azure.com/dnceng/internal/_git/dotnet-efcore</Uri>
<Sha>6c0296b50a5af5aa6483b0b3ba89819fb0550c63</Sha>
<Sha>ebac2284d2825218fa91c188a3f428f244aa6fe3</Sha>
</Dependency>
<Dependency Name="Microsoft.EntityFrameworkCore" Version="6.0.19">
<Dependency Name="Microsoft.EntityFrameworkCore" Version="6.0.25">
<Uri>https://dev.azure.com/dnceng/internal/_git/dotnet-efcore</Uri>
<Sha>6c0296b50a5af5aa6483b0b3ba89819fb0550c63</Sha>
<Sha>ebac2284d2825218fa91c188a3f428f244aa6fe3</Sha>
</Dependency>
<Dependency Name="Microsoft.EntityFrameworkCore.Design" Version="6.0.19">
<Dependency Name="Microsoft.EntityFrameworkCore.Design" Version="6.0.25">
<Uri>https://dev.azure.com/dnceng/internal/_git/dotnet-efcore</Uri>
<Sha>6c0296b50a5af5aa6483b0b3ba89819fb0550c63</Sha>
<Sha>ebac2284d2825218fa91c188a3f428f244aa6fe3</Sha>
</Dependency>
<Dependency Name="Microsoft.Extensions.Caching.Abstractions" Version="6.0.0">
<Uri>https://github.com/dotnet/runtime</Uri>
Expand Down Expand Up @@ -177,9 +177,9 @@
<Uri>https://github.com/dotnet/runtime</Uri>
<Sha>4822e3c3aa77eb82b2fb33c9321f923cf11ddde6</Sha>
</Dependency>
<Dependency Name="Microsoft.Internal.Runtime.AspNetCore.Transport" Version="6.0.19-servicing.23318.6">
<Dependency Name="Microsoft.Internal.Runtime.AspNetCore.Transport" Version="6.0.25-servicing.23519.12">
<Uri>https://dev.azure.com/dnceng/internal/_git/dotnet-runtime</Uri>
<Sha>e37fab9fc9f7bce120a7165491ed392a73f8ab51</Sha>
<Sha>492abbeef0d8a6ea902ac8f90ed339c7b1d18bf4</Sha>
</Dependency>
<Dependency Name="System.Diagnostics.DiagnosticSource" Version="6.0.1">
<Uri>https://dev.azure.com/dnceng/internal/_git/dotnet-runtime</Uri>
Expand Down Expand Up @@ -233,9 +233,9 @@
<Uri>https://github.com/dotnet/runtime</Uri>
<Sha>4822e3c3aa77eb82b2fb33c9321f923cf11ddde6</Sha>
</Dependency>
<Dependency Name="System.Text.Json" Version="6.0.8">
<Dependency Name="System.Text.Json" Version="6.0.9">
<Uri>https://dev.azure.com/dnceng/internal/_git/dotnet-runtime</Uri>
<Sha>c76ac565499f3e7c657126d46c00b67a0d74832c</Sha>
<Sha>492abbeef0d8a6ea902ac8f90ed339c7b1d18bf4</Sha>
</Dependency>
<Dependency Name="System.Threading.Channels" Version="6.0.0">
<Uri>https://github.com/dotnet/runtime</Uri>
Expand All @@ -245,57 +245,57 @@
<Uri>https://github.com/dotnet/runtime</Uri>
<Sha>4822e3c3aa77eb82b2fb33c9321f923cf11ddde6</Sha>
</Dependency>
<Dependency Name="Microsoft.NETCore.App.Ref" Version="6.0.19">
<Dependency Name="Microsoft.NETCore.App.Ref" Version="6.0.25">
<Uri>https://dev.azure.com/dnceng/internal/_git/dotnet-runtime</Uri>
<Sha>e37fab9fc9f7bce120a7165491ed392a73f8ab51</Sha>
<Sha>492abbeef0d8a6ea902ac8f90ed339c7b1d18bf4</Sha>
</Dependency>
<Dependency Name="Microsoft.NET.Runtime.MonoAOTCompiler.Task" Version="6.0.19">
<Dependency Name="Microsoft.NET.Runtime.MonoAOTCompiler.Task" Version="6.0.25">
<Uri>https://dev.azure.com/dnceng/internal/_git/dotnet-runtime</Uri>
<Sha>e37fab9fc9f7bce120a7165491ed392a73f8ab51</Sha>
<Sha>492abbeef0d8a6ea902ac8f90ed339c7b1d18bf4</Sha>
</Dependency>
<Dependency Name="Microsoft.NET.Runtime.WebAssembly.Sdk" Version="6.0.19">
<Dependency Name="Microsoft.NET.Runtime.WebAssembly.Sdk" Version="6.0.25">
<Uri>https://dev.azure.com/dnceng/internal/_git/dotnet-runtime</Uri>
<Sha>e37fab9fc9f7bce120a7165491ed392a73f8ab51</Sha>
<Sha>492abbeef0d8a6ea902ac8f90ed339c7b1d18bf4</Sha>
</Dependency>
<!--
Win-x64 is used here because we have picked an arbitrary runtime identifier to flow the version of the latest NETCore.App runtime.
All Runtime.$rid packages should have the same version.
-->
<Dependency Name="Microsoft.NETCore.App.Runtime.win-x64" Version="6.0.19">
<Dependency Name="Microsoft.NETCore.App.Runtime.win-x64" Version="6.0.25">
<Uri>https://dev.azure.com/dnceng/internal/_git/dotnet-runtime</Uri>
<Sha>e37fab9fc9f7bce120a7165491ed392a73f8ab51</Sha>
<Sha>492abbeef0d8a6ea902ac8f90ed339c7b1d18bf4</Sha>
</Dependency>
<Dependency Name="Microsoft.NETCore.App.Runtime.AOT.win-x64.Cross.browser-wasm" Version="6.0.19">
<Dependency Name="Microsoft.NETCore.App.Runtime.AOT.win-x64.Cross.browser-wasm" Version="6.0.25">
<Uri>https://dev.azure.com/dnceng/internal/_git/dotnet-runtime</Uri>
<Sha>e37fab9fc9f7bce120a7165491ed392a73f8ab51</Sha>
<Sha>492abbeef0d8a6ea902ac8f90ed339c7b1d18bf4</Sha>
</Dependency>
<Dependency Name="Microsoft.NETCore.BrowserDebugHost.Transport" Version="6.0.19-servicing.23318.6">
<Dependency Name="Microsoft.NETCore.BrowserDebugHost.Transport" Version="6.0.25-servicing.23519.12">
<Uri>https://dev.azure.com/dnceng/internal/_git/dotnet-runtime</Uri>
<Sha>e37fab9fc9f7bce120a7165491ed392a73f8ab51</Sha>
<Sha>492abbeef0d8a6ea902ac8f90ed339c7b1d18bf4</Sha>
</Dependency>
</ProductDependencies>
<ToolsetDependencies>
<!-- Listed explicitly to workaround https://github.com/dotnet/cli/issues/10528 -->
<Dependency Name="Microsoft.NETCore.Platforms" Version="6.0.10">
<Dependency Name="Microsoft.NETCore.Platforms" Version="6.0.11">
<Uri>https://dev.azure.com/dnceng/internal/_git/dotnet-runtime</Uri>
<Sha>c76ac565499f3e7c657126d46c00b67a0d74832c</Sha>
<Sha>0545d9fd7d80e0e8eaaff87aa0011ad5bc13fcc8</Sha>
</Dependency>
<Dependency Name="Microsoft.DotNet.Arcade.Sdk" Version="6.0.0-beta.23211.7">
<Dependency Name="Microsoft.DotNet.Arcade.Sdk" Version="6.0.0-beta.23511.8">
<Uri>https://github.com/dotnet/arcade</Uri>
<Sha>7bca7a24dfc0eded1f3e364b4ff7bf1235b6eb26</Sha>
<Sha>06ccd9430e2e3bd29a381a5b27e7976d11b0ed18</Sha>
<SourceBuild RepoName="arcade" ManagedOnly="true" />
</Dependency>
<Dependency Name="Microsoft.DotNet.Build.Tasks.Installers" Version="6.0.0-beta.23211.7">
<Dependency Name="Microsoft.DotNet.Build.Tasks.Installers" Version="6.0.0-beta.23511.8">
<Uri>https://github.com/dotnet/arcade</Uri>
<Sha>7bca7a24dfc0eded1f3e364b4ff7bf1235b6eb26</Sha>
<Sha>06ccd9430e2e3bd29a381a5b27e7976d11b0ed18</Sha>
</Dependency>
<Dependency Name="Microsoft.DotNet.Build.Tasks.Templating" Version="6.0.0-beta.23211.7">
<Dependency Name="Microsoft.DotNet.Build.Tasks.Templating" Version="6.0.0-beta.23511.8">
<Uri>https://github.com/dotnet/arcade</Uri>
<Sha>7bca7a24dfc0eded1f3e364b4ff7bf1235b6eb26</Sha>
<Sha>06ccd9430e2e3bd29a381a5b27e7976d11b0ed18</Sha>
</Dependency>
<Dependency Name="Microsoft.DotNet.Helix.Sdk" Version="6.0.0-beta.23211.7">
<Dependency Name="Microsoft.DotNet.Helix.Sdk" Version="6.0.0-beta.23511.8">
<Uri>https://github.com/dotnet/arcade</Uri>
<Sha>7bca7a24dfc0eded1f3e364b4ff7bf1235b6eb26</Sha>
<Sha>06ccd9430e2e3bd29a381a5b27e7976d11b0ed18</Sha>
</Dependency>
</ToolsetDependencies>
</Dependencies>
46 changes: 23 additions & 23 deletions eng/Versions.props
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<PropertyGroup Label="Version settings">
<AspNetCoreMajorVersion>6</AspNetCoreMajorVersion>
<AspNetCoreMinorVersion>0</AspNetCoreMinorVersion>
<AspNetCorePatchVersion>19</AspNetCorePatchVersion>
<AspNetCorePatchVersion>25</AspNetCorePatchVersion>
<ValidateBaseline>false</ValidateBaseline>
<!--
When StabilizePackageVersion is set to 'true', this branch will produce stable outputs for 'Shipping' packages
Expand Down Expand Up @@ -63,12 +63,12 @@
<PropertyGroup Label="Automated">
<!-- Packages from dotnet/runtime -->
<MicrosoftExtensionsDependencyModelVersion>6.0.0</MicrosoftExtensionsDependencyModelVersion>
<MicrosoftNETCoreAppRefVersion>6.0.19</MicrosoftNETCoreAppRefVersion>
<MicrosoftNETCoreAppRuntimewinx64Version>6.0.19</MicrosoftNETCoreAppRuntimewinx64Version>
<MicrosoftNETRuntimeMonoAOTCompilerTaskVersion>6.0.19</MicrosoftNETRuntimeMonoAOTCompilerTaskVersion>
<MicrosoftNETRuntimeWebAssemblySdkVersion>6.0.19</MicrosoftNETRuntimeWebAssemblySdkVersion>
<MicrosoftNETCoreAppRuntimeAOTwinx64CrossbrowserwasmVersion>6.0.19</MicrosoftNETCoreAppRuntimeAOTwinx64CrossbrowserwasmVersion>
<MicrosoftNETCoreBrowserDebugHostTransportVersion>6.0.19-servicing.23318.6</MicrosoftNETCoreBrowserDebugHostTransportVersion>
<MicrosoftNETCoreAppRefVersion>6.0.25</MicrosoftNETCoreAppRefVersion>
<MicrosoftNETCoreAppRuntimewinx64Version>6.0.25</MicrosoftNETCoreAppRuntimewinx64Version>
<MicrosoftNETRuntimeMonoAOTCompilerTaskVersion>6.0.25</MicrosoftNETRuntimeMonoAOTCompilerTaskVersion>
<MicrosoftNETRuntimeWebAssemblySdkVersion>6.0.25</MicrosoftNETRuntimeWebAssemblySdkVersion>
<MicrosoftNETCoreAppRuntimeAOTwinx64CrossbrowserwasmVersion>6.0.25</MicrosoftNETCoreAppRuntimeAOTwinx64CrossbrowserwasmVersion>
<MicrosoftNETCoreBrowserDebugHostTransportVersion>6.0.25-servicing.23519.12</MicrosoftNETCoreBrowserDebugHostTransportVersion>
<MicrosoftExtensionsCachingAbstractionsVersion>6.0.0</MicrosoftExtensionsCachingAbstractionsVersion>
<MicrosoftExtensionsCachingMemoryVersion>6.0.1</MicrosoftExtensionsCachingMemoryVersion>
<MicrosoftExtensionsConfigurationAbstractionsVersion>6.0.0</MicrosoftExtensionsConfigurationAbstractionsVersion>
Expand Down Expand Up @@ -103,7 +103,7 @@
<MicrosoftExtensionsOptionsDataAnnotationsVersion>6.0.0</MicrosoftExtensionsOptionsDataAnnotationsVersion>
<MicrosoftExtensionsOptionsVersion>6.0.0</MicrosoftExtensionsOptionsVersion>
<MicrosoftExtensionsPrimitivesVersion>6.0.0</MicrosoftExtensionsPrimitivesVersion>
<MicrosoftInternalRuntimeAspNetCoreTransportVersion>6.0.19-servicing.23318.6</MicrosoftInternalRuntimeAspNetCoreTransportVersion>
<MicrosoftInternalRuntimeAspNetCoreTransportVersion>6.0.25-servicing.23519.12</MicrosoftInternalRuntimeAspNetCoreTransportVersion>
<SystemDiagnosticsDiagnosticSourceVersion>6.0.1</SystemDiagnosticsDiagnosticSourceVersion>
<SystemDiagnosticsEventLogVersion>6.0.0</SystemDiagnosticsEventLogVersion>
<SystemDirectoryServicesProtocolsVersion>6.0.2</SystemDirectoryServicesProtocolsVersion>
Expand All @@ -117,22 +117,22 @@
<SystemSecurityCryptographyXmlVersion>6.0.1</SystemSecurityCryptographyXmlVersion>
<SystemServiceProcessServiceControllerVersion>6.0.1</SystemServiceProcessServiceControllerVersion>
<SystemTextEncodingsWebVersion>6.0.0</SystemTextEncodingsWebVersion>
<SystemTextJsonVersion>6.0.8</SystemTextJsonVersion>
<SystemTextJsonVersion>6.0.9</SystemTextJsonVersion>
<SystemThreadingChannelsVersion>6.0.0</SystemThreadingChannelsVersion>
<!-- Only listed explicitly to workaround https://github.com/dotnet/cli/issues/10528 -->
<MicrosoftNETCorePlatformsVersion>6.0.10</MicrosoftNETCorePlatformsVersion>
<MicrosoftNETCorePlatformsVersion>6.0.11</MicrosoftNETCorePlatformsVersion>
<!-- Packages from dotnet/efcore -->
<dotnetefVersion>6.0.19</dotnetefVersion>
<MicrosoftEntityFrameworkCoreInMemoryVersion>6.0.19</MicrosoftEntityFrameworkCoreInMemoryVersion>
<MicrosoftEntityFrameworkCoreRelationalVersion>6.0.19</MicrosoftEntityFrameworkCoreRelationalVersion>
<MicrosoftEntityFrameworkCoreSqliteVersion>6.0.19</MicrosoftEntityFrameworkCoreSqliteVersion>
<MicrosoftEntityFrameworkCoreSqlServerVersion>6.0.19</MicrosoftEntityFrameworkCoreSqlServerVersion>
<MicrosoftEntityFrameworkCoreToolsVersion>6.0.19</MicrosoftEntityFrameworkCoreToolsVersion>
<MicrosoftEntityFrameworkCoreVersion>6.0.19</MicrosoftEntityFrameworkCoreVersion>
<MicrosoftEntityFrameworkCoreDesignVersion>6.0.19</MicrosoftEntityFrameworkCoreDesignVersion>
<dotnetefVersion>6.0.25</dotnetefVersion>
<MicrosoftEntityFrameworkCoreInMemoryVersion>6.0.25</MicrosoftEntityFrameworkCoreInMemoryVersion>
<MicrosoftEntityFrameworkCoreRelationalVersion>6.0.25</MicrosoftEntityFrameworkCoreRelationalVersion>
<MicrosoftEntityFrameworkCoreSqliteVersion>6.0.25</MicrosoftEntityFrameworkCoreSqliteVersion>
<MicrosoftEntityFrameworkCoreSqlServerVersion>6.0.25</MicrosoftEntityFrameworkCoreSqlServerVersion>
<MicrosoftEntityFrameworkCoreToolsVersion>6.0.25</MicrosoftEntityFrameworkCoreToolsVersion>
<MicrosoftEntityFrameworkCoreVersion>6.0.25</MicrosoftEntityFrameworkCoreVersion>
<MicrosoftEntityFrameworkCoreDesignVersion>6.0.25</MicrosoftEntityFrameworkCoreDesignVersion>
<!-- Packages from dotnet/arcade -->
<MicrosoftDotNetBuildTasksInstallersVersion>6.0.0-beta.23211.7</MicrosoftDotNetBuildTasksInstallersVersion>
<MicrosoftDotNetBuildTasksTemplatingVersion>6.0.0-beta.23211.7</MicrosoftDotNetBuildTasksTemplatingVersion>
<MicrosoftDotNetBuildTasksInstallersVersion>6.0.0-beta.23511.8</MicrosoftDotNetBuildTasksInstallersVersion>
<MicrosoftDotNetBuildTasksTemplatingVersion>6.0.0-beta.23511.8</MicrosoftDotNetBuildTasksTemplatingVersion>
</PropertyGroup>
<!--
Expand Down Expand Up @@ -206,9 +206,9 @@
<MicrosoftWebAdministrationVersion>11.1.0</MicrosoftWebAdministrationVersion>
<MicrosoftWebXdtVersion>1.4.0</MicrosoftWebXdtVersion>
<SystemIdentityModelTokensJwtVersion>6.10.0</SystemIdentityModelTokensJwtVersion>
<NuGetPackagingVersion>6.0.0</NuGetPackagingVersion>
<NuGetVersioningVersion>6.0.0</NuGetVersioningVersion>
<NuGetFrameworksVersion>6.0.0</NuGetFrameworksVersion>
<NuGetPackagingVersion>6.0.5</NuGetPackagingVersion>
<NuGetVersioningVersion>6.0.5</NuGetVersioningVersion>
<NuGetFrameworksVersion>6.0.5</NuGetFrameworksVersion>
<SystemComponentModelAnnotationsVersion>5.0.0</SystemComponentModelAnnotationsVersion>
<SystemNetExperimentalMsQuicVersion>5.0.0-alpha.20560.6</SystemNetExperimentalMsQuicVersion>
<SystemSecurityPrincipalWindowsVersion>5.0.0</SystemSecurityPrincipalWindowsVersion>
Expand Down
45 changes: 45 additions & 0 deletions eng/common/retain-build.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@

Param(
[Parameter(Mandatory=$true)][int] $buildId,
[Parameter(Mandatory=$true)][string] $azdoOrgUri,
[Parameter(Mandatory=$true)][string] $azdoProject,
[Parameter(Mandatory=$true)][string] $token
)

$ErrorActionPreference = 'Stop'
Set-StrictMode -Version 2.0

function Get-AzDOHeaders(
[string] $token)
{
$base64AuthInfo = [Convert]::ToBase64String([Text.Encoding]::ASCII.GetBytes(":${token}"))
$headers = @{"Authorization"="Basic $base64AuthInfo"}
return $headers
}

function Update-BuildRetention(
[string] $azdoOrgUri,
[string] $azdoProject,
[int] $buildId,
[string] $token)
{
$headers = Get-AzDOHeaders -token $token
$requestBody = "{
`"keepForever`": `"true`"
}"

$requestUri = "${azdoOrgUri}/${azdoProject}/_apis/build/builds/${buildId}?api-version=6.0"
write-Host "Attempting to retain build using the following URI: ${requestUri} ..."

try {
Invoke-RestMethod -Uri $requestUri -Method Patch -Body $requestBody -Header $headers -contentType "application/json"
Write-Host "Updated retention settings for build ${buildId}."
}
catch {
Write-Error "Failed to update retention settings for build: $_.Exception.Response.StatusDescription"
exit 1
}
}

Update-BuildRetention -azdoOrgUri $azdoOrgUri -azdoProject $azdoProject -buildId $buildId -token $token
exit 0
Loading

0 comments on commit 05f7886

Please sign in to comment.