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/app service telemetry #8994

Merged
merged 6 commits into from
Dec 4, 2018
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
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,10 @@ export class BuiltInLinuxWebAppDeploymentProvider extends AzureRmWebAppDeploymen
private zipDeploymentID: string;

public async DeployWebAppStep() {
let packageType = this.taskParams.Package.getPackageType();
let deploymentMethodtelemetry = packageType == PackageType.war ? '{"deploymentMethod":"War Deploy"}' : '{"deploymentMethod":"Zip Deploy"}';
console.log("##vso[telemetry.publish area=TaskDeploymentMethod;feature=AzureWebAppDeployment]" + deploymentMethodtelemetry);

tl.debug('Performing Linux built-in package deployment');
var isNewValueUpdated: boolean = false;

Expand All @@ -34,7 +38,7 @@ export class BuiltInLinuxWebAppDeploymentProvider extends AzureRmWebAppDeploymen
await this.kuduServiceUtility.warmpUp();
}

switch(this.taskParams.Package.getPackageType()){
switch(packageType){
case PackageType.folder:
let tempPackagePath = webCommonUtility.generateTemporaryFolderOrZipPath(tl.getVariable('AGENT.TEMPDIRECTORY'), false);
let archivedWebPackage = await zipUtility.archiveFolder(this.taskParams.Package.getPath(), "", tempPackagePath);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ var zipUtility = require('azurermdeploycommon/webdeployment-common/ziputility.js
export class WindowsWebAppRunFromZipProvider extends AzureRmWebAppDeploymentProvider {

public async DeployWebAppStep() {
let deploymentMethodtelemetry = '{"deploymentMethod":"Run from Package"}';
console.log("##vso[telemetry.publish area=TaskDeploymentMethod;feature=AzureWebAppDeployment]" + deploymentMethodtelemetry);

var webPackage = await FileTransformsUtility.applyTransformations(this.taskParams.Package.getPath(), this.taskParams.WebConfigParameters, this.taskParams.Package.getPackageType());

if(this.taskParams.DeploymentType === DeploymentType.runFromPackage) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ export class WindowsWebAppWarDeployProvider extends AzureRmWebAppDeploymentProvi
public async DeployWebAppStep() {

tl.debug("Initiated deployment via kudu service for webapp war package : "+ this.taskParams.Package.getPath());

let deploymentMethodtelemetry = '{"deploymentMethod":"War Deploy"}';
console.log("##vso[telemetry.publish area=TaskDeploymentMethod;feature=AzureWebAppDeployment]" + deploymentMethodtelemetry);

await this.kuduServiceUtility.warmpUp();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ export class WindowsWebAppZipDeployProvider extends AzureRmWebAppDeploymentProvi
private zipDeploymentID: string;

public async DeployWebAppStep() {
let deploymentMethodtelemetry = '{"deploymentMethod":"Zip Deploy"}';
console.log("##vso[telemetry.publish area=TaskDeploymentMethod;feature=AzureWebAppDeployment]" + deploymentMethodtelemetry);

var webPackage = await FileTransformsUtility.applyTransformations(this.taskParams.Package.getPath(), this.taskParams.WebConfigParameters, this.taskParams.Package.getPackageType());

if(this.taskParams.DeploymentType === DeploymentType.zipDeploy) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"loc.helpMarkDown": "[More information](https://aka.ms/azurermwebdeployreadme)",
"loc.description": "Update Azure App Services on Windows, Web App on Linux with built-in images or Docker containers, ASP.NET, .NET Core, PHP, Python or Node.js based Web applications, Function Apps on Windows or Linux with Docker Containers, Mobile Apps, API applications, Web Jobs using Web Deploy / Kudu REST APIs",
"loc.instanceNameFormat": "Azure App Service Deploy: $(WebAppName)",
"loc.releaseNotes": "What's new in version 4.* (preview)<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.",
"loc.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.",
"loc.group.displayName.FileTransformsAndVariableSubstitution": "File Transforms & Variable Substitution Options",
"loc.group.displayName.AdditionalDeploymentOptions": "Additional Deployment Options",
"loc.group.displayName.PostDeploymentAction": "Post Deployment Action",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@ export class BuiltInLinuxWebAppDeploymentProvider extends AzureRmWebAppDeploymen
private zipDeploymentID: string;

public async DeployWebAppStep() {
let packageType = this.taskParams.Package.getPackageType();
let deploymentMethodtelemetry = packageType === PackageType.war ? '{"deploymentMethod":"War Deploy"}' : '{"deploymentMethod":"Zip Deploy"}';
console.log("##vso[telemetry.publish area=TaskDeploymentMethod;feature=AzureWebAppDeployment]" + deploymentMethodtelemetry);

tl.debug('Performing Linux built-in package deployment');
var isNewValueUpdated: boolean = false;

Expand All @@ -37,7 +41,7 @@ export class BuiltInLinuxWebAppDeploymentProvider extends AzureRmWebAppDeploymen
await this.kuduServiceUtility.warmpUp();
}

switch(this.taskParams.Package.getPackageType()){
switch(packageType){
case PackageType.folder:
let tempPackagePath = deployUtility.generateTemporaryFolderOrZipPath(tl.getVariable('AGENT.TEMPDIRECTORY'), false);
let archivedWebPackage = await zipUtility.archiveFolder(this.taskParams.Package.getPath(), "", tempPackagePath);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ var zipUtility = require('webdeployment-common/ziputility.js');
export class WindowsWebAppRunFromZipProvider extends AzureRmWebAppDeploymentProvider{

public async DeployWebAppStep() {
let deploymentMethodtelemetry = '{"deploymentMethod":"Run from Package"}';
console.log("##vso[telemetry.publish area=TaskDeploymentMethod;feature=AzureWebAppDeployment]" + deploymentMethodtelemetry);

var webPackage = await FileTransformsUtility.applyTransformations(this.taskParams.Package.getPath(), this.taskParams);

if(this.taskParams.UseWebDeploy && this.taskParams.DeploymentType === DeploymentType.runFromZip) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ export class WindowsWebAppWarDeployProvider extends AzureRmWebAppDeploymentProvi
private zipDeploymentID: string;

public async DeployWebAppStep() {
let deploymentMethodtelemetry = '{"deploymentMethod":"War Deploy"}';
console.log("##vso[telemetry.publish area=TaskDeploymentMethod;feature=AzureWebAppDeployment]" + deploymentMethodtelemetry);

tl.debug("Initiated deployment via kudu service for webapp war package : "+ this.taskParams.Package.getPath());

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@ export class WindowsWebAppWebDeployProvider extends AzureRmWebAppDeploymentProvi
await this.appServiceUtility.updateAndMonitorAppSettings(updateApplicationSetting, deleteApplicationSetting);

if(deployUtility.canUseWebDeploy(this.taskParams.UseWebDeploy)) {
let deploymentMethodtelemetry = '{"deploymentMethod":"Web Deploy"}';
console.log("##vso[telemetry.publish area=TaskDeploymentMethod;feature=AzureWebAppDeployment]" + deploymentMethodtelemetry);

tl.debug("Performing the deployment of webapp.");

if(!tl.osType().match(/^Win/)) {
Expand All @@ -43,6 +46,9 @@ export class WindowsWebAppWebDeployProvider extends AzureRmWebAppDeploymentProvi

}
else {
let deploymentMethodtelemetry = '{"deploymentMethod":"Zip API"}';
console.log("##vso[telemetry.publish area=TaskDeploymentMethod;feature=AzureWebAppDeployment]" + deploymentMethodtelemetry);

tl.debug("Initiated deployment via kudu service for webapp package : ");
await this.kuduServiceUtility.deployWebPackage(webPackage, physicalPath, this.taskParams.VirtualApplication, this.taskParams.TakeAppOfflineFlag);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ export class WindowsWebAppZipDeployProvider extends AzureRmWebAppDeploymentProvi
private zipDeploymentID: string;

public async DeployWebAppStep() {
let deploymentMethodtelemetry = '{"deploymentMethod":"Zip Deploy"}';
console.log("##vso[telemetry.publish area=TaskDeploymentMethod;feature=AzureWebAppDeployment]" + deploymentMethodtelemetry);

var webPackage = await FileTransformsUtility.applyTransformations(this.taskParams.Package.getPath(), this.taskParams);

if(this.taskParams.UseWebDeploy && this.taskParams.DeploymentType === DeploymentType.zipDeploy) {
Expand Down
3 changes: 1 addition & 2 deletions Tasks/AzureRmWebAppDeploymentV4/task.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
"Build",
"Release"
],
"preview": "true",
"runsOn": [
"Agent",
"DeploymentGroup"
Expand All @@ -20,7 +19,7 @@
"Minor": 3,
"Patch": 19
},
"releaseNotes": "What's new in version 4.* (preview)<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.",
"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",
"groups": [
{
Expand Down
1 change: 0 additions & 1 deletion Tasks/AzureRmWebAppDeploymentV4/task.loc.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
"Build",
"Release"
],
"preview": "true",
"runsOn": [
"Agent",
"DeploymentGroup"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,15 @@ export class BuiltInLinuxWebAppDeploymentProvider extends AzureRmWebAppDeploymen
private zipDeploymentID: string;

public async DeployWebAppStep() {
let packageType = this.taskParams.Package.getPackageType();
let deploymentMethodtelemetry = packageType === PackageType.war ? '{"deploymentMethod":"War Deploy"}' : '{"deploymentMethod":"Zip Deploy"}';
console.log("##vso[telemetry.publish area=TaskDeploymentMethod;feature=AzureWebAppDeployment]" + deploymentMethodtelemetry);

tl.debug('Performing Linux built-in package deployment');

await this.kuduServiceUtility.warmpUp();

switch(this.taskParams.Package.getPackageType()){
switch(packageType){
case PackageType.folder:
let tempPackagePath = deployUtility.generateTemporaryFolderOrZipPath(tl.getVariable('AGENT.TEMPDIRECTORY'), false);
let archivedWebPackage = await zipUtility.archiveFolder(this.taskParams.Package.getPath(), "", tempPackagePath);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ const runFromZipAppSetting: string = '-WEBSITE_RUN_FROM_PACKAGE 1';
export class WindowsWebAppRunFromZipProvider extends AzureRmWebAppDeploymentProvider {

public async DeployWebAppStep() {
let deploymentMethodtelemetry = '{"deploymentMethod":"Run from Package"}';
console.log("##vso[telemetry.publish area=TaskDeploymentMethod;feature=AzureWebAppDeployment]" + deploymentMethodtelemetry);

var webPackage = await FileTransformsUtility.applyTransformations(this.taskParams.Package.getPath(), this.taskParams.WebConfigParameters, this.taskParams.Package.getPackageType());

if(this.taskParams.DeploymentType === DeploymentType.runFromPackage) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ export class WindowsWebAppWarDeployProvider extends AzureRmWebAppDeploymentProvi
public async DeployWebAppStep() {

tl.debug("Initiated deployment via kudu service for webapp war package : "+ this.taskParams.Package.getPath());

let deploymentMethodtelemetry = '{"deploymentMethod":"War Deploy"}';
console.log("##vso[telemetry.publish area=TaskDeploymentMethod;feature=AzureWebAppDeployment]" + deploymentMethodtelemetry);

await this.kuduServiceUtility.warmpUp();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ export class WindowsWebAppZipDeployProvider extends AzureRmWebAppDeploymentProvi
private zipDeploymentID: string;

public async DeployWebAppStep() {
let deploymentMethodtelemetry = '{"deploymentMethod":"Zip Deploy"}';
console.log("##vso[telemetry.publish area=TaskDeploymentMethod;feature=AzureWebAppDeployment]" + deploymentMethodtelemetry);

var webPackage = await FileTransformsUtility.applyTransformations(this.taskParams.Package.getPath(), this.taskParams.WebConfigParameters, this.taskParams.Package.getPackageType());

if(this.taskParams.DeploymentType === DeploymentType.zipDeploy) {
Expand Down