Esempio n. 1
0
        /// <summary>
        /// This creates a blob container using the default container name "elastadeploy" and uploads the package
        /// </summary>
        private string UploadPackageBlob()
        {
            _blobClient.CreatBlobContainer();
            _manager.WriteComplete(EventPoint.StorageBlobContainerCreated, "Blob container " + Constants.DefaultBlobContainerName + " created");
            // TODO: this smells really bad fix!!
            if (_manager.LocalPackagePathName == null)
            {
                var configuration = new DeploymentConfigurationFileActivity(_manager);
                ((IDeploymentConfigurationFileActivity)configuration).WithPackageConfigDirectory(_manager.BuildActivity.PackageNameLocation);
            }
            var    packageName    = _manager.LocalPackagePathName;
            string deploymentPath = _blobClient.CreateAndUploadBlob(Path.GetFileName(packageName), packageName);

            _manager.WriteComplete(EventPoint.DeploymentPackageUploadComplete, "Uploaded package to default blob container");
            //return blobCreate.DeploymentPath;
            return(deploymentPath);
        }