Skip to content

Commit 82489d0

Browse files
[build] use CDN URL for dotnet-install script (#9957)
Context: dotnet/core#9799 The dot.net redirector has issues currently, using the CDN URL directly is more reliable. Co-authored-by: Jonathan Peppers <[email protected]>
1 parent 0e731e5 commit 82489d0

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

build-tools/automation/yaml-templates/use-dot-net.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ steps:
2121
$completed = $false
2222
while (-not $completed -and $currentAttempt -le $totalAttempts) {
2323
try {
24-
$response = Invoke-WebRequest -Uri "https://dot.net/v1/dotnet-install.ps1" -OutFile dotnet-install.ps1 -PassThru
24+
$response = Invoke-WebRequest -Uri "https://builds.dotnet.microsoft.com/dotnet/scripts/v1/dotnet-install.ps1" -OutFile dotnet-install.ps1 -PassThru
2525
if ($response.StatusCode -ne 200) {
2626
throw
2727
}
@@ -46,7 +46,7 @@ steps:
4646
- bash: >
4747
DOTNET_ROOT=~/.dotnet/ &&
4848
(if [[ "${{ parameters.remove_dotnet }}" == "true" ]] ; then rm -rfv $DOTNET_ROOT; fi) &&
49-
curl -L https://dot.net/v1/dotnet-install.sh --retry 5 --retry-max-time 300 > dotnet-install.sh &&
49+
curl -L https://builds.dotnet.microsoft.com/dotnet/scripts/v1/dotnet-install.sh --retry 5 --retry-max-time 300 > dotnet-install.sh &&
5050
chmod +x dotnet-install.sh &&
5151
./dotnet-install.sh --channel ${{ parameters.version }} --quality ${{ parameters.quality }} --install-dir $DOTNET_ROOT --skip-non-versioned-files --verbose &&
5252
PATH="$DOTNET_ROOT:$PATH" &&

build-tools/xaprepare/xaprepare/ConfigAndData/Configurables.Unix.cs

+2-2
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@ partial class Urls
1818
// This is the "public" url that we really should be using, but it keeps failing with:
1919
// AuthenticationException: The remote certificate is invalid because of errors in the certificate chain: RevocationStatusUnknown
2020
// For now we'll grab it directly from GitHub
21-
// public static readonly Uri DotNetInstallScript = new Uri ("https://dot.net/v1/dotnet-install.sh");
22-
public static readonly Uri DotNetInstallScript = new Uri ("https://raw.githubusercontent.com/dotnet/install-scripts/refs/heads/main/src/dotnet-install.sh");
21+
// public static readonly Uri DotNetInstallScript = new Uri ("https://builds.dotnet.microsoft.com/dotnet/scripts/v1/dotnet-install.sh");
22+
public static readonly Uri DotNetInstallScript = new Uri ("https://builds.dotnet.microsoft.com/dotnet/scripts/v1/dotnet-install.sh");
2323
}
2424
}
2525
}

build-tools/xaprepare/xaprepare/ConfigAndData/Configurables.Windows.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ partial class Paths
2626

2727
partial class Urls
2828
{
29-
public static readonly Uri DotNetInstallScript = new Uri ("https://dot.net/v1/dotnet-install.ps1");
29+
public static readonly Uri DotNetInstallScript = new Uri ("https://builds.dotnet.microsoft.com/dotnet/scripts/v1/dotnet-install.ps1");
3030
}
3131
}
3232
}

0 commit comments

Comments
 (0)