Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
145a068
update node_modules
sgollapudi77 Oct 11, 2023
2066c99
Updated node version to 20
ShilpiR Apr 8, 2024
4d68fbb
npm install and build tasks made conditional
ShilpiR Apr 5, 2024
b2f8793
Merge pull request #419 from Azure/shilpirachna1/fixworkflowsv3
ShilpiRachna1 Apr 8, 2024
7a68e65
Updated node version to 20
ShilpiR Apr 8, 2024
995019b
Merge branch 'shilpirachna1/update-nodeversion-relv3' of https://gith…
ShilpiR Apr 8, 2024
de617f4
Merge pull request #418 from Azure/shilpirachna1/update-nodeversion-r…
surenderssm Apr 8, 2024
9f08f5e
Handled slotname in AzureResourceFilterUtility
ShilpiRach Aug 1, 2024
6a01e8e
Fixing pr workflow
ShilpiRach Jul 21, 2024
ea97805
Fixing test workflow
ShilpiRach Jul 21, 2024
c78472a
Fixing test workflow
ShilpiRach Jul 21, 2024
a5be3a6
Fixing pr workflow
ShilpiRach Jul 21, 2024
48ca679
Merge pull request #434 from Azure/shilpirachna1/cifixv3
ShilpiRachna1 Aug 1, 2024
22fbf64
Merge branch 'releases/v3' into shilpirachna1/slotfixv3
ShilpiRach Aug 1, 2024
2fdd5c3
Merge pull request #433 from Azure/shilpirachna1/slotfixv3
ShilpiRachna1 Aug 2, 2024
89acad3
releases/v3 | minor patch releases | Use a zip archival utility to ex…
kumaraksh1 Jul 16, 2025
408f461
Revert "releases/v3 | minor patch releases | Use a zip archival utili…
kumaraksh1 Jul 18, 2025
b17be61
Releases/v3 | Delete release archive folder before deployment for php…
kumaraksh1 Jul 18, 2025
46ee007
Releases/v3 fix is linux set (#480)
kumaraksh1 Jul 22, 2025
32c5005
Releases/v3 fix all linux apps (#482)
kumaraksh1 Jul 23, 2025
657f070
Releases/v3 final release for Sitecontainers (#487)
kumaraksh1 Jul 30, 2025
4fba321
Add kudu warm logic
kumaraksh1 Jan 26, 2026
6b6dd06
update package version
kumaraksh1 Jan 27, 2026
bc7c0fd
push to test the changes
kumaraksh1 Jan 27, 2026
a5e3d37
cherry picking change
kumaraksh1 Jan 27, 2026
bab6e89
update changes
kumaraksh1 Jan 27, 2026
f2535d1
adding a log message
kumaraksh1 Jan 27, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
The diff you're trying to view is too large. We only load the first 3000 changed files.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,7 @@ FakesAssemblies/

# Node.js Tools for Visual Studio
.ntvs_analysis.dat
node_modules/
# node_modules/

# Visual Studio 6 build log
*.plg
Expand Down
24 changes: 12 additions & 12 deletions __tests__/ActionInputValidator/ValidatorFactory.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ describe('Test Validator Factory', () => {
jest.spyOn(PublishProfile, 'getPublishProfile').mockImplementation(() => PublishProfile.prototype);
jest.spyOn(PublishProfile.prototype, 'getAppOS').mockImplementation(async() => 'unix');

let validator = await ValidatorFactory.getValidator(type);
expect(validator).toBeInstanceOf(PublishProfileWebAppValidator);
let validators = await ValidatorFactory.getValidator(type);
expect(validators[0]).toBeInstanceOf(PublishProfileWebAppValidator);
});

it("Get Container Validator for Publish Profile auth flow", async() => {
Expand All @@ -42,8 +42,8 @@ describe('Test Validator Factory', () => {
jest.spyOn(PublishProfile, 'getPublishProfile').mockImplementation(() => PublishProfile.prototype);
jest.spyOn(PublishProfile.prototype, 'getAppOS').mockImplementation(async() => 'unix');

let validator = await ValidatorFactory.getValidator(type);
expect(validator).toBeInstanceOf(PublishProfileContainerWebAppValidator);
let validators = await ValidatorFactory.getValidator(type);
expect(validators[0]).toBeInstanceOf(PublishProfileContainerWebAppValidator);
});

});
Expand All @@ -70,8 +70,8 @@ describe('Test Validator Factory', () => {
};
});

let validator = await ValidatorFactory.getValidator(type);
expect(validator).toBeInstanceOf(SpnLinuxContainerWebAppValidator);
let validators = await ValidatorFactory.getValidator(type);
expect(validators[0]).toBeInstanceOf(SpnLinuxContainerWebAppValidator);
});

