Skip to content

Commit 4b18f97

Browse files
author
Hanzhang Zeng (Roger)
committed
[Build] Enable Linux Premium and Linux Java for RBAC
1 parent c684a27 commit 4b18f97

38 files changed

+1759
-1734
lines changed

lib/constants/authentication_type.js

+7-7
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
"use strict";
2-
Object.defineProperty(exports, "__esModule", { value: true });
3-
var AuthenticationType;
4-
(function (AuthenticationType) {
5-
AuthenticationType[AuthenticationType["Rbac"] = 1] = "Rbac";
6-
AuthenticationType[AuthenticationType["Scm"] = 2] = "Scm";
7-
})(AuthenticationType = exports.AuthenticationType || (exports.AuthenticationType = {}));
1+
"use strict";
2+
Object.defineProperty(exports, "__esModule", { value: true });
3+
var AuthenticationType;
4+
(function (AuthenticationType) {
5+
AuthenticationType[AuthenticationType["Rbac"] = 1] = "Rbac";
6+
AuthenticationType[AuthenticationType["Scm"] = 2] = "Scm";
7+
})(AuthenticationType = exports.AuthenticationType || (exports.AuthenticationType = {}));

lib/constants/configuration.js

+18-18
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
1-
"use strict";
2-
Object.defineProperty(exports, "__esModule", { value: true });
3-
class ConfigurationConstant {
4-
}
5-
ConfigurationConstant.ParamInAppName = 'app-name';
6-
ConfigurationConstant.ParamInPackagePath = 'package';
7-
ConfigurationConstant.ParamInSlot = 'slot-name';
8-
ConfigurationConstant.ParamInPublishProfile = 'publish-profile';
9-
ConfigurationConstant.ParamOutResultName = 'app-url';
10-
ConfigurationConstant.ActionName = 'DeployFunctionAppToAzure';
11-
ConfigurationConstant.BlobContainerName = 'github-actions-deploy';
12-
ConfigurationConstant.BlobNamePrefix = 'Functionapp';
13-
ConfigurationConstant.BlobServiceTimeoutMs = 3 * 1000;
14-
ConfigurationConstant.BlobUploadTimeoutMs = 30 * 60 * 1000;
15-
ConfigurationConstant.BlobUploadBlockSizeByte = 4 * 1024 * 1024;
16-
ConfigurationConstant.BlobUplaodBlockParallel = 4;
17-
ConfigurationConstant.BlobPermission = 'r';
18-
exports.ConfigurationConstant = ConfigurationConstant;
1+
"use strict";
2+
Object.defineProperty(exports, "__esModule", { value: true });
3+
class ConfigurationConstant {
4+
}
5+
ConfigurationConstant.ParamInAppName = 'app-name';
6+
ConfigurationConstant.ParamInPackagePath = 'package';
7+
ConfigurationConstant.ParamInSlot = 'slot-name';
8+
ConfigurationConstant.ParamInPublishProfile = 'publish-profile';
9+
ConfigurationConstant.ParamOutResultName = 'app-url';
10+
ConfigurationConstant.ActionName = 'DeployFunctionAppToAzure';
11+
ConfigurationConstant.BlobContainerName = 'github-actions-deploy';
12+
ConfigurationConstant.BlobNamePrefix = 'Functionapp';
13+
ConfigurationConstant.BlobServiceTimeoutMs = 3 * 1000;
14+
ConfigurationConstant.BlobUploadTimeoutMs = 30 * 60 * 1000;
15+
ConfigurationConstant.BlobUploadBlockSizeByte = 4 * 1024 * 1024;
16+
ConfigurationConstant.BlobUplaodBlockParallel = 4;
17+
ConfigurationConstant.BlobPermission = 'r';
18+
exports.ConfigurationConstant = ConfigurationConstant;

lib/constants/function_runtime.js

