-
Bug
-
Resolution: Fixed
-
Major
-
None
-
-
1.0.4
My Jenkinsfile
pipeline { agent { label 'WinAgent' } stages{ stage('Create file'){ steps { bat 'echo 1 > hello.txt' } } stage('Upload to Azure Storage'){ steps { archiveArtifacts artifacts: 'hello.txt', onlyIfSuccessful: false azureUpload storageCredentialId: 'my-blob-storage', storageType: 'blobstorage', containerName: 'mycontainer', filesPath: 'hello.txt', virtualPath: '' } } } }
results in
[Pipeline] stage [Pipeline] { (Create file) [Pipeline] bat C:\Jenkins\workspace\my_feature_jenkinsAzure>echo 1 1>hello.txt [Pipeline] } [Pipeline] // stage [Pipeline] stage [Pipeline] { (Upload to Azure Storage) [Pipeline] archiveArtifacts Archiving artifacts [Pipeline] azureUpload MicrosoftAzureStorage - Container name: mycontainer MicrosoftAzureStorage - share name: MicrosoftAzureStorage - File path: hello.txt MicrosoftAzureStorage - Virtual path: MicrosoftAzureStorage - Exclude path: MicrosoftAzureStorage - Uploading files to Microsoft Azure ERROR: MicrosoftAzureStorage - Error occurred while uploading to Azure - myblobstorage com.microsoftopentechnologies.windowsazurestorage.exceptions.WAStorageException: Fail to upload archive to blob at com.microsoftopentechnologies.windowsazurestorage.service.UploadToBlobService.uploadIndividuals(UploadToBlobService.java:143) at com.microsoftopentechnologies.windowsazurestorage.service.UploadService.execute(UploadService.java:703) at com.microsoftopentechnologies.windowsazurestorage.WAStoragePublisher.perform(WAStoragePublisher.java:423) at org.jenkinsci.plugins.workflow.steps.CoreStep$Execution.run(CoreStep.java:80) at org.jenkinsci.plugins.workflow.steps.CoreStep$Execution.run(CoreStep.java:67) at org.jenkinsci.plugins.workflow.steps.SynchronousNonBlockingStepExecution.lambda$start$0(SynchronousNonBlockingStepExecution.java:47) at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source) at java.util.concurrent.FutureTask.run(Unknown Source) at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) at java.lang.Thread.run(Unknown Source) Caused by: java.io.IOException: java.util.concurrent.ExecutionException: java.lang.NoClassDefFoundError: Could not initialize class com.microsoftopentechnologies.windowsazurestorage.service.UploadService at com.microsoftopentechnologies.windowsazurestorage.service.UploadService$UploadOnSlave.invoke(UploadService.java:363) at com.microsoftopentechnologies.windowsazurestorage.service.UploadService$UploadOnSlave.invoke(UploadService.java:336) at hudson.FilePath$FileCallableWrapper.call(FilePath.java:3050) at hudson.remoting.UserRequest.perform(UserRequest.java:212) at hudson.remoting.UserRequest.perform(UserRequest.java:54) at hudson.remoting.Request$2.run(Request.java:369) at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:72) at java.util.concurrent.FutureTask.run(Unknown Source) at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) at hudson.remoting.Engine$1.lambda$newThread$0(Engine.java:93) ... 1 more Suppressed: hudson.remoting.Channel$CallSiteStackTrace: Remote call to JNLP4-connect connection from jka101.intern.XXXXX.de/192.168.11.142:62349 at hudson.remoting.Channel.attachCallSiteStackTrace(Channel.java:1743) at hudson.remoting.UserRequest$ExceptionResponse.retrieve(UserRequest.java:357) at hudson.remoting.Channel.call(Channel.java:957) at hudson.FilePath.act(FilePath.java:1070) at hudson.FilePath.act(FilePath.java:1059) at com.microsoftopentechnologies.windowsazurestorage.service.UploadToBlobService.uploadIndividuals(UploadToBlobService.java:134) at com.microsoftopentechnologies.windowsazurestorage.service.UploadService.execute(UploadService.java:703) at com.microsoftopentechnologies.windowsazurestorage.WAStoragePublisher.perform(WAStoragePublisher.java:423) at org.jenkinsci.plugins.workflow.steps.CoreStep$Execution.run(CoreStep.java:80) at org.jenkinsci.plugins.workflow.steps.CoreStep$Execution.run(CoreStep.java:67) at org.jenkinsci.plugins.workflow.steps.SynchronousNonBlockingStepExecution.lambda$start$0(SynchronousNonBlockingStepExecution.java:47) at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source) at java.util.concurrent.FutureTask.run(Unknown Source) at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) ... 1 more Caused by: java.util.concurrent.ExecutionException: java.lang.NoClassDefFoundError: Could not initialize class com.microsoftopentechnologies.windowsazurestorage.service.UploadService at java.util.concurrent.FutureTask.report(Unknown Source) at java.util.concurrent.FutureTask.get(Unknown Source) at com.microsoftopentechnologies.windowsazurestorage.service.UploadService$UploadOnSlave.invoke(UploadService.java:360) ... 11 more Caused by: java.lang.NoClassDefFoundError: Could not initialize class com.microsoftopentechnologies.windowsazurestorage.service.UploadService at com.microsoftopentechnologies.windowsazurestorage.service.UploadService$UploadThread.execute(UploadService.java:586) at com.microsoftopentechnologies.windowsazurestorage.service.UploadService$UploadThread.call(UploadService.java:504) at com.microsoftopentechnologies.windowsazurestorage.service.UploadService$UploadThread.call(UploadService.java:413) at java.util.concurrent.FutureTask.run(Unknown Source) at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) ... 1 more [Pipeline] } [Pipeline] // stage [Pipeline] } [Pipeline] // withEnv [Pipeline] } [Pipeline] // node [Pipeline] End of Pipeline [Bitbucket] Notifying commit build result [Bitbucket] Build result notified java.io.IOException: MicrosoftAzureStorage - Error occurred while uploading to Azure - myblobstorage at com.microsoftopentechnologies.windowsazurestorage.WAStoragePublisher.perform(WAStoragePublisher.java:454) at org.jenkinsci.plugins.workflow.steps.CoreStep$Execution.run(CoreStep.java:80) at org.jenkinsci.plugins.workflow.steps.CoreStep$Execution.run(CoreStep.java:67) at org.jenkinsci.plugins.workflow.steps.SynchronousNonBlockingStepExecution.lambda$start$0(SynchronousNonBlockingStepExecution.java:47) at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source) at java.util.concurrent.FutureTask.run(Unknown Source) at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) at java.lang.Thread.run(Unknown Source) Finished: FAILURE
After this "mycontainer" is visible in the Azure Storage Explorer but hello.txt wasn't uploaded.
The config of the Microsoft Azure Storage -Jenkins Credentials works for download a file with azureDownload. Also the upload for a file to mycontainer works from Powershell with the configured Access Key.
- links to