Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[UseNode/NodeTool] task to install node.js fails with [warning]Conten… #19058

Merged
Merged
6 changes: 3 additions & 3 deletions Tasks/NodeToolV0/_buildConfigs/Node20/package-lock.json

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

2 changes: 1 addition & 1 deletion Tasks/NodeToolV0/_buildConfigs/Node20/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
"@types/q": "^1.0.7",
"typed-rest-client": "1.8.4",
"azure-pipelines-task-lib": "^4.0.0-preview",
"azure-pipelines-tool-lib": "^2.0.3",
"azure-pipelines-tool-lib": "^2.0.6",
"azure-pipelines-tasks-utility-common": "^3.0.3"
},
"devDependencies": {
Expand Down
6 changes: 5 additions & 1 deletion Tasks/NodeToolV0/make.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,11 @@
{
"items": [
"node_modules/azure-pipelines-tool-lib/node_modules/azure-pipelines-task-lib",
"node_modules/azure-pipelines-tasks-utility-common/node_modules/azure-pipelines-task-lib"
"node_modules/azure-pipelines-tasks-utility-common/node_modules/azure-pipelines-task-lib",
"node_modules/azure-pipelines-tasks-utility-common/node_modules/azure-pipelines-tool-lib",
"node_modules/azure-pipelines-tasks-lib/node_modules/azure-pipelines-tool-lib",
"node_modules/azure-pipelines-tool-lib/node_modules/mockery",
"node_modules/mockery"
],
"options": "-Rf"
}
Expand Down
10 changes: 5 additions & 5 deletions Tasks/NodeToolV0/nodetool.ts
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ async function acquireNode(version: string, installedArch: string, nodejsMirror:
let downloadPath: string;

try {
downloadPath = await toolLib.downloadTool(downloadUrl);
downloadPath = await toolLib.downloadToolWithRetries(downloadUrl);
} catch (err) {
if (isWin32 && err['httpStatusCode'] == 404) {
return await acquireNodeFromFallbackLocation(version, nodejsMirror);
Expand Down Expand Up @@ -224,8 +224,8 @@ async function acquireNodeFromFallbackLocation(version: string, nodejsMirror: st
exeUrl = `${nodejsMirror}/v${version}/win-${osArch}/node.exe`;
libUrl = `${nodejsMirror}/v${version}/win-${osArch}/node.lib`;

await toolLib.downloadTool(exeUrl, path.join(tempDir, "node.exe"));
await toolLib.downloadTool(libUrl, path.join(tempDir, "node.lib"));
await toolLib.downloadToolWithRetries(exeUrl, path.join(tempDir, "node.exe"));
await toolLib.downloadToolWithRetries(libUrl, path.join(tempDir, "node.lib"));
}
catch (err) {
if (err['httpStatusCode'] &&
Expand All @@ -234,8 +234,8 @@ async function acquireNodeFromFallbackLocation(version: string, nodejsMirror: st
exeUrl = `${nodejsMirror}/v${version}/node.exe`;
libUrl = `${nodejsMirror}/v${version}/node.lib`;

await toolLib.downloadTool(exeUrl, path.join(tempDir, "node.exe"));
await toolLib.downloadTool(libUrl, path.join(tempDir, "node.lib"));
await toolLib.downloadToolWithRetries(exeUrl, path.join(tempDir, "node.exe"));
await toolLib.downloadToolWithRetries(libUrl, path.join(tempDir, "node.lib"));
}
else {
throw err;
Expand Down
121 changes: 111 additions & 10 deletions Tasks/NodeToolV0/package-lock.json

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

2 changes: 1 addition & 1 deletion Tasks/NodeToolV0/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
"@types/q": "^1.0.7",
"typed-rest-client": "1.8.4",
"azure-pipelines-task-lib": "^5.0.0-preview.0",
"azure-pipelines-tool-lib": "^2.0.3",
"azure-pipelines-tool-lib": "^2.0.6",
"azure-pipelines-tasks-utility-common": "^3.0.3"
},
"devDependencies": {
Expand Down
2 changes: 1 addition & 1 deletion Tasks/NodeToolV0/task.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"version": {
"Major": 0,
"Minor": 229,
"Patch": 3
"Patch": 5
},
"satisfies": [
"Node",
Expand Down
2 changes: 1 addition & 1 deletion Tasks/NodeToolV0/task.loc.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"version": {
"Major": 0,
"Minor": 229,
"Patch": 3
"Patch": 5
},
"satisfies": [
"Node",
Expand Down
6 changes: 3 additions & 3 deletions Tasks/UseNodeV1/_buildConfigs/Node20/package-lock.json

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

2 changes: 1 addition & 1 deletion Tasks/UseNodeV1/_buildConfigs/Node20/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
"@types/q": "^1.5.1",
"azure-pipelines-task-lib": "^4.0.0-preview",
"azure-pipelines-tasks-utility-common": "^3.219.1",
"azure-pipelines-tool-lib": "^2.0.3",
"azure-pipelines-tool-lib": "^2.0.6",
"typed-rest-client": "^1.8.4"
},
"devDependencies": {
Expand Down
10 changes: 5 additions & 5 deletions Tasks/UseNodeV1/installer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ async function acquireNode(version: string, installedArch: string): Promise<stri
let downloadPath: string;

try {
downloadPath = await toolLib.downloadTool(downloadUrl);
downloadPath = await toolLib.downloadToolWithRetries(downloadUrl);
} catch (err) {
if (isWin32 && err['httpStatusCode'] == 404) {
return await acquireNodeFromFallbackLocation(version);
Expand Down Expand Up @@ -220,17 +220,17 @@ async function acquireNodeFromFallbackLocation(version: string): Promise<string>
exeUrl = `https://nodejs.org/dist/v${version}/win-${osArch}/node.exe`;
libUrl = `https://nodejs.org/dist/v${version}/win-${osArch}/node.lib`;

await toolLib.downloadTool(exeUrl, path.join(tempDir, 'node.exe'));
await toolLib.downloadTool(libUrl, path.join(tempDir, 'node.lib'));
await toolLib.downloadToolWithRetries(exeUrl, path.join(tempDir, 'node.exe'));
await toolLib.downloadToolWithRetries(libUrl, path.join(tempDir, 'node.lib'));
}
catch (err) {
if (err['httpStatusCode'] &&
err['httpStatusCode'] === '404') {
exeUrl = `https://nodejs.org/dist/v${version}/node.exe`;
libUrl = `https://nodejs.org/dist/v${version}/node.lib`;

await toolLib.downloadTool(exeUrl, path.join(tempDir, 'node.exe'));
await toolLib.downloadTool(libUrl, path.join(tempDir, 'node.lib'));
await toolLib.downloadToolWithRetries(exeUrl, path.join(tempDir, 'node.exe'));
await toolLib.downloadToolWithRetries(libUrl, path.join(tempDir, 'node.lib'));
}
else {
throw err;
Expand Down
6 changes: 5 additions & 1 deletion Tasks/UseNodeV1/make.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,11 @@
{
"items": [
"node_modules/azure-pipelines-tasks-utility-common/node_modules/azure-pipelines-task-lib",
"node_modules/azure-pipelines-tool-lib/node_modules/azure-pipelines-task-lib"
"node_modules/azure-pipelines-tasks-utility-common/node_modules/azure-pipelines-tool-lib",
KonstantinTyukalov marked this conversation as resolved.
Show resolved Hide resolved
"node_modules/azure-pipelines-tasks-lib/node_modules/azure-pipelines-tool-lib",
"node_modules/azure-pipelines-tool-lib/node_modules/azure-pipelines-task-lib",
"node_modules/azure-pipelines-tool-lib/node_modules/mockery",
"node_modules/mockery"
],
"options": "-Rf"
}
Expand Down
Loading
Loading