Skip to content

Commit 007a208

Browse files
authored
Support deploying Windows container images. (#40)
* Support deploying Windows container images. * Check images string is not empty. * Updated package version.
1 parent f808d0c commit 007a208

File tree

2 files changed

+8
-5
lines changed

2 files changed

+8
-5
lines changed

packages/appservice-rest/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "azure-actions-appservice-rest",
3-
"version": "1.3.1",
3+
"version": "1.3.2",
44
"description": "Azure resource manager and kudu node rest module",
55
"keywords": [
66
"appservice",

packages/appservice-rest/src/Utilities/KuduServiceUtility.ts

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -201,11 +201,14 @@ export class KuduServiceUtility {
201201
public async deployWebAppImage(appName: string, images: string, isLinux: boolean) {
202202
try {
203203
core.debug(`DeployWebAppImage - appName: ${appName}; images: ${images}; isLinux:${isLinux}`);
204-
if (!isLinux) {
205-
throw new Error("Windows Containerized web app is not available for Publish profile auth scheme.");
206-
}
207204
console.log(`Deploying image ${images} to App Service ${appName}`);
208-
let headers = {'LinuxFxVersion': `DOCKER|${images}`};
205+
206+
if (!images) {
207+
throw 'The container image to be deployed to App Service is empty.';
208+
}
209+
210+
let fxVersionName = isLinux ? 'LinuxFxVersion' : 'WindowsFxVersion';
211+
let headers = {fxVersionName: `DOCKER|${images}`};
209212
await this._webAppKuduService.imageDeploy(headers);
210213
console.log('Successfully deployed image to App Service.');
211214
}

0 commit comments

Comments
 (0)