public void Deploy() { OctopusTestAzureSubscription.IgnoreIfCertificateNotInstalled(); var nugetPackageFile = PackageBuilder.BuildSamplePackage("Octopus.Sample.AzureCloudService", "1.0.0"); var variablesFile = Path.GetTempFileName(); var variables = new VariableDictionary(); OctopusTestAzureSubscription.PopulateVariables(variables); OctopusTestCloudService.PopulateVariables(variables); variables.Set(SpecialVariables.Action.Azure.Slot, "Staging"); variables.Set(SpecialVariables.Action.Azure.SwapIfPossible, false.ToString()); variables.Set(SpecialVariables.Action.Azure.UseCurrentInstanceCount, false.ToString()); variables.Set(SpecialVariables.Action.Name, "AzureCloudService"); variables.Set(SpecialVariables.Release.Number, "1.0.0"); // Disable cspkg extraction variables.Set(SpecialVariables.Action.Azure.CloudServicePackageExtractionDisabled, true.ToString()); fileSystem = new WindowsPhysicalFileSystem(); stagingDirectory = Path.GetTempPath(); variables.Set(SpecialVariables.Action.Azure.PackageExtractionPath, stagingDirectory); variables.Save(variablesFile); result = Invoke( Calamari() .Action("deploy-azure-cloud-service") .Argument("package", nugetPackageFile) .Argument("variables", variablesFile)); }
public void Deploy() { const string webAppName = "octodemo003-dev"; OctopusTestAzureSubscription.IgnoreIfCertificateNotInstalled(); variables = new VariableDictionary(); OctopusTestAzureSubscription.PopulateVariables(variables); variables.Set(SpecialVariables.Action.Azure.WebAppName, webAppName); variables.Set("foo", "bar"); // Enable file substitution and configure the target variables.Set(SpecialVariables.Package.SubstituteInFilesEnabled, true.ToString()); variables.Set(SpecialVariables.Package.SubstituteInFilesTargets, "web.config"); fileSystem = new WindowsPhysicalFileSystem(); stagingDirectory = Path.GetTempPath(); variables.Set(SpecialVariables.Action.Azure.PackageExtractionPath, stagingDirectory); result = DeployPackage("Acme.Web"); }