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

Users/suaggar/rfp fix #11821

Merged
merged 4 commits into from
Nov 21, 2019
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions Tasks/AzureFunctionAppContainerV1/Tests/mock_utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,6 @@ export function mockContainerDeploySettings() {
properties: {
"WEBSITE_NODE_DEFAULT_VERSION": "6.9.1",
"MSDEPLOY_RENAME_LOCKED_FILES": "1",
"WEBSITE_RUN_FROM_PACKAGE":"0",
"DOCKER_CUSTOM_IMAGE_NAME": "dockernamespace/dockerrepository:DockerImageTag",
"WEBSITES_ENABLE_APP_SERVICE_STORAGE" : "false",
"port": "1173"
Expand All @@ -136,7 +135,6 @@ export function mockContainerDeploySettings() {
properties: {
"WEBSITE_NODE_DEFAULT_VERSION":"6.9.1",
"MSDEPLOY_RENAME_LOCKED_FILES":"1",
"WEBSITE_RUN_FROM_PACKAGE":"0",
"DOCKER_CUSTOM_IMAGE_NAME": "dockernamespace/dockerrepository:DockerImageTag",
"WEBSITES_ENABLE_APP_SERVICE_STORAGE" : "false"
}
Expand All @@ -157,7 +155,6 @@ export function mockContainerDeploySettings() {
properties: {
"WEBSITE_NODE_DEFAULT_VERSION": "6.9.1",
"MSDEPLOY_RENAME_LOCKED_FILES": "1",
"WEBSITE_RUN_FROM_PACKAGE":"0",
"DOCKER_CUSTOM_IMAGE_NAME": "dockernamespace/dockerrepository:DockerImageTag",
"WEBSITES_ENABLE_APP_SERVICE_STORAGE" : "false"
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@ import * as ParameterParser from 'azurermdeploycommon/operations/ParameterParser
import { DeploymentType } from '../taskparameters';
import { PackageType } from 'azurermdeploycommon/webdeployment-common/packageUtility';
import { FileTransformsUtility } from 'azurermdeploycommon/operations/FileTransformsUtility.js';
const deleteOldRunFromZipAppSetting: string = '-WEBSITE_RUN_FROM_ZIP';
const removeRunFromZipAppSetting: string = '-WEBSITE_RUN_FROM_PACKAGE 0';
const removeRunFromZipAppSetting: string = '-WEBSITE_RUN_FROM_ZIP -WEBSITE_RUN_FROM_PACKAGE';
var deployUtility = require('azurermdeploycommon/webdeployment-common/utility.js');
var zipUtility = require('azurermdeploycommon/webdeployment-common/ziputility.js');

Expand Down Expand Up @@ -37,9 +36,8 @@ export class WindowsWebAppZipDeployProvider extends AzureRmWebAppDeploymentProvi

tl.debug("Initiated deployment via kudu service for webapp package : ");

var updateApplicationSetting = ParameterParser.parse(removeRunFromZipAppSetting)
var deleteApplicationSetting = ParameterParser.parse(deleteOldRunFromZipAppSetting)
var isNewValueUpdated: boolean = await this.appServiceUtility.updateAndMonitorAppSettings(updateApplicationSetting, deleteApplicationSetting);
var deleteApplicationSetting = ParameterParser.parse(removeRunFromZipAppSetting)
var isNewValueUpdated: boolean = await this.appServiceUtility.updateAndMonitorAppSettings(null, deleteApplicationSetting);

if(!isNewValueUpdated) {
await this.kuduServiceUtility.warmpUp();
Expand Down
4 changes: 2 additions & 2 deletions Tasks/AzureFunctionAppV1/task.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
"author": "Microsoft Corporation",
"version": {
"Major": 1,
"Minor": 158,
"Patch": 4
"Minor": 160,
"Patch": 0
},
"minimumAgentVersion": "2.104.1",
"groups": [
Expand Down
4 changes: 2 additions & 2 deletions Tasks/AzureFunctionAppV1/task.loc.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
"author": "Microsoft Corporation",
"version": {
"Major": 1,
"Minor": 158,
"Patch": 4
"Minor": 160,
"Patch": 0
},
"minimumAgentVersion": "2.104.1",
"groups": [
Expand Down
1 change: 0 additions & 1 deletion Tasks/AzureRmWebAppDeploymentV4/Tests/L0.ts
Original file line number Diff line number Diff line change
Expand Up @@ -300,7 +300,6 @@ describe('AzureRmWebAppDeployment Suite', function() {
assert(tr.stdOutContained('Active DeploymentId :MOCK_DEPLOYMENT_ID'), 'Should have printed: Active DeploymentId :MOCK_DEPLOYMENT_ID.');
assert(tr.stdOutContained('DeployWebAppStep for zip deploy steps with zip package succeeded'), 'Should have printed: DeployWebAppStep for zip deploy steps with zip package succeeded.')
assert(tr.stdOutContained('loc_mock_GotconnectiondetailsforazureRMWebApp0 mytestapp'), 'Should have printed: loc_mock_GotconnectiondetailsforazureRMWebApp0 mytestapp');
assert(tr.stdOutContained('loc_mock_UpdatingAppServiceApplicationSettings {"WEBSITE_RUN_FROM_PACKAGE":"0"}'), 'Should have printed: loc_mock_UpdatingAppServiceApplicationSettings {"WEBSITE_RUN_FROM_PACKAGE":"0"}.');
assert(tr.stdOutContained('loc_mock_PackageDeploymentSuccess'), 'Should have printed: loc_mock_PackageDeploymentSuccess.');
assert(tr.stdOutContained('DeployWebAppStep for zip deploy steps with folder package succeeded'), 'Should have printed: DeployWebAppStep for zip deploy steps with folder package succeeded.');
assert(tr.stdOutContained('Compressed folder into zip webAppPkg.zip'), 'Should have printed: Compressed folder into zip webAppPkg.zip.');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ export class WindowsWebAppWebDeployProviderTests {
var map: Map<string, string> = new Map<string, string>();
map.set('MSDEPLOY_RENAME_LOCKED_FILES', '1');
map.set('ScmType', 'ScmType');
map.set('WEBSITE_RUN_FROM_PACKAGE', '0');
return map;
},
zipDeploy: function(E, F) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ export class WindowsWebAppZipDeployProviderTests {
var map: Map<string, string> = new Map<string, string>();
map.set('MSDEPLOY_RENAME_LOCKED_FILES', '1');
map.set('ScmType', 'ScmType');
map.set('WEBSITE_RUN_FROM_PACKAGE', '0');
return map;
},
zipDeploy: function(E, F) {
Expand Down
12 changes: 3 additions & 9 deletions Tasks/AzureRmWebAppDeploymentV4/Tests/mock_utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -223,8 +223,7 @@ export function mockZipDeploySettings() {
location: "South Central US",
properties: {
"WEBSITE_NODE_DEFAULT_VERSION": "6.9.1",
"MSDEPLOY_RENAME_LOCKED_FILES": "1",
"WEBSITE_RUN_FROM_PACKAGE":"0"
"MSDEPLOY_RENAME_LOCKED_FILES": "1"
}
}).persist();

Expand All @@ -235,8 +234,7 @@ export function mockZipDeploySettings() {
location: "South Central US",
properties: {
"WEBSITE_NODE_DEFAULT_VERSION":"6.9.1",
"MSDEPLOY_RENAME_LOCKED_FILES":"1",
"WEBSITE_RUN_FROM_PACKAGE":"0"
"MSDEPLOY_RENAME_LOCKED_FILES":"1"
}
};

Expand All @@ -254,8 +252,7 @@ export function mockZipDeploySettings() {
location: "South Central US",
properties: {
"WEBSITE_NODE_DEFAULT_VERSION": "6.9.1",
"MSDEPLOY_RENAME_LOCKED_FILES": "1",
"WEBSITE_RUN_FROM_PACKAGE":"0"
"MSDEPLOY_RENAME_LOCKED_FILES": "1"
}
}).persist();
}
Expand All @@ -276,7 +273,6 @@ export function mockContainerDeploySettings() {
properties: {
"WEBSITE_NODE_DEFAULT_VERSION": "6.9.1",
"MSDEPLOY_RENAME_LOCKED_FILES": "1",
"WEBSITE_RUN_FROM_PACKAGE":"0",
"DOCKER_CUSTOM_IMAGE_NAME": "dockernamespace/dockerrepository:DockerImageTag"
}
}).persist();
Expand All @@ -289,7 +285,6 @@ export function mockContainerDeploySettings() {
properties: {
"WEBSITE_NODE_DEFAULT_VERSION":"6.9.1",
"MSDEPLOY_RENAME_LOCKED_FILES":"1",
"WEBSITE_RUN_FROM_PACKAGE":"0",
"DOCKER_CUSTOM_IMAGE_NAME": "dockernamespace/dockerrepository:DockerImageTag"
}
};
Expand All @@ -309,7 +304,6 @@ export function mockContainerDeploySettings() {
properties: {
"WEBSITE_NODE_DEFAULT_VERSION": "6.9.1",
"MSDEPLOY_RENAME_LOCKED_FILES": "1",
"WEBSITE_RUN_FROM_PACKAGE":"0",
"DOCKER_CUSTOM_IMAGE_NAME": "dockernamespace/dockerrepository:DockerImageTag"
}
}).persist();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@ import * as Constant from '../operations/Constants';
import { WebDeployUtility } from '../operations/WebDeployUtility';
import { Package } from 'webdeployment-common-v2/packageUtility';

const deleteOldRunFromZipAppSetting: string = '-WEBSITE_RUN_FROM_ZIP';
const removeRunFromZipAppSetting: string = '-WEBSITE_RUN_FROM_PACKAGE 0';
const removeRunFromZipAppSetting: string = '-WEBSITE_RUN_FROM_ZIP -WEBSITE_RUN_FROM_PACKAGE';
var deployUtility = require('webdeployment-common-v2/utility.js');

export class WindowsWebAppWebDeployProvider extends AzureRmWebAppDeploymentProvider{
Expand All @@ -25,9 +24,8 @@ export class WindowsWebAppWebDeployProvider extends AzureRmWebAppDeploymentProvi
webPackage = await FileTransformsUtility.applyTransformations(webPackage, this.taskParams);
this.taskParams.Package = new Package(webPackage);

var updateApplicationSetting = ParameterParser.parse(removeRunFromZipAppSetting)
var deleteApplicationSetting = ParameterParser.parse(deleteOldRunFromZipAppSetting)
await this.appServiceUtility.updateAndMonitorAppSettings(updateApplicationSetting, deleteApplicationSetting);
var deleteApplicationSetting = ParameterParser.parse(removeRunFromZipAppSetting)
await this.appServiceUtility.updateAndMonitorAppSettings(null, deleteApplicationSetting);

if(deployUtility.canUseWebDeploy(this.taskParams.UseWebDeploy)) {
let deploymentMethodtelemetry = '{"deploymentMethod":"Web Deploy"}';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@ import { FileTransformsUtility } from '../operations/FileTransformsUtility';
import * as ParameterParser from 'webdeployment-common-v2/ParameterParserUtility';
import { DeploymentType } from '../operations/TaskParameters';
import { PackageType } from 'webdeployment-common-v2/packageUtility';
const deleteOldRunFromZipAppSetting: string = '-WEBSITE_RUN_FROM_ZIP';
const removeRunFromZipAppSetting: string = '-WEBSITE_RUN_FROM_PACKAGE 0';
const removeRunFromZipAppSetting: string = '-WEBSITE_RUN_FROM_PACKAGE -WEBSITE_RUN_FROM_ZIP';
var deployUtility = require('webdeployment-common-v2/utility.js');
var zipUtility = require('webdeployment-common-v2/ziputility.js');

Expand Down Expand Up @@ -40,9 +39,8 @@ export class WindowsWebAppZipDeployProvider extends AzureRmWebAppDeploymentProvi

tl.debug("Initiated deployment via kudu service for webapp package : ");

var updateApplicationSetting = ParameterParser.parse(removeRunFromZipAppSetting)
var deleteApplicationSetting = ParameterParser.parse(deleteOldRunFromZipAppSetting)
var isNewValueUpdated: boolean = await this.appServiceUtility.updateAndMonitorAppSettings(updateApplicationSetting, deleteApplicationSetting);
var deleteApplicationSetting = ParameterParser.parse(removeRunFromZipAppSetting);
var isNewValueUpdated: boolean = await this.appServiceUtility.updateAndMonitorAppSettings(null, deleteApplicationSetting);

if(!isNewValueUpdated) {
await this.kuduServiceUtility.warmpUp();
Expand Down
4 changes: 2 additions & 2 deletions Tasks/AzureRmWebAppDeploymentV4/task.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
"author": "Microsoft Corporation",
"version": {
"Major": 4,
"Minor": 157,
"Patch": 9
"Minor": 160,
"Patch": 0
},
"releaseNotes": "What's new in version 4.*<br />Supports Zip Deploy, Run From Package, War Deploy [Details here](https://aka.ms/appServiceDeploymentMethods)<br />Supports App Service Environments<br />Improved UI for discovering different App service types supported by the task<br/>Run From Package is the preferred deployment method, which makes files in wwwroot folder read-only<br/>Click [here](https://aka.ms/azurermwebdeployreadme) for more information.",
"minimumAgentVersion": "2.104.1",
Expand Down
4 changes: 2 additions & 2 deletions Tasks/AzureRmWebAppDeploymentV4/task.loc.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
"author": "Microsoft Corporation",
"version": {
"Major": 4,
"Minor": 157,
"Patch": 9
"Minor": 160,
"Patch": 0
},
"releaseNotes": "ms-resource:loc.releaseNotes",
"minimumAgentVersion": "2.104.1",
Expand Down
3 changes: 0 additions & 3 deletions Tasks/AzureWebAppContainerV1/Tests/mock_utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,6 @@ export function mockContainerDeploySettings() {
properties: {
"WEBSITE_NODE_DEFAULT_VERSION": "6.9.1",
"MSDEPLOY_RENAME_LOCKED_FILES": "1",
"WEBSITE_RUN_FROM_PACKAGE":"0",
"DOCKER_CUSTOM_IMAGE_NAME": "dockernamespace/dockerrepository:DockerImageTag",
"port": "1173"
}
Expand All @@ -135,7 +134,6 @@ export function mockContainerDeploySettings() {
properties: {
"WEBSITE_NODE_DEFAULT_VERSION":"6.9.1",
"MSDEPLOY_RENAME_LOCKED_FILES":"1",
"WEBSITE_RUN_FROM_PACKAGE":"0",
"DOCKER_CUSTOM_IMAGE_NAME": "dockernamespace/dockerrepository:DockerImageTag"
}
};
Expand Down Expand Up @@ -181,7 +179,6 @@ export function mockContainerDeploySettings() {
properties: {
"WEBSITE_NODE_DEFAULT_VERSION": "6.9.1",
"MSDEPLOY_RENAME_LOCKED_FILES": "1",
"WEBSITE_RUN_FROM_PACKAGE":"0",
"DOCKER_CUSTOM_IMAGE_NAME": "dockernamespace/dockerrepository:DockerImageTag"
}
}).persist();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@ import * as ParameterParser from 'azurermdeploycommon/operations/ParameterParser
import { DeploymentType } from '../taskparameters';
import { PackageType } from 'azurermdeploycommon/webdeployment-common/packageUtility';
import { FileTransformsUtility } from 'azurermdeploycommon/operations/FileTransformsUtility.js';
const deleteOldRunFromZipAppSetting: string = '-WEBSITE_RUN_FROM_ZIP';
const removeRunFromZipAppSetting: string = '-WEBSITE_RUN_FROM_PACKAGE 0';
const removeRunFromZipAppSetting: string = '-WEBSITE_RUN_FROM_PACKAGE -WEBSITE_RUN_FROM_ZIP';
var deployUtility = require('azurermdeploycommon/webdeployment-common/utility.js');
var zipUtility = require('azurermdeploycommon/webdeployment-common/ziputility.js');

Expand Down Expand Up @@ -37,9 +36,8 @@ export class WindowsWebAppZipDeployProvider extends AzureRmWebAppDeploymentProvi

tl.debug("Initiated deployment via kudu service for webapp package : ");
if (!this.isPublishProfileAuthSchemeEndpoint) {
var updateApplicationSetting = ParameterParser.parse(removeRunFromZipAppSetting)
var deleteApplicationSetting = ParameterParser.parse(deleteOldRunFromZipAppSetting)
var isNewValueUpdated: boolean = await this.appServiceUtility.updateAndMonitorAppSettings(updateApplicationSetting, deleteApplicationSetting);
var deleteApplicationSetting = ParameterParser.parse(removeRunFromZipAppSetting)
var isNewValueUpdated: boolean = await this.appServiceUtility.updateAndMonitorAppSettings(null, deleteApplicationSetting);

if(!isNewValueUpdated) {
await this.kuduServiceUtility.warmpUp();
Expand Down
4 changes: 2 additions & 2 deletions Tasks/AzureWebAppV1/task.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
"author": "Microsoft Corporation",
"version": {
"Major": 1,
"Minor": 159,
"Patch": 6
"Minor": 160,
"Patch": 0
},
"minimumAgentVersion": "2.104.1",
"groups": [
Expand Down
4 changes: 2 additions & 2 deletions Tasks/AzureWebAppV1/task.loc.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
"author": "Microsoft Corporation",
"version": {
"Major": 1,
"Minor": 159,
"Patch": 6
"Minor": 160,
"Patch": 0
},
"minimumAgentVersion": "2.104.1",
"groups": [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,11 @@
"loc.messages.JSONParseError": "Unable to parse JSON file: %s. Error: %s",
"loc.messages.NOJSONfilematchedwithspecificpattern": "NO JSON file matched with specific pattern: %s.",
"loc.messages.FailedToApplyTransformation": "Unable to apply transformation for the given package. Verify the following.",
"loc.messages.FailedToApplySpecialTransformation": "Unable to apply transformation for the given package.",
"loc.messages.FailedToApplySpecialTransformationReason1": "Unable to apply transformation for the given package - Changes are already present in the package.",
"loc.messages.FailedToApplyTransformationReason1": "1. Whether the Transformation is already applied for the MSBuild generated package during build. If yes, remove the <DependentUpon> tag for each config in the csproj file and rebuild. ",
"loc.messages.FailedToApplyTransformationReason2": "2. Ensure that the config file and transformation files are present in the same folder inside the package.",
"loc.messages.FailedToApplyXMLvariablesubstitutionReason1": "Failed to apply XML variable substitution. Changes are already present in the package.",
"loc.messages.MissingArgumentsforXMLTransformation": "Incomplete or missing arguments. Expected format -transform <transform file> -xml <source file> -result <destinamtion file>. Transformation and source file are mandatory inputs.",
"loc.messages.MorethanonepackagematchedwithspecifiedpatternPleaserestrainthesearchpattern": "More than one package matched with specified pattern: %s. Please restrain the search pattern.",
"loc.messages.JSONvariableSubstitution": "Applying JSON variable substitution for %s",
Expand Down