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

Support deploying Windows container images. #40

Merged
merged 3 commits into from
May 6, 2021
Merged
Show file tree
Hide file tree
Changes from all 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
2 changes: 1 addition & 1 deletion packages/appservice-rest/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "azure-actions-appservice-rest",
"version": "1.3.1",
"version": "1.3.2",
"description": "Azure resource manager and kudu node rest module",
"keywords": [
"appservice",
Expand Down
11 changes: 7 additions & 4 deletions packages/appservice-rest/src/Utilities/KuduServiceUtility.ts
Original file line number Diff line number Diff line change
Expand Up @@ -201,11 +201,14 @@ export class KuduServiceUtility {
public async deployWebAppImage(appName: string, images: string, isLinux: boolean) {
try {
core.debug(`DeployWebAppImage - appName: ${appName}; images: ${images}; isLinux:${isLinux}`);
if (!isLinux) {
throw new Error("Windows Containerized web app is not available for Publish profile auth scheme.");
}
console.log(`Deploying image ${images} to App Service ${appName}`);
let headers = {'LinuxFxVersion': `DOCKER|${images}`};

chunye marked this conversation as resolved.
Show resolved Hide resolved
if (!images) {
throw 'The container image to be deployed to App Service is empty.';
}

let fxVersionName = isLinux ? 'LinuxFxVersion' : 'WindowsFxVersion';
let headers = {fxVersionName: `DOCKER|${images}`};
chunye marked this conversation as resolved.
Show resolved Hide resolved
await this._webAppKuduService.imageDeploy(headers);
console.log('Successfully deployed image to App Service.');
}
Expand Down