public static void buildTasks(this ICakeContext context) { OctopusDeployUrl = "https://deploy.hhaexchange.com"; Target = context.Argument("target", "OctoRelease"); BuildNumber = context.ArgumentOrEnvironmentVariable("build.number", "", "0.0.1-local.0"); OctopusDeployApiKey = context.ArgumentOrEnvironmentVariable("OctopusDeployApiKey", ""); MsBuildLogger = context.ArgumentOrEnvironmentVariable("MsBuildLogger", "", ""); ProjectName = context.ArgumentOrEnvironmentVariable("ProjectName", "", "ENT"); ProcessesProjectName = context.ArgumentOrEnvironmentVariable("ProcessesProjectName", "", "ENT Processes"); APIProjectName = context.ArgumentOrEnvironmentVariable("APIProjectName", "", "ENT.Internal.API"); DeploymentBranches = context.ArgumentOrEnvironmentVariable("DeploymentBranches", "", " "); TeamCityBuildAgentDirectory = context.ArgumentOrEnvironmentVariable("teamcity.agent.home.dir", "", "c:\\BuildAgent"); NodeBackupPath = TeamCityBuildAgentDirectory + "\\node_backup\\ENTP\\node_modules"; BranchName = null; tenant = null; TaskBuild(context); }
public static bool ArgumentOrEnvironmentVariable(this ICakeContext context, string name, bool defaultValue) { return(context.ArgumentOrEnvironmentVariable(name, null, defaultValue)); }
public static string ArgumentOrEnvironmentVariable(this ICakeContext context, string name, string defaultValue = null) { return(context.ArgumentOrEnvironmentVariable(name, string.Empty, defaultValue)); }