azure-pipelines-tasks-azurermdeploycommon
Advanced tools
Comparing version 2.0.0-preview.1 to 2.0.1
@@ -446,9 +446,4 @@ "use strict"; | ||
httpRequest.body = fs.createReadStream(webPackage); | ||
let requestOptions = new webClient.WebRequestOptions(); | ||
//Bydefault webclient.sendRequest retries for [408, 409, 500, 502, 503, 504] as suggested by appservice team for zipdeploy api | ||
//408 and 409 should not be retried as it will never turn into success | ||
requestOptions.retriableStatusCodes = [500, 502, 503, 504]; | ||
requestOptions.retryIntervalInSeconds = 5; | ||
try { | ||
let response = yield this._client.beginRequest(httpRequest, requestOptions, 'application/octet-stream'); | ||
let response = yield this._client.beginRequest(httpRequest, null, 'application/octet-stream'); | ||
tl.debug(`ZIP Deploy response: ${JSON.stringify(response)}`); | ||
@@ -626,3 +621,6 @@ if (response.statusCode == 200) { | ||
_getFormattedError(error) { | ||
if (error && error.message) { | ||
if (error && error.statusCode) { | ||
return `${error.statusMessage} (CODE: ${error.statusCode})`; | ||
} | ||
else if (error && error.message) { | ||
if (error.statusCode) { | ||
@@ -633,5 +631,2 @@ error.message = `${typeof error.message.valueOf() == 'string' ? error.message : error.message.Code + " - " + error.message.Message} (CODE: ${error.statusCode})`; | ||
} | ||
else if (error && error.statusCode) { | ||
return `${error.statusMessage} (CODE: ${error.statusCode})`; | ||
} | ||
return error; | ||
@@ -638,0 +633,0 @@ } |
@@ -461,10 +461,5 @@ import tl = require('azure-pipelines-task-lib/task'); | ||
httpRequest.body = fs.createReadStream(webPackage); | ||
let requestOptions = new webClient.WebRequestOptions(); | ||
//Bydefault webclient.sendRequest retries for [408, 409, 500, 502, 503, 504] as suggested by appservice team for zipdeploy api | ||
//408 and 409 should not be retried as it will never turn into success | ||
requestOptions.retriableStatusCodes = [500, 502, 503, 504]; | ||
requestOptions.retryIntervalInSeconds = 5; | ||
try { | ||
let response = await this._client.beginRequest(httpRequest, requestOptions, 'application/octet-stream'); | ||
let response = await this._client.beginRequest(httpRequest, null, 'application/octet-stream'); | ||
tl.debug(`ZIP Deploy response: ${JSON.stringify(response)}`); | ||
@@ -642,3 +637,6 @@ if(response.statusCode == 200) { | ||
private _getFormattedError(error: any) { | ||
if(error && error.message) { | ||
if(error && error.statusCode) { | ||
return `${error.statusMessage} (CODE: ${error.statusCode})`; | ||
} | ||
else if(error && error.message) { | ||
if(error.statusCode) { | ||
@@ -650,5 +648,2 @@ error.message = `${typeof error.message.valueOf() == 'string' ? error.message : error.message.Code + " - " + error.message.Message } (CODE: ${error.statusCode})` | ||
} | ||
else if(error && error.statusCode) { | ||
return `${error.statusMessage} (CODE: ${error.statusCode})`; | ||
} | ||
@@ -655,0 +650,0 @@ return error; |
@@ -121,5 +121,3 @@ "use strict"; | ||
console.log(tl.loc('PackageDeploymentInitiated')); | ||
//zipdeploy async api ref: https://github.com/projectkudu/kudu/wiki/Deploying-from-a-zip-file-or-url#asynchronous-zip-deployment | ||
let queryParameters = [ | ||
'isAsync=true', | ||
'deployer=' + VSTS_DEPLOY | ||
@@ -126,0 +124,0 @@ ]; |
@@ -126,5 +126,4 @@ import tl = require('azure-pipelines-task-lib/task'); | ||
console.log(tl.loc('PackageDeploymentInitiated')); | ||
//zipdeploy async api ref: https://github.com/projectkudu/kudu/wiki/Deploying-from-a-zip-file-or-url#asynchronous-zip-deployment | ||
let queryParameters: Array<string> = [ | ||
'isAsync=true', | ||
'deployer=' + VSTS_DEPLOY | ||
@@ -131,0 +130,0 @@ ]; |
{ | ||
"name": "azure-pipelines-tasks-azurermdeploycommon", | ||
"version": "2.0.0-preview.1", | ||
"version": "2.0.1", | ||
"description": "Common Lib for Azure ARM REST apis", | ||
@@ -25,3 +25,3 @@ "repository": { | ||
"typed-rest-client": "0.12.0", | ||
"azure-pipelines-task-lib": "3.0.6-preview.0", | ||
"azure-pipelines-task-lib": "^3.1.0", | ||
"archiver": "2.1.1", | ||
@@ -28,0 +28,0 @@ "decompress-zip": "0.3.0", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
0
4262363
13748
+ Addedazure-pipelines-task-lib@3.4.0(transitive)
+ Addedminimatch@3.0.5(transitive)
+ Addedmockery@2.1.0(transitive)
- Removedazure-pipelines-task-lib@3.0.6-preview.0(transitive)
- Removedminimatch@3.0.4(transitive)
- Removedmockery@1.7.0(transitive)