+26-26
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,26 @@
1-
"use strict";
2-
Object.defineProperty(exports, "__esModule", { value: true });
3-
const exceptions_1 = require("../exceptions");
4-
var FunctionRuntimeConstant;
5-
(function (FunctionRuntimeConstant) {
6-
FunctionRuntimeConstant[FunctionRuntimeConstant["None"] = 1] = "None";
7-
FunctionRuntimeConstant[FunctionRuntimeConstant["Dotnet"] = 2] = "Dotnet";
8-
FunctionRuntimeConstant[FunctionRuntimeConstant["Node"] = 3] = "Node";
9-
FunctionRuntimeConstant[FunctionRuntimeConstant["Powershell"] = 4] = "Powershell";
10-
FunctionRuntimeConstant[FunctionRuntimeConstant["Java"] = 5] = "Java";
11-
FunctionRuntimeConstant[FunctionRuntimeConstant["Python"] = 6] = "Python";
12-
})(FunctionRuntimeConstant = exports.FunctionRuntimeConstant || (exports.FunctionRuntimeConstant = {}));
13-
class FunctionRuntimeUtil {
14-
static FromString(language) {
15-
if (language === undefined) {
16-
return FunctionRuntimeConstant.None;
17-
}
18-
const key = language.charAt(0).toUpperCase() + language.toLowerCase().slice(1);
19-
const result = FunctionRuntimeConstant[key];
20-
if (result === undefined) {
21-
throw new exceptions_1.UnexpectedConversion('FunctionRuntimeConstant', language);
22-
}
23-
return result;
24-
}
25-
}
26-
exports.FunctionRuntimeUtil = FunctionRuntimeUtil;
1+
"use strict";
2+
Object.defineProperty(exports, "__esModule", { value: true });
3+
const exceptions_1 = require("../exceptions");
4+
var FunctionRuntimeConstant;
5+
(function (FunctionRuntimeConstant) {
6+
FunctionRuntimeConstant[FunctionRuntimeConstant["None"] = 1] = "None";
7+
FunctionRuntimeConstant[FunctionRuntimeConstant["Dotnet"] = 2] = "Dotnet";
8+
FunctionRuntimeConstant[FunctionRuntimeConstant["Node"] = 3] = "Node";
9+
FunctionRuntimeConstant[FunctionRuntimeConstant["Powershell"] = 4] = "Powershell";
10+
FunctionRuntimeConstant[FunctionRuntimeConstant["Java"] = 5] = "Java";
11+
FunctionRuntimeConstant[FunctionRuntimeConstant["Python"] = 6] = "Python";
12+
})(FunctionRuntimeConstant = exports.FunctionRuntimeConstant || (exports.FunctionRuntimeConstant = {}));
13+
class FunctionRuntimeUtil {
14+
static FromString(language) {
15+
if (language === undefined) {
16+
return FunctionRuntimeConstant.None;
17+
}
18+
const key = language.charAt(0).toUpperCase() + language.toLowerCase().slice(1);
19+
const result = FunctionRuntimeConstant[key];
20+
if (result === undefined) {
21+
throw new exceptions_1.UnexpectedConversion('FunctionRuntimeConstant', language);
22+
}
23+
return result;
24+
}
25+
}
26+
exports.FunctionRuntimeUtil = FunctionRuntimeUtil;

lib/constants/function_sku.js

