本文整理汇总了TypeScript中webdeployment-common/msdeployutility.js.default类的典型用法代码示例。如果您正苦于以下问题:TypeScript js.default类的具体用法?TypeScript js.default怎么用?TypeScript js.default使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了js.default类的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。
示例1: checkParametersIfPresent
"transport connection": "transport connection",
"error code: ERROR_CONNECTION_TERMINATED": "ERROR_CONNECTION_TERMINATED"
}
function checkParametersIfPresent(argumentString: string, argumentCheckArray: Array<string>) {
for(var argument of argumentCheckArray) {
if(argumentString.indexOf(argument) == -1) {
return false;
}
}
return true;
}
var defaultMSBuildPackageArgument: string = msdeployUtility.getMSDeployCmdArgs('package.zip', 'webapp_name', {
publishUrl: 'http://webapp_name.scm.azurewebsites.net:443', userName: '$webapp_name', userPWD: 'webapp_password'
}, true, false, true, null, null, null, true, false, false);
console.log(` * MSBUILD DEFAULT PARAMS: ${defaultMSBuildPackageArgument}`);
if(checkParametersIfPresent(defaultMSBuildPackageArgument, ["-source:package=\"'package.zip'\"",
" -dest:auto,ComputerName=\"'https://http://webapp_name.scm.azurewebsites.net:443/msdeploy.axd?site=webapp_name'\",UserName=\"'$webapp_name'\",Password=\"'webapp_password'\",AuthType=\"'Basic'\"",
" -setParam:name=\"'IIS Web Application Name'\",value=\"'webapp_name'\"", '-enableRule:AppOffline']) && defaultMSBuildPackageArgument.indexOf('-setParamFile') == -1) {
console.log("MSBUILD DEFAULT PARAMS PASSED");
}
else {
throw new Error('MSBUILD PACKAGE DEFAULT PARAMS FAILED');
}
var packageWithSetParamArgument: string = msdeployUtility.getMSDeployCmdArgs('package.zip', 'webapp_name', {
publishUrl: 'http://webapp_name.scm.azurewebsites.net:443', userName: '$webapp_name', userPWD: 'webapp_password'
示例2: DeployWebAppStep
public async DeployWebAppStep() {
if(!tl.osType().match(/^Win/)){
throw Error(tl.loc("PublishusingwebdeployoptionsaresupportedonlywhenusingWindowsagent"));
}
tl.debug("Performing the deployment of webapp using publish profile.");
var applyFileTransformFlag = this.taskParams.JSONFiles.length != 0 || this.taskParams.XmlTransformation || this.taskParams.XmlVariableSubstitution;
if(applyFileTransformFlag) {
await this.ApplyFileTransformation();
}
var msDeployPublishingProfile: PublishingProfile = await this.publishProfileUtility.GetTaskParametersFromPublishProfileFile(this.taskParams);
var deployCmdFilePath = this.GetDeployCmdFilePath();
await this.SetMsdeployEnvPath();
var cmdArgs:string = this.GetDeployScriptCmdArgs(deployCmdFilePath, msDeployPublishingProfile);
var retryCountParam = tl.getVariable("appservice.msdeployretrycount");
var retryCount = (retryCountParam && !(isNaN(Number(retryCountParam)))) ? Number(retryCountParam): DEFAULT_RETRY_COUNT;
try {
while(true) {
try {
retryCount -= 1;
await this.publishProfileUtility.RunCmd(cmdArgs);
break;
}
catch (error) {
if(retryCount == 0) {
throw error;
}
console.log(error);
console.log(tl.loc('RetryToDeploy'));
}
}
console.log(tl.loc('PackageDeploymentSuccess'));
}
catch (error) {
tl.error(tl.loc('PackageDeploymentFailed'));
tl.debug(JSON.stringify(error));
msDeployUtility.redirectMSDeployErrorToConsole();
throw Error(error.message);
}
finally {
this.ResetMsdeployEnvPath();
if(applyFileTransformFlag) {
this.ResetFileTransformation();
}
}
}
示例3: trun
async function trun() {
var result = await msDeployUtility.containsParamFile("webAppPkg.zip");
console.log("the result is: " + result);
}
示例4: SetMsdeployEnvPath
private async SetMsdeployEnvPath() {
var msDeployPath = await msDeployUtility.getMSDeployFullPath();
var msDeployDirectory = msDeployPath.slice(0, msDeployPath.lastIndexOf('\\') + 1);
this.origEnvPath = process.env.PATH;
process.env.PATH = msDeployDirectory + ";" + process.env.PATH ;
}