本文整理汇总了TypeScript中webdeployment-common/packageUtility.js.default.PackageUtility类的典型用法代码示例。如果您正苦于以下问题:TypeScript js.default.PackageUtility类的具体用法?TypeScript js.default.PackageUtility怎么用?TypeScript js.default.PackageUtility使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了js.default.PackageUtility类的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的TypeScript代码示例。
示例1: ApplyFileTransformation
private async ApplyFileTransformation() {
this.origWebPackage = packageUtility.PackageUtility.getPackagePath(this.taskParams.Package);
this.modWebPackage = await FileTransformsUtility.applyTransformations(this.origWebPackage, this.taskParams);
this.bakWebPackage = this.origWebPackage + ".bak";
fs.renameSync(this.origWebPackage, this.bakWebPackage);
fs.renameSync(this.modWebPackage, this.origWebPackage);
}
开发者ID:bleissem,项目名称:vsts-tasks,代码行数:7,代码来源:PublishProfileWebAppDeploymentProvider.ts
示例2: _getFileSourceArgument
/**
* Get connection argument to run script from file or inline
*/
private _getFileSourceArgument() : string {
let fileSourceArgument ;
if( this._azureMysqlTaskParameter.getTaskNameSelector() === 'InlineSqlTask' ) {
fileSourceArgument = " -e" + '"' + this._azureMysqlTaskParameter.getSqlInline() + '"';
}
else {
fileSourceArgument = " -e" + '" source ' + packageUtility.PackageUtility.getPackagePath(this._azureMysqlTaskParameter.getSqlFile()) + '"';
}
return fileSourceArgument;
}
开发者ID:bleissem,项目名称:vsts-tasks,代码行数:14,代码来源:MysqlClient.ts
示例3: DeployWebAppStep
public async DeployWebAppStep() {
var webPackage = packageUtility.PackageUtility.getPackagePath(this.taskParams.Package);
tl.debug('Performing Linux built-in package deployment');
this.zipDeploymentID = await this.kuduServiceUtility.zipDeploy(webPackage, this.taskParams.TakeAppOfflineFlag,
{ slotName: this.appService.getSlot() });
await this.appServiceUtility.updateStartupCommandAndRuntimeStack(this.taskParams.RuntimeStack, this.taskParams.StartupCommand);
await this.PostDeploymentStep();
}
开发者ID:bleissem,项目名称:vsts-tasks,代码行数:11,代码来源:BuiltInLinuxWebAppDeploymentProvider.ts
示例4: DeployWebAppStep
public async DeployWebAppStep() {
var webPackage = packageUtility.PackageUtility.getPackagePath(this.taskParams.Package);
var isFolderBasedDeployment = deployUtility.isInputPkgIsFolder(webPackage);
var physicalPath: string = Constant.SiteRoot;
if(this.taskParams.VirtualApplication) {
physicalPath = await this.appServiceUtility.getPhysicalPath(this.taskParams.VirtualApplication);
await this.kuduServiceUtility.createPathIfRequired(physicalPath);
this.virtualApplicationPath = physicalPath;
}
webPackage = await FileTransformsUtility.applyTransformations(webPackage, this.taskParams);
if(deployUtility.canUseWebDeploy(this.taskParams.UseWebDeploy)) {
tl.debug("Performing the deployment of webapp.");
if(!tl.osType().match(/^Win/)){
throw Error(tl.loc("PublishusingwebdeployoptionsaresupportedonlywhenusingWindowsagent"));
}
if(this.taskParams.RenameFilesFlag) {
await this.appServiceUtility.enableRenameLockedFiles();
}
var msDeployPublishingProfile = await this.appServiceUtility.getWebDeployPublishingProfile();
if (webPackage.toString().toLowerCase().endsWith('.war')) {
await DeployWar(webPackage, this.taskParams, msDeployPublishingProfile, this.kuduService, this.appServiceUtility);
}
else {
await msDeploy.DeployUsingMSDeploy(webPackage, this.taskParams.WebAppName, msDeployPublishingProfile,
this.taskParams.RemoveAdditionalFilesFlag, this.taskParams.ExcludeFilesFromAppDataFlag, this.taskParams.TakeAppOfflineFlag,
this.taskParams.VirtualApplication, this.taskParams.SetParametersFile, this.taskParams.AdditionalArguments,
isFolderBasedDeployment, this.taskParams.UseWebDeploy);
}
}
else {
tl.debug("Initiated deployment via kudu service for webapp package : ");
await this.kuduServiceUtility.deployWebPackage(webPackage, physicalPath, this.taskParams.VirtualApplication, this.taskParams.TakeAppOfflineFlag);
}
await this.PostDeploymentStep();
}
开发者ID:bleissem,项目名称:vsts-tasks,代码行数:42,代码来源:WindowsWebAppDeploymentProvider.ts
示例5: main
async function main() {
let zipDeploymentID: string;
let isDeploymentSuccess: boolean = true;
let kuduServiceUtility: KuduServiceUtility;
try {
tl.setResourcePath(path.join( __dirname, 'task.json'));
var taskParams: TaskParameters = TaskParametersUtility.getParameters();
var azureEndpoint: AzureEndpoint = await new AzureRMEndpoint(taskParams.connectedServiceName).getEndpoint();
var virtualApplicationPath: string;
console.log(tl.loc('GotconnectiondetailsforazureRMWebApp0', taskParams.WebAppName));
if(!taskParams.DeployToSlotFlag) {
taskParams.ResourceGroupName = await AzureResourceFilterUtility.getResourceGroupName(azureEndpoint, taskParams.WebAppName);
}
tl.debug(`Resource Group: ${taskParams.ResourceGroupName}`);
var appService: AzureAppService = new AzureAppService(azureEndpoint, taskParams.ResourceGroupName, taskParams.WebAppName, taskParams.SlotName, taskParams.WebAppKind);
let appServiceUtility: AzureAppServiceUtility = new AzureAppServiceUtility(appService);
await appServiceUtility.pingApplication();
let kuduService: Kudu = await appServiceUtility.getKuduService();
kuduServiceUtility = new KuduServiceUtility(kuduService);
if(taskParams.WebAppUri) {
tl.setVariable(taskParams.WebAppUri, await appServiceUtility.getApplicationURL(!taskParams.isLinuxApp ? taskParams.VirtualApplication : null));
}
if(taskParams.isLinuxApp) {
switch(taskParams.ImageSource) {
case 'Builtin': {
var webPackage = packageUtility.PackageUtility.getPackagePath(taskParams.Package);
tl.debug('Performing Linux built-in package deployment');
zipDeploymentID = await kuduServiceUtility.zipDeploy(webPackage, taskParams.TakeAppOfflineFlag, { slotName: appService.getSlot() });
await appServiceUtility.updateStartupCommandAndRuntimeStack(taskParams.RuntimeStack, taskParams.StartupCommand);
break;
}
case 'Registry': {
tl.debug("Performing container based deployment.");
let containerDeploymentUtility: ContainerBasedDeploymentUtility = new ContainerBasedDeploymentUtility(appService);
await containerDeploymentUtility.deployWebAppImage(taskParams);
break;
}
default: {
throw new Error('Invalid Image source Type');
}
}
}
else {
var webPackage = packageUtility.PackageUtility.getPackagePath(taskParams.Package);
var isFolderBasedDeployment = deployUtility.isInputPkgIsFolder(webPackage);
var physicalPath: string = '/site/wwwroot';
if(taskParams.VirtualApplication) {
physicalPath = await appServiceUtility.getPhysicalPath(taskParams.VirtualApplication);
await kuduServiceUtility.createPathIfRequired(physicalPath);
virtualApplicationPath = physicalPath;
}
webPackage = await FileTransformsUtility.applyTransformations(webPackage, taskParams);
if(deployUtility.canUseWebDeploy(taskParams.UseWebDeploy)) {
tl.debug("Performing the deployment of webapp.");
if(!tl.osType().match(/^Win/)){
throw Error(tl.loc("PublishusingwebdeployoptionsaresupportedonlywhenusingWindowsagent"));
}
if(taskParams.RenameFilesFlag) {
await appServiceUtility.enableRenameLockedFiles();
}
var msDeployPublishingProfile = await appServiceUtility.getWebDeployPublishingProfile();
if (webPackage.toString().toLowerCase().endsWith('.war')) {
await DeployWar(webPackage, taskParams, msDeployPublishingProfile, kuduService, appServiceUtility);
}
else {
await msDeploy.DeployUsingMSDeploy(webPackage, taskParams.WebAppName, msDeployPublishingProfile, taskParams.RemoveAdditionalFilesFlag,
taskParams.ExcludeFilesFromAppDataFlag, taskParams.TakeAppOfflineFlag, taskParams.VirtualApplication, taskParams.SetParametersFile,
taskParams.AdditionalArguments, isFolderBasedDeployment, taskParams.UseWebDeploy);
}
}
else {
tl.debug("Initiated deployment via kudu service for webapp package : ");
await kuduServiceUtility.deployWebPackage(webPackage, physicalPath, taskParams.VirtualApplication, taskParams.TakeAppOfflineFlag);
}
}
if(!taskParams.isContainerWebApp) {
if(taskParams.AppSettings) {
var customApplicationSettings = ParameterParser.parse(taskParams.AppSettings);
await appServiceUtility.updateAndMonitorAppSettings(customApplicationSettings);
}
if(taskParams.ConfigurationSettings) {
var customApplicationSettings = ParameterParser.parse(taskParams.ConfigurationSettings);
await appServiceUtility.updateConfigurationSettings(customApplicationSettings);
}
}
else {
tl.debug('App Settings and config settings are already updated during container based deployment.')
}
if(taskParams.ScriptType) {
//.........这里部分代码省略.........
开发者ID:Microsoft,项目名称:vsts-tasks,代码行数:101,代码来源:azurermwebappdeployment.ts
示例6: GetDeployCmdFilePath
private GetDeployCmdFilePath(): string {
var webPackagePath = packageUtility.PackageUtility.getPackagePath(this.taskParams.Package);
var packageDir = path.dirname(webPackagePath);
return packageUtility.PackageUtility.getPackagePath(packageDir + "\\*.deploy.cmd");
}
开发者ID:bleissem,项目名称:vsts-tasks,代码行数:5,代码来源:PublishProfileWebAppDeploymentProvider.ts
注:本文中的webdeployment-common/packageUtility.js.default.PackageUtility类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论