Class UploadService
java.lang.Object
com.microsoftopentechnologies.windowsazurestorage.service.StoragePluginService<UploadServiceData>
com.microsoftopentechnologies.windowsazurestorage.service.UploadService
- Direct Known Subclasses:
UploadToBlobService,UploadToFileService
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected static classData object for https uploading command.protected static classData object for https uploading result. -
Field Summary
FieldsFields inherited from class com.microsoftopentechnologies.windowsazurestorage.service.StoragePluginService
FP_SEPARATOR -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected Stringfinal intexecute()protected StringgenerateWriteSASURL(StorageAccountInfo storageAccountInfo, String fileName, String storageType, String name) protected StringgetItemPath(FilePath path, String embeddedVP, UploadServiceData serviceData) Convert the path on local file system to relative path on azure storage.protected StringremovePrefix(URI srcURI, UploadServiceData serviceData) protected voidupdateAzureBlobs(List<UploadService.UploadResult> results, List<AzureBlob> azureBlobs) Update Jenkins controller's records of uploaded files.updateMetadata(Map<String, String> metadata) protected abstract voiduploadArchive(String archiveIncludes) protected voiduploadCloudFile(com.azure.storage.file.share.ShareFileClient fileClient, FilePath localPath) protected abstract voiduploadIndividuals(String embeddedVP, FilePath[] paths) protected abstract voiduploadIndividuals(String embeddedVP, FilePath[] paths, FilePath workspace) protected voidMethods inherited from class com.microsoftopentechnologies.windowsazurestorage.service.StoragePluginService
error, getServiceData, getTime, println, setRunUnstable, setServiceData
-
Field Details
-
ZIP_FOLDER_NAME
- See Also:
-
ZIP_NAME
- See Also:
-
-
Constructor Details
-
UploadService
-
-
Method Details
-
updateAzureBlobs
protected void updateAzureBlobs(List<UploadService.UploadResult> results, List<AzureBlob> azureBlobs) throws WAStorageException Update Jenkins controller's records of uploaded files.- Parameters:
results- Response from the the agents.azureBlobs- Records of the uploaded files.- Throws:
WAStorageException- throw exceptions when failing to fetch the the response.
-
generateWriteSASURL
protected String generateWriteSASURL(StorageAccountInfo storageAccountInfo, String fileName, String storageType, String name) throws MalformedURLException, URISyntaxException -
uploadIndividuals
protected abstract void uploadIndividuals(String embeddedVP, FilePath[] paths, FilePath workspace) throws WAStorageException - Throws:
WAStorageException
-
uploadIndividuals
protected abstract void uploadIndividuals(String embeddedVP, FilePath[] paths) throws WAStorageException - Throws:
WAStorageException
-
uploadArchive
- Throws:
WAStorageException
-
execute
- Specified by:
executein classStoragePluginService<UploadServiceData>- Throws:
WAStorageException
-
waitForUploadEnd
-
excludedFilesAndZip
-
removePrefix
-
getItemPath
protected String getItemPath(FilePath path, String embeddedVP, UploadServiceData serviceData) throws IOException, InterruptedException Convert the path on local file system to relative path on azure storage.- Parameters:
path- the local pathembeddedVP- the embedded virtual path- Returns:
- Throws:
IOExceptionInterruptedException
-
updateMetadata
protected Map<String,String> updateMetadata(Map<String, String> metadata) throws IOException, InterruptedException- Throws:
IOExceptionInterruptedException
-
getExecutorService
-