+21-21
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,21 @@
1-
"use strict";
2-
Object.defineProperty(exports, "__esModule", { value: true });
3-
var FunctionSkuConstant;
4-
(function (FunctionSkuConstant) {
5-
FunctionSkuConstant[FunctionSkuConstant["Consumption"] = 1] = "Consumption";
6-
FunctionSkuConstant[FunctionSkuConstant["Dedicated"] = 2] = "Dedicated";
7-
FunctionSkuConstant[FunctionSkuConstant["ElasticPremium"] = 3] = "ElasticPremium";
8-
})(FunctionSkuConstant = exports.FunctionSkuConstant || (exports.FunctionSkuConstant = {}));
9-
class FunctionSkuUtil {
10-
static FromString(sku) {
11-
const skuLowercasedString = sku.trim().toLowerCase();
12-
if (skuLowercasedString.startsWith('dynamic')) {
13-
return FunctionSkuConstant.Consumption;
14-
}
15-
if (skuLowercasedString.startsWith('elasticpremium')) {
16-
return FunctionSkuConstant.ElasticPremium;
17-
}
18-
return FunctionSkuConstant.Dedicated;
19-
}
20-
}
21-
exports.FunctionSkuUtil = FunctionSkuUtil;
1+
"use strict";
2+
Object.defineProperty(exports, "__esModule", { value: true });
3+
var FunctionSkuConstant;
4+
(function (FunctionSkuConstant) {
5+
FunctionSkuConstant[FunctionSkuConstant["Consumption"] = 1] = "Consumption";
6+
FunctionSkuConstant[FunctionSkuConstant["Dedicated"] = 2] = "Dedicated";
7+
FunctionSkuConstant[FunctionSkuConstant["ElasticPremium"] = 3] = "ElasticPremium";
8+
})(FunctionSkuConstant = exports.FunctionSkuConstant || (exports.FunctionSkuConstant = {}));
9+
class FunctionSkuUtil {
10+
static FromString(sku) {
11+
const skuLowercasedString = sku.trim().toLowerCase();
12+
if (skuLowercasedString.startsWith('dynamic')) {
13+
return FunctionSkuConstant.Consumption;
14+
}
15+
if (skuLowercasedString.startsWith('elasticpremium')) {
16+
return FunctionSkuConstant.ElasticPremium;
17+
}
18+
return FunctionSkuConstant.Dedicated;
19+
}
20+
}
21+
exports.FunctionSkuUtil = FunctionSkuUtil;

lib/constants/publish_method.js

+9-9
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
"use strict";
2-
Object.defineProperty(exports, "__esModule", { value: true });
3-
var PublishMethodConstant;
4-
(function (PublishMethodConstant) {
5-
// Using api/zipdeploy endpoint in scm site
6-
PublishMethodConstant[PublishMethodConstant["ZipDeploy"] = 1] = "ZipDeploy";
7-
// Setting WEBSITE_RUN_FROM_PACKAGE app setting
8-
PublishMethodConstant[PublishMethodConstant["WebsiteRunFromPackageDeploy"] = 2] = "WebsiteRunFromPackageDeploy";
9-
})(PublishMethodConstant = exports.PublishMethodConstant || (exports.PublishMethodConstant = {}));
1+
"use strict";
2+
Object.defineProperty(exports, "__esModule", { value: true });
3+
var PublishMethodConstant;
4+
(function (PublishMethodConstant) {
5+
// Using api/zipdeploy endpoint in scm site
6+
PublishMethodConstant[PublishMethodConstant["ZipDeploy"] = 1] = "ZipDeploy";
7+
// Setting WEBSITE_RUN_FROM_PACKAGE app setting
8+
PublishMethodConstant[PublishMethodConstant["WebsiteRunFromPackageDeploy"] = 2] = "WebsiteRunFromPackageDeploy";
9+
})(PublishMethodConstant = exports.PublishMethodConstant || (exports.PublishMethodConstant = {}));

lib/constants/runtime_stack.js

