Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-65682

Artifact link is not shown when using the Google Cloud buckets

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open (View Workflow)
    • Priority: Minor
    • Resolution: Unresolved
    • Labels:
      None
    • Environment:
      Jenkins core: 2.277.3
      S3 plugin version: 1.15
      CloudBees AWS Credentials: 1.28.1
    • Similar Issues:

      Description

      Versions:

      • Jenkins core: 2.277.3
      • S3 plugin version: 1.15
      • CloudBees AWS Credentials: 1.28.1

      Running on k8s.

      JCasC configuration with the Google Storage service account hmac:

       

      credentials:
        system:
          domainCredentials:
          - credentials:
            - aws:
                accessKey: "********"
                description: "observability-robots/issues/572"
                id: "jenkins-google-storage-hmac"
                scope: GLOBAL
                secretKey: "*****"
      aws:
        awsCredentials:
          credentialsId: "jenkins-google-storage-hmac"
          region: "us-east-2"
        s3:
          container: "apm-ci-temp"
          customEndpoint: "storage.googleapis.com"
          customSigningRegion: "us-central1"
          disableSessionToken: true
          prefix: "k8s/"
          useHttp: false
          usePathStyleUrl: false
      
      

       

      Then I created a dummy pipeline that can archive artifacts to the Google Storage 

       

       

      pipeline {
        agent { label 'k8s' }
        stages {
          stage ('Hello') {
            steps {
              echo "hello World"
              sh 'touch file'
              archiveArtifacts artifacts: 'file', followSymlinks: false 
            }
          }
        }
      }
      

       

       

      curl -I https://apm-ci-temp.storage.googleapis.com/k8s/hello/helloWorld-k8s/18/artifacts/file
      HTTP/2 200 
      x-guploader-uploadid: ABg5-Uw5PaI0KpPTvhe74sIoUbSVZt4y5o77Ev10wsA2H0F1YsgJ6n_IEaazUjup-dT_i-5sYZbKu35LHzMUTPO9JtQ
      expires: Thu, 20 May 2021 16:28:15 GMT
      date: Thu, 20 May 2021 15:28:15 GMT
      last-modified: Thu, 20 May 2021 15:20:58 GMT
      etag: "d41d8cd98f00b204e9800998ecf8427e"
      x-goog-generation: 1621524058712703
      x-goog-metageneration: 1
      x-goog-stored-content-encoding: identity
      x-goog-stored-content-length: 0
      content-type: application/octet-stream
      x-goog-hash: crc32c=AAAAAA==
      x-goog-hash: md5=1B2M2Y8AsgTpgAmY7PhCfg==
      x-goog-storage-class: STANDARD
      accept-ranges: bytes
      content-length: 0
      server: UploadServer
      cache-control: public, max-age=3600
      age: 19
      alt-svc: h3-29=":443"; ma=2592000,h3-T051=":443"; ma=2592000,h3-Q050=":443"; ma=2592000,h3-Q046=":443"; ma=2592000,h3-Q043=":443"; ma=2592000,quic=":443"; ma=2592000; v="46,43"
      

       

       

       

      Then the artifact link is not working (as shown in the screenshot) even though the artifacts have been uploaded (as shown in the screenshot)

       

       

      The stactraces looks like

       

       

      2021-05-20 15:23:12.712+0000 [id=492] WARNING h.i.i.InstallUncaughtExceptionHandler#handleException: Caught unhandled exception with ID 12264f36-1e5e-427b-a700-88c3bbb2c5572021-05-20 15:23:12.712+0000 [id=492] WARNING h.i.i.InstallUncaughtExceptionHandler#handleException: Caught unhandled exception with ID 12264f36-1e5e-427b-a700-88c3bbb2c557org.jclouds.aws.AWSResponseException: request GET https://apm-ci-temp.s3-us-east-2.amazonaws.com/?delimiter=/&prefix=k8s/hello/helloWorld-k8s/18/artifacts/ HTTP/1.1 failed with code 403, error: AWSError{requestId='*****', requestToken='******', code='InvalidAccessKeyId', message='The AWS Access Key Id you provided does not exist in our records.', context='{AWSAccessKeyId=*****, HostId=***}'} at org.jclouds.aws.handlers.ParseAWSErrorFromXmlContent.handleError(ParseAWSErrorFromXmlContent.java:76)Caused: org.jclouds.rest.AuthorizationException: The AWS Access Key Id you provided does not exist in our records. at org.jclouds.aws.handlers.ParseAWSErrorFromXmlContent.refineException(ParseAWSErrorFromXmlContent.java:123) at org.jclouds.s3.handlers.ParseS3ErrorFromXmlContent.refineException(ParseS3ErrorFromXmlContent.java:97) at org.jclouds.aws.handlers.ParseAWSErrorFromXmlContent.handleError(ParseAWSErrorFromXmlContent.java:90) at org.jclouds.http.handlers.DelegatingErrorHandler.handleError(DelegatingErrorHandler.java:65) at org.jclouds.http.internal.BaseHttpCommandExecutorService.shouldContinue(BaseHttpCommandExecutorService.java:138) at org.jclouds.http.internal.BaseHttpCommandExecutorService.invoke(BaseHttpCommandExecutorService.java:107) at org.jclouds.rest.internal.InvokeHttpMethod.invoke(InvokeHttpMethod.java:91) at org.jclouds.rest.internal.InvokeHttpMethod.apply(InvokeHttpMethod.java:74) at org.jclouds.rest.internal.InvokeHttpMethod.apply(InvokeHttpMethod.java:45) at org.jclouds.rest.internal.DelegatesToInvocationFunction.handle(DelegatesToInvocationFunction.java:156) at org.jclouds.rest.internal.DelegatesToInvocationFunction.invoke(DelegatesToInvocationFunction.java:123) at com.sun.proxy.$Proxy118.listBucket(Unknown Source) at org.jclouds.s3.blobstore.S3BlobStore.list(S3BlobStore.java:177) at io.jenkins.plugins.artifact_manager_jclouds.JCloudsVirtualFile.isDirectory(JCloudsVirtualFile.java:167) at hudson.model.DirectoryBrowserSupport.serveFile(DirectoryBrowserSupport.java:251) at hudson.model.DirectoryBrowserSupport.generateResponse(DirectoryBrowserSupport.java:156)
      

       

       

       

       

        Attachments

          Activity

          There are no comments yet on this issue.

            People

            Assignee:
            Unassigned Unassigned
            Reporter:
            v2v Victor Martinez
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated: