public void Deserialize_XCopy_Package_Descriptor_Test() { System.Environment.CurrentDirectory = "samples".MapVcsRoot(); MsBuild("PowerDeploy.Sample.XCopy\\PowerDeploy.Sample.XCopy.csproj /t:clean,build /p:RunOctoPack=true /p:OctoPackPackageVersion=1.3.3.7 /p:Configuration=Release /v:m"); var environmentMock = new Mock <IEnvironmentProvider>(); environmentMock.Setup(prov => prov.GetEnvironment(It.IsAny <string>())).Returns(GetUnitEnvironment); var outputPath = FileSystem.CreateTempWorkingDir(); var target = new PackageManager(environmentMock.Object); target.ConfigurePackageByEnvironment(@"PowerDeploy.Sample.XCopy\obj\octopacked\PowerDeploy.Sample.XCopy.1.3.3.7.nupkg", "Unit", outputPath); var nupkg = new ZipPackage(Path.Combine(outputPath, "PowerDeploy.Sample.XCopy_v1.3.3.7_UNIT.nupkg")); var options = nupkg.GetPackageOptions <XCopyOptions>(); Assert.AreEqual("xcopy", nupkg.PeekPackageType()); Assert.AreEqual(@"c:\temp", options.Destination); Assert.AreEqual("UNIT", options.Environment); }
public bool Deploy(ZipPackage package, ILog logger) { var options = package.GetPackageOptions<WebOptions>(); logger.Info("Deploying iis package to {0}:{1} using {2}".Fmt(options.WebsiteName, options.WebsitePort, options.DeployService)); var client = new JsonServiceClient(options.DeployService); // todo var request = new TriggerDeployment() { AppPoolName = "ZZZ_Integration_PoolName", AppPoolUser = "******", AppPoolPassword = "******", WebsiteName = "ZZZ_Integration_Website_Simple", AppRoot = "/", PackageId = "IntegrationTest", PackageVersion = "1.3.3.7", WebsitePhysicalPath = @"C:\temp\integrationtests", RuntimeVersion = RuntimeVersion.Version40, }; var response = client.PostFileWithRequest<TriggerDeploymentResponse>("/deployments", new FileInfo("package.zip"), request); return true; }
public bool Deploy(ZipPackage package, ILog logger) { var options = package.GetPackageOptions <WebOptions>(); logger.Info("Deploying iis package to {0}:{1} using {2}".Fmt(options.WebsiteName, options.WebsitePort, options.DeployService)); var client = new JsonServiceClient(options.DeployService); // todo var request = new TriggerDeployment() { AppPoolName = "ZZZ_Integration_PoolName", AppPoolUser = "******", AppPoolPassword = "******", WebsiteName = "ZZZ_Integration_Website_Simple", AppRoot = "/", PackageId = "IntegrationTest", PackageVersion = "1.3.3.7", WebsitePhysicalPath = @"C:\temp\integrationtests", RuntimeVersion = RuntimeVersion.Version40, }; var response = client.PostFileWithRequest <TriggerDeploymentResponse>("/deployments", new FileInfo("package.zip"), request); return(true); }