public void CopyApplicationPackage(string connectionEndpoint, string applicationPackagePath, string imageStoreConnectionString, string relativeDestinationPath, string certThumbprint) { IImageStore imageStore = CreateImageStore(connectionEndpoint, imageStoreConnectionString, Path.GetTempPath(), certThumbprint); if (string.IsNullOrEmpty(relativeDestinationPath)) { relativeDestinationPath = new DirectoryInfo(applicationPackagePath).Name; } ImageBuilderUtility.ValidateRelativePath(relativeDestinationPath); imageStore.UploadContent( relativeDestinationPath, applicationPackagePath, AzureCliProxy.DefaultTimeSpan, CopyFlag.AtomicCopy, false); }
internal bool ValidateImageStorePath(string path) { string[] reservedDirectoryNames = new string[] { Constants.StoreFolder, Constants.WindowsFabricStoreFolder }; try { ImageBuilderUtility.ValidateRelativePath( path, reservedDirectoryNames); } catch (FabricImageBuilderReservedDirectoryException ex) { return(this.ShouldContinue(ex.Message, string.Empty)); } return(true); }