當前位置: 首頁>>代碼示例>>TypeScript>>正文


TypeScript msdeployutility.js.default類代碼示例

本文整理匯總了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'
開發者ID:Microsoft,項目名稱:vsts-tasks,代碼行數:31,代碼來源:L0MSDeployUtility.ts

示例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();
            }
        }
    }
開發者ID:bleissem,項目名稱:vsts-tasks,代碼行數:51,代碼來源:PublishProfileWebAppDeploymentProvider.ts

示例3: trun

async function trun() {
    var result = await msDeployUtility.containsParamFile("webAppPkg.zip");
    console.log("the result is: " + result);
}
開發者ID:ReneSchumacher,項目名稱:VSTS-Tasks,代碼行數:4,代碼來源:L0MSDeployUtility.ts

示例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 ;
 }
開發者ID:bleissem,項目名稱:vsts-tasks,代碼行數:6,代碼來源:PublishProfileWebAppDeploymentProvider.ts


注:本文中的webdeployment-common/msdeployutility.js.default類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。