+23-23
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,23 @@
1-
"use strict";
2-
Object.defineProperty(exports, "__esModule", { value: true });
3-
const exceptions_1 = require("../exceptions");
4-
var RuntimeStackConstant;
5-
(function (RuntimeStackConstant) {
6-
RuntimeStackConstant[RuntimeStackConstant["Unknown"] = 0] = "Unknown";
7-
RuntimeStackConstant[RuntimeStackConstant["Windows"] = 1] = "Windows";
8-
RuntimeStackConstant[RuntimeStackConstant["Linux"] = 2] = "Linux";
9-
})(RuntimeStackConstant = exports.RuntimeStackConstant || (exports.RuntimeStackConstant = {}));
10-
class RuntimeStackUtil {
11-
static FromString(osType) {
12-
if (!osType) {
13-
return RuntimeStackConstant.Unknown;
14-
}
15-
const key = osType.charAt(0).toUpperCase() + osType.toLowerCase().slice(1);
16-
const result = RuntimeStackConstant[key];
17-
if (result === undefined) {
18-
throw new exceptions_1.UnexpectedConversion("RuntimeStackConstant", osType);
19-
}
20-
return result;
21-
}
22-
}
23-
exports.RuntimeStackUtil = RuntimeStackUtil;
1+
"use strict";
2+
Object.defineProperty(exports, "__esModule", { value: true });
3+
const exceptions_1 = require("../exceptions");
4+
var RuntimeStackConstant;
5+
(function (RuntimeStackConstant) {
6+
RuntimeStackConstant[RuntimeStackConstant["Unknown"] = 0] = "Unknown";
7+
RuntimeStackConstant[RuntimeStackConstant["Windows"] = 1] = "Windows";
8+
RuntimeStackConstant[RuntimeStackConstant["Linux"] = 2] = "Linux";
9+
})(RuntimeStackConstant = exports.RuntimeStackConstant || (exports.RuntimeStackConstant = {}));
10+
class RuntimeStackUtil {
11+
static FromString(osType) {
12+
if (!osType) {
13+
return RuntimeStackConstant.Unknown;
14+
}
15+
const key = osType.charAt(0).toUpperCase() + osType.toLowerCase().slice(1);
16+
const result = RuntimeStackConstant[key];
17+
if (result === undefined) {
18+
throw new exceptions_1.UnexpectedConversion("RuntimeStackConstant", osType);
19+
}
20+
return result;
21+
}
22+
}
23+
exports.RuntimeStackUtil = RuntimeStackUtil;

lib/constants/state.js

+21-21
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,21 @@
1-
"use strict";
2-
Object.defineProperty(exports, "__esModule", { value: true });
3-
var StateConstant;
4-
(function (StateConstant) {
5-
// State when initialize Github Action
6-
StateConstant[StateConstant["Initialize"] = 1] = "Initialize";
7-
// Get & Check the parameter from action.yml
8-
StateConstant[StateConstant["ValidateParameter"] = 2] = "ValidateParameter";
9-
// Get & Check if the resources does exist
10-
StateConstant[StateConstant["ValidateAzureResource"] = 3] = "ValidateAzureResource";
11-
// Zip content and choose the proper deployment method
12-
StateConstant[StateConstant["PreparePublishContent"] = 4] = "PreparePublishContent";
13-
// Publish content to Azure Functionapps
14-
StateConstant[StateConstant["PublishContent"] = 5] = "PublishContent";
15-
// Validate if the content has been published successfully
16-
StateConstant[StateConstant["ValidatePublishedContent"] = 6] = "ValidatePublishedContent";
17-
// End state with success
18-
StateConstant[StateConstant["Succeeded"] = 7] = "Succeeded";
19-
// End state with failure
20-
StateConstant[StateConstant["Failed"] = 8] = "Failed";
21-
})(StateConstant = exports.StateConstant || (exports.StateConstant = {}));
1+
"use strict";
2+
Object.defineProperty(exports, "__esModule", { value: true });
3+
var StateConstant;
4+
(function (StateConstant) {
5+
// State when initialize Github Action
6+
StateConstant[StateConstant["Initialize"] = 1] = "Initialize";
7+
// Get & Check the parameter from action.yml
8+
StateConstant[StateConstant["ValidateParameter"] = 2] = "ValidateParameter";
9+
// Get & Check if the resources does exist
10+
StateConstant[StateConstant["ValidateAzureResource"] = 3] = "ValidateAzureResource";
11+
// Zip content and choose the proper deployment method
12+
StateConstant[StateConstant["PreparePublishContent"] = 4] = "PreparePublishContent";
13+
// Publish content to Azure Functionapps
14+
StateConstant[StateConstant["PublishContent"] = 5] = "PublishContent";
15+
// Validate if the content has been published successfully
16+
StateConstant[StateConstant["ValidatePublishedContent"] = 6] = "ValidatePublishedContent";
17+
// End state with success
18+
StateConstant[StateConstant["Succeeded"] = 7] = "Succeeded";
19+
// End state with failure
20+
StateConstant[StateConstant["Failed"] = 8] = "Failed";
21+
})(StateConstant = exports.StateConstant || (exports.StateConstant = {}));

0 commit comments

Comments
 (0)