Skip to content

Commit 71a4fd9

Browse files
V1 - Use new .NET CDN URLs and update to latest install scripts (#569)
* New cdn url changes * Fix CI failures on macos-latest * Add Fallback logic * Fix proxy failures * Update signed version
1 parent 608ee75 commit 71a4fd9

File tree

7 files changed

+2029
-1555
lines changed

7 files changed

+2029
-1555
lines changed

.github/workflows/check-dist.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ jobs:
4444
id: diff
4545

4646
# If index.js was different than expected, upload the expected version as an artifact
47-
- uses: actions/upload-artifact@v2
47+
- uses: actions/upload-artifact@v4
4848
if: ${{ failure() && steps.diff.conclusion == 'failure' }}
4949
with:
5050
name: dist

.github/workflows/test-dotnet.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
strategy:
1818
fail-fast: false
1919
matrix:
20-
operating-system: [ubuntu-latest, windows-latest, macOS-latest]
20+
operating-system: [ubuntu-22.04, windows-latest, macOS-latest]
2121
dotnet-version: ['2.1', '2.2', '3.0', '3.1', '5.0']
2222
steps:
2323
- name: Checkout

.github/workflows/workflow.yml

+13-11
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
strategy:
1818
fail-fast: false
1919
matrix:
20-
operating-system: [ubuntu-latest, windows-latest, macOS-latest]
20+
operating-system: [ubuntu-22.04, windows-latest, macos-13]
2121
steps:
2222
- name: Checkout
2323
uses: actions/checkout@v2
@@ -38,7 +38,7 @@ jobs:
3838
strategy:
3939
fail-fast: false
4040
matrix:
41-
operating-system: [ubuntu-latest, windows-latest, macOS-latest]
41+
operating-system: [ubuntu-22.04, windows-latest, macOS-latest]
4242
steps:
4343
- name: Checkout
4444
uses: actions/checkout@v2
@@ -61,7 +61,7 @@ jobs:
6161
strategy:
6262
fail-fast: false
6363
matrix:
64-
operating-system: [ubuntu-latest, windows-latest, macOS-latest]
64+
operating-system: [ubuntu-22.04, windows-latest, macos-13]
6565
steps:
6666
- name: Checkout
6767
uses: actions/checkout@v2
@@ -94,7 +94,7 @@ jobs:
9494
strategy:
9595
fail-fast: false
9696
matrix:
97-
operating-system: [ubuntu-latest, windows-latest, macOS-latest]
97+
operating-system: [ubuntu-22.04, windows-latest, macOS-latest]
9898
steps:
9999
- name: Checkout
100100
uses: actions/checkout@v2
@@ -119,7 +119,7 @@ jobs:
119119
strategy:
120120
fail-fast: false
121121
matrix:
122-
operating-system: [ubuntu-latest, windows-latest, macOS-latest]
122+
operating-system: [ubuntu-22.04, windows-latest, macOS-latest]
123123
steps:
124124
- name: Checkout
125125
uses: actions/checkout@v2
@@ -143,7 +143,7 @@ jobs:
143143
strategy:
144144
fail-fast: false
145145
matrix:
146-
operating-system: [ubuntu-latest, windows-latest, macOS-latest]
146+
operating-system: [ubuntu-22.04, windows-latest, macOS-latest]
147147
steps:
148148
- name: Checkout
149149
uses: actions/checkout@v2
@@ -163,18 +163,20 @@ jobs:
163163
run: __tests__/verify-dotnet.ps1 3.1 2.2
164164

165165
test-proxy:
166-
runs-on: ubuntu-latest
166+
runs-on: ubuntu-20.04
167167
container:
168-
image: mcr.microsoft.com/dotnet/core/runtime-deps:3.0-bionic
168+
image: ubuntu:20.04
169169
options: --dns 127.0.0.1
170170
services:
171171
squid-proxy:
172-
image: datadog/squid:latest
172+
image: ubuntu/squid:latest
173173
ports:
174174
- 3128:3128
175175
env:
176176
https_proxy: http://squid-proxy:3128
177177
http_proxy: http://squid-proxy:3128
178+
DOTNET_SYSTEM_GLOBALIZATION_INVARIANT: true
179+
178180
steps:
179181
- name: Checkout
180182
uses: actions/checkout@v2
@@ -183,7 +185,7 @@ jobs:
183185
- name: Install curl
184186
run: |
185187
apt update
186-
apt -y install curl
188+
apt -y install curl libssl-dev
187189
- name: Setup dotnet 3.1.201
188190
uses: ./
189191
with:
@@ -195,7 +197,7 @@ jobs:
195197
run: __tests__/verify-dotnet.sh 3.1.201
196198

197199
test-bypass-proxy:
198-
runs-on: ubuntu-latest
200+
runs-on: ubuntu-22.04
199201
env:
200202
https_proxy: http://no-such-proxy:3128
201203
no_proxy: github.com,dotnetcli.blob.core.windows.net,download.visualstudio.microsoft.com,api.nuget.org,dotnetcli.azureedge.net

dist/index.js

+9-2
Original file line numberDiff line numberDiff line change
@@ -18168,7 +18168,13 @@ class DotnetCoreInstaller {
1816818168
}
1816918169
getReleasesJsonUrl(httpClient, versionParts) {
1817018170
return __awaiter(this, void 0, void 0, function* () {
18171-
const response = yield httpClient.getJson(DotNetCoreIndexUrl);
18171+
let response;
18172+
try {
18173+
response = yield httpClient.getJson(DotNetCoreIndexUrl);
18174+
}
18175+
catch (error) {
18176+
response = yield httpClient.getJson(DotnetCoreIndexFallbackUrl);
18177+
}
1817218178
const result = response.result || {};
1817318179
let releasesInfo = result['releases-index'];
1817418180
releasesInfo = releasesInfo.filter((info) => {
@@ -18192,7 +18198,8 @@ class DotnetCoreInstaller {
1819218198
}
1819318199
}
1819418200
exports.DotnetCoreInstaller = DotnetCoreInstaller;
18195-
const DotNetCoreIndexUrl = 'https://dotnetcli.blob.core.windows.net/dotnet/release-metadata/releases-index.json';
18201+
const DotNetCoreIndexUrl = 'https://builds.dotnet.microsoft.com/dotnet/release-metadata/releases-index.json';
18202+
const DotnetCoreIndexFallbackUrl = 'https://dotnetcli.blob.core.windows.net/dotnet/release-metadata/releases-index.json';
1819618203

1819718204

1819818205
/***/ }),

0 commit comments

Comments
 (0)