it("Get Linux/Kube Code Validator for SPN auth flow", async() => {
Expand All @@ -90,8 +90,8 @@ describe('Test Validator Factory', () => {
};
});

let validator = await ValidatorFactory.getValidator(type);
expect(validator).toBeInstanceOf(SpnLinuxWebAppValidator);
let validators = await ValidatorFactory.getValidator(type);
expect(validators[0]).toBeInstanceOf(SpnLinuxWebAppValidator);
});

it("Get Windows Container Validator for SPN auth flow", async() => {
Expand All @@ -111,8 +111,8 @@ describe('Test Validator Factory', () => {
};
});

let validator = await ValidatorFactory.getValidator(type);
expect(validator).toBeInstanceOf(SpnWindowsContainerWebAppValidator);
let validators = await ValidatorFactory.getValidator(type);
expect(validators[0]).toBeInstanceOf(SpnWindowsContainerWebAppValidator);
});

it("Get Windows Code Validator for SPN auth flow", async() => {
Expand All @@ -131,8 +131,8 @@ describe('Test Validator Factory', () => {
};
});

let validator = await ValidatorFactory.getValidator(type);
expect(validator).toBeInstanceOf(SpnWindowsWebAppValidator);
let validators = await ValidatorFactory.getValidator(type);
expect(validators[0]).toBeInstanceOf(SpnWindowsWebAppValidator);
});

});
Expand Down
16 changes: 8 additions & 8 deletions __tests__/DeploymentProvider/DeploymentProviderFactory.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ describe('Test Deployment Provider Factory', () => {
it("Get Code Deployment Provider for Publish Profile auth flow", async() => {
let type: DEPLOYMENT_PROVIDER_TYPES = DEPLOYMENT_PROVIDER_TYPES.PUBLISHPROFILE;

let provider = await DeploymentProviderFactory.getDeploymentProvider(type);
expect(provider).toBeInstanceOf(WebAppDeploymentProvider);
let providers = await DeploymentProviderFactory.getDeploymentProvider(type);
expect(providers[0]).toBeInstanceOf(WebAppDeploymentProvider);
});

it("Get Container Deployment Provider for Publish Profile auth flow", async() => {
Expand All @@ -32,8 +32,8 @@ describe('Test Deployment Provider Factory', () => {

let type: DEPLOYMENT_PROVIDER_TYPES = DEPLOYMENT_PROVIDER_TYPES.PUBLISHPROFILE;

let provider = await DeploymentProviderFactory.getDeploymentProvider(type);
expect(provider).toBeInstanceOf(PublishProfileWebAppContainerDeploymentProvider);
let providers = await DeploymentProviderFactory.getDeploymentProvider(type);
expect(providers[0]).toBeInstanceOf(PublishProfileWebAppContainerDeploymentProvider);
});

});
Expand All @@ -48,8 +48,8 @@ describe('Test Deployment Provider Factory', () => {

let type: DEPLOYMENT_PROVIDER_TYPES = DEPLOYMENT_PROVIDER_TYPES.SPN;

let provider = await DeploymentProviderFactory.getDeploymentProvider(type);
expect(provider).toBeInstanceOf(WebAppDeploymentProvider);
let providers = await DeploymentProviderFactory.getDeploymentProvider(type);
expect(providers[0]).toBeInstanceOf(WebAppDeploymentProvider);
});

it("Get Container Deployment Provider for SPN auth flow", async() => {
Expand All @@ -61,8 +61,8 @@ describe('Test Deployment Provider Factory', () => {

let type: DEPLOYMENT_PROVIDER_TYPES = DEPLOYMENT_PROVIDER_TYPES.SPN;

let provider = await DeploymentProviderFactory.getDeploymentProvider(type);
expect(provider).toBeInstanceOf(WebAppContainerDeploymentProvider);
let providers = await DeploymentProviderFactory.getDeploymentProvider(type);
expect(providers[0]).toBeInstanceOf(WebAppContainerDeploymentProvider);
});

});
Expand Down
4 changes: 2 additions & 2 deletions __tests__/main.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,9 @@ describe('Test azure-webapps-deploy', () => {
}
return '';
});
let getValidatorFactorySpy = jest.spyOn(ValidatorFactory, 'getValidator').mockImplementation(async _type => new PublishProfileWebAppValidator());
let getValidatorFactorySpy = jest.spyOn(ValidatorFactory, 'getValidator').mockImplementation(async _type => [new PublishProfileWebAppValidator()]);
let ValidatorFactoryValidateSpy = jest.spyOn(PublishProfileWebAppValidator.prototype, 'validate');
let getDeploymentProviderSpy = jest.spyOn(DeploymentProviderFactory, 'getDeploymentProvider').mockImplementation(type => new WebAppDeploymentProvider(type));
let getDeploymentProviderSpy = jest.spyOn(DeploymentProviderFactory, 'getDeploymentProvider').mockImplementation(type => [new WebAppDeploymentProvider(type)]);
let deployWebAppStepSpy = jest.spyOn(WebAppDeploymentProvider.prototype, 'DeployWebAppStep');
let updateDeploymentStatusSpy = jest.spyOn(WebAppDeploymentProvider.prototype, 'UpdateDeploymentStatus');

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,37 @@
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || (function () {
var ownKeys = function(o) {
ownKeys = Object.getOwnPropertyNames || function (o) {
var ar = [];
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
return ar;
};
return ownKeys(o);
};
return function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
__setModuleDefault(result, mod);
return result;
};
})();
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) {
Expand All @@ -10,11 +43,13 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.SpnLinuxWebAppValidator = void 0;
const core = __importStar(require("@actions/core"));
const Validations_1 = require("../Validations");
const actionparameters_1 = require("../../actionparameters");
class SpnLinuxWebAppValidator {
validate() {
return __awaiter(this, void 0, void 0, function* () {
core.info("Validating SPN Linux Web App inputs...");
let actionParams = actionparameters_1.ActionParameters.getActionParams();
(0, Validations_1.containerInputsNotAllowed)(actionParams.images, actionParams.multiContainerConfigFile);
yield (0, Validations_1.validatePackageInput)();
Expand Down
7 changes: 4 additions & 3 deletions lib/ActionInputValidator/ValidatorFactory.js
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,8 @@ class ValidatorFactory {
yield this.getResourceDetails(actionParams);
if (!!actionParams.isLinux) {
if (!!actionParams.siteContainers) {
yield this.setBlessedSitecontainerApp(actionParams);
yield this.setIfBlessedSitecontainerApp(actionParams);
core.debug(`Blessed site containers: ${actionParams.blessedAppSitecontainers}`);
return new SpnWebAppSiteContainersValidator_1.SpnWebAppSiteContainersValidator();
}
else if (!!actionParams.images || !!actionParams.multiContainerConfigFile) {
Expand Down Expand Up @@ -131,7 +132,7 @@ class ValidatorFactory {
actionParams.isLinux = appOS.includes(RuntimeConstants_1.default.Unix) || appOS.includes(RuntimeConstants_1.default.Unix.toLowerCase());
});
}
static setBlessedSitecontainerApp(actionParams) {
static setIfBlessedSitecontainerApp(actionParams) {
return __awaiter(this, void 0, void 0, function* () {
var _a;
const appService = new azure_app_service_1.AzureAppService(actionParams.endpoint, actionParams.resourceGroupName, actionParams.appName, actionParams.slotName);
Expand All @@ -141,7 +142,7 @@ class ValidatorFactory {
actionParams.blessedAppSitecontainers = (!linuxFxVersion.startsWith("DOCKER|")
&& !linuxFxVersion.startsWith("COMPOSE|")
&& linuxFxVersion !== "SITECONTAINERS");
core.debug(`Is blessed app sitecontainers: ${actionParams.blessedAppSitecontainers}`);
return actionParams.blessedAppSitecontainers;
});
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,9 @@ class BaseWebAppDeploymentProvider {
return __awaiter(this, void 0, void 0, function* () {
this.appService = new azure_app_service_1.AzureAppService(this.actionParams.endpoint, this.actionParams.resourceGroupName, this.actionParams.appName, this.actionParams.slotName);
this.appServiceUtility = new AzureAppServiceUtility_1.AzureAppServiceUtility(this.appService);
this.kuduService = yield this.appServiceUtility.getKuduService();
const warmupInstanceId = yield this.getWarmupInstanceId();
core.debug(`Warmup Instance Id: ${warmupInstanceId}`);
this.kuduService = yield this.appServiceUtility.getKuduService(warmupInstanceId);
this.kuduServiceUtility = new KuduServiceUtility_1.KuduServiceUtility(this.kuduService);
this.applicationURL = yield this.appServiceUtility.getApplicationURL();
});
Expand All @@ -100,6 +102,24 @@ class BaseWebAppDeploymentProvider {
this.applicationURL = publishProfile.appUrl;
});
}
// Get the warmup instance id.
getWarmupInstanceId() {
return __awaiter(this, void 0, void 0, function* () {
var _a;
try {
const instances = yield this.appServiceUtility.getAppserviceInstances();
if (((_a = instances === null || instances === void 0 ? void 0 : instances.value) === null || _a === void 0 ? void 0 : _a.length) > 0) {
// Sort by name and pick the first one.
const sortedInstances = instances.value.sort((a, b) => a.name.localeCompare(b.name));
return sortedInstances[0].name;
}
}
catch (error) {
core.debug(`Failed to get app service instances - ${error}`);
}
return undefined;
});
}
}
exports.BaseWebAppDeploymentProvider = BaseWebAppDeploymentProvider;
var DEPLOYMENT_PROVIDER_TYPES;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,11 +57,12 @@ const path_1 = __importDefault(require("path"));
class WebAppDeploymentProvider extends BaseWebAppDeploymentProvider_1.BaseWebAppDeploymentProvider {
DeployWebAppStep() {
return __awaiter(this, void 0, void 0, function* () {
core.info("Starting deployment for web app...");
let appPackage = this.actionParams.package;
let webPackage = appPackage.getPath();
const validTypes = ["war", "jar", "ear", "zip", "static"];
// kudu warm up
yield this.kuduServiceUtility.warmpUp();
yield this.kuduServiceUtility.warmUp();
// If provided, type paramater takes precidence over file package type
if (this.actionParams.type != null && validTypes.includes(this.actionParams.type.toLowerCase())) {
core.debug("Initiated deployment via kudu service for webapp" + this.actionParams.type + "package : " + webPackage);
Expand Down
16 changes: 16 additions & 0 deletions node_modules/.bin/browserslist

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

17 changes: 17 additions & 0 deletions node_modules/.bin/browserslist.cmd

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

28 changes: 28 additions & 0 deletions node_modules/.bin/browserslist.ps1

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

16 changes: 16 additions & 0 deletions node_modules/.bin/copy

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

16 changes: 16 additions & 0 deletions node_modules/.bin/copy-cli

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

17 changes: 17 additions & 0 deletions node_modules/.bin/copy-cli.cmd

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

Loading
Loading