Skip to content

Commit aab9aab

Browse files
V2 - Use new .NET CDN URLs and update to latest install scripts (#568)
* new cdn url changes * Fix Workflow * Fix CI failures for ubuntu-latest * Fix upload-artifact@v4 * Fix proxy test issue * Fix Proxy env issue * Fix globalization invariant issue * Fix libssl issue * Install libssl1.1 to fix CI failures * Add fallback logic * Fix CI failures dist * Update installer.ts * Update installer.ts * Fix proxy test failure * Update signed version --------- Co-authored-by: Priya Gupta <[email protected]>
1 parent a351d9e commit aab9aab

File tree

7 files changed

+1929
-1548
lines changed

7 files changed

+1929
-1548
lines changed

.github/workflows/check-dist.yml

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

4747
# If index.js was different than expected, upload the expected version as an artifact
48-
- uses: actions/upload-artifact@v3
48+
- uses: actions/upload-artifact@v4
4949
if: ${{ failure() && steps.diff.conclusion == 'failure' }}
5050
with:
5151
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
@@ -39,7 +39,7 @@ jobs:
3939
strategy:
4040
fail-fast: false
4141
matrix:
42-
operating-system: [ubuntu-latest, windows-latest, macOS-latest]
42+
operating-system: [ubuntu-22.04, windows-latest, macOS-latest]
4343
steps:
4444
- name: Checkout
4545
uses: actions/checkout@v3
@@ -62,7 +62,7 @@ jobs:
6262
strategy:
6363
fail-fast: false
6464
matrix:
65-
operating-system: [ubuntu-latest, windows-latest, macOS-latest]
65+
operating-system: [ubuntu-22.04, windows-latest, macos-13]
6666
steps:
6767
- name: Checkout
6868
uses: actions/checkout@v3
@@ -95,7 +95,7 @@ jobs:
9595
strategy:
9696
fail-fast: false
9797
matrix:
98-
operating-system: [ubuntu-latest, windows-latest, macOS-latest]
98+
operating-system: [ubuntu-22.04, windows-latest, macOS-latest]
9999
steps:
100100
- name: Checkout
101101
uses: actions/checkout@v3
@@ -120,7 +120,7 @@ jobs:
120120
strategy:
121121
fail-fast: false
122122
matrix:
123-
operating-system: [ubuntu-latest, windows-latest, macOS-latest]
123+
operating-system: [ubuntu-22.04, windows-latest, macOS-latest]
124124
steps:
125125
- name: Checkout
126126
uses: actions/checkout@v3
@@ -144,7 +144,7 @@ jobs:
144144
strategy:
145145
fail-fast: false
146146
matrix:
147-
operating-system: [ubuntu-latest, windows-latest, macOS-latest]
147+
operating-system: [ubuntu-22.04, windows-latest, macOS-latest]
148148
steps:
149149
- name: Checkout
150150
uses: actions/checkout@v3
@@ -168,7 +168,7 @@ jobs:
168168
strategy:
169169
fail-fast: false
170170
matrix:
171-
operating-system: [ubuntu-latest, windows-latest, macOS-latest]
171+
operating-system: [ubuntu-22.04, windows-latest, macOS-latest]
172172
steps:
173173
- name: Checkout
174174
uses: actions/checkout@v3
@@ -190,18 +190,20 @@ jobs:
190190
run: __tests__/verify-dotnet.ps1 2.2 3.1
191191

192192
test-proxy:
193-
runs-on: ubuntu-latest
193+
runs-on: ubuntu-20.04
194194
container:
195-
image: mcr.microsoft.com/dotnet/core/runtime-deps:3.0-bionic
195+
image: ubuntu:20.04
196196
options: --dns 127.0.0.1
197197
services:
198198
squid-proxy:
199-
image: datadog/squid:latest
199+
image: ubuntu/squid:latest
200200
ports:
201201
- 3128:3128
202202
env:
203203
https_proxy: http://squid-proxy:3128
204204
http_proxy: http://squid-proxy:3128
205+
DOTNET_SYSTEM_GLOBALIZATION_INVARIANT: true
206+
205207
steps:
206208
- name: Checkout
207209
uses: actions/checkout@v3
@@ -210,7 +212,7 @@ jobs:
210212
- name: Install curl
211213
run: |
212214
apt update
213-
apt -y install curl
215+
apt -y install curl libssl1.1 libssl-dev
214216
- name: Setup dotnet 3.1.201
215217
uses: ./
216218
with:
@@ -222,7 +224,7 @@ jobs:
222224
run: __tests__/verify-dotnet.sh 3.1.201
223225

224226
test-bypass-proxy:
225-
runs-on: ubuntu-latest
227+
runs-on: ubuntu-22.04
226228
env:
227229
https_proxy: http://no-such-proxy:3128
228230
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
@@ -379,7 +379,13 @@ class DotnetCoreInstaller {
379379
}
380380
getReleasesJsonUrl(httpClient, versionParts) {
381381
return __awaiter(this, void 0, void 0, function* () {
382-
const response = yield httpClient.getJson(DotNetCoreIndexUrl);
382+
let response;
383+
try {
384+
response = yield httpClient.getJson(DotNetCoreIndexUrl);
385+
}
386+
catch (error) {
387+
response = yield httpClient.getJson(DotnetCoreIndexFallbackUrl);
388+
}
383389
const result = response.result || {};
384390
let releasesInfo = result['releases-index'];
385391
releasesInfo = releasesInfo.filter((info) => {
@@ -403,7 +409,8 @@ class DotnetCoreInstaller {
403409
}
404410
}
405411
exports.DotnetCoreInstaller = DotnetCoreInstaller;
406-
const DotNetCoreIndexUrl = 'https://dotnetcli.blob.core.windows.net/dotnet/release-metadata/releases-index.json';
412+
const DotNetCoreIndexUrl = 'https://builds.dotnet.microsoft.com/dotnet/release-metadata/releases-index.json';
413+
const DotnetCoreIndexFallbackUrl = 'https://dotnetcli.blob.core.windows.net/dotnet/release-metadata/releases-index.json';
407414

408415

409416
/***/ }),

0 commit comments

Comments
 (0)