jenkinsci/google-storage-plugin

Failed classic upload step

Opened this issue · 1 comments

The build upload step always fails with this stacktrace.

java.io.IOException: Could not perform upload
[com.google.jenkins.plugins.storage.ClassicUploadStep.perform(ClassicUploadStep.java:185),
 org.jenkinsci.plugins.workflow.steps.CoreStep$Execution.run(CoreStep.java:80),
 org.jenkinsci.plugins.workflow.steps.CoreStep$Execution.run(CoreStep.java:67),
org.jenkinsci.plugins.workflow.steps.SynchronousNonBlockingStepExecution.lambda$start$0(SynchronousNonBlockingStepExecution.java:47),
 java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511),
 java.util.concurrent.FutureTask.run(FutureTask.java:266),
 java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149),
 java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624),
 java.lang.Thread.run(Thread.java:748)]

The stracktrace doesn't seem to contain any information that I can use to debug this.

I can confirm the service account is a storage admin and so has rights to the upload to this bucket.

google-storage-plugin version: 1.5.1
google-oauth-plugin version: 1.0.0

Do you know what is going wrong here?

I have seen a similar issue recently:
ERROR: [Google Cloud Storage Plugin] No artifacts found matching pattern: my_file.txt

In Jenkinsfile file, I have:
environment {
....
BUCKET = "gs://xxxx"
PATTERN = "my_file.txt"
}
steps {
step([
$class: 'ClassicUploadStep',
credentialsId: env.CREDENTIALS_ID,
bucket: "gs://${BUCKET}",
pattern: env.PATTERN])

Pattern cannot be found no matter using a filename directly or a relative path or absolute path.
Anyone can help?