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

pipeline-maven-plugin + artifactsPublisher on S3 fail with jdk11

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Minor Minor
    • Jenkins master 2.277.1
      Worker pod maven3.6 jdk11
      pipeline-maven-plugin 3.10.0
      artifact-manager-s3 1.15

      When maven maven-pieline-plugin tries to archive artifacts with s3 artifact manager on maven jdk11 pod it fails and signing error is thrown.

      ERROR: [withMaven] WARNING Exception executing Maven reporter 'Generated Artifacts Publisher' / org.jenkinsci.plugins.pipeline.maven.publishers.GeneratedArtifactsPublisher. Please report a bug associated for the component 'pipeline-maven-plugin' at https://issues.jenkins-ci.org
      java.io.IOException: Exception archiving {com/example/core-example-ejb/4.0/core-example-ejb-4.0.jar=example/core-example-ejb/target/core-model-exemple-4.0.jar,}
      	at org.jenkinsci.plugins.pipeline.maven.publishers.GeneratedArtifactsPublisher.process(GeneratedArtifactsPublisher.java:120)
      	at org.jenkinsci.plugins.pipeline.maven.MavenSpyLogProcessor.processMavenSpyLogs(MavenSpyLogProcessor.java:153)
      	at org.jenkinsci.plugins.pipeline.maven.WithMavenStepExecution2$WithMavenStepExecutionCallBack.finished(WithMavenStepExecution2.java:1103)
      	at org.jenkinsci.plugins.workflow.steps.GeneralNonBlockingStepExecution$TailCall.lambda$onSuccess$0(GeneralNonBlockingStepExecution.java:140)
      	at org.jenkinsci.plugins.workflow.steps.GeneralNonBlockingStepExecution.lambda$run$0(GeneralNonBlockingStepExecution.java:77)
      	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
      	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
      	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
      	at java.lang.Thread.run(Thread.java:748)
      Caused by: hudson.AbortException: Failed to upload /home/jenkins/agent/workspace/example.0.jar to https://example.s3.eu-west-1.amazonaws.com/.../4.0/example-4.0.jar?…, response: 403 Forbidden, body: <?xml version="1.0" encoding="UTF-8"?> <Error><Code>SignatureDoesNotMatch</Code><Message>The request signature we calculated does not match the signature you provided. Check your key and signing method.</Message>
      

      calling manually the artifact-manager-s3 plugin in the pipeline works properlly.

      Same setup using maven jdk8 pod works without issue.

          [JENKINS-65323] pipeline-maven-plugin + artifactsPublisher on S3 fail with jdk11

          Jesse Glick added a comment -

          Something smells off here. The signature is calculated on the controller and it should not matter what version of Java is used by the agent. (And if you are using the container step, which I would think you have to if you are using an official maven image, even the version of Java used by the agent is independent of the version of Java used by Maven.) Is this reproducible from scratch?

          Jesse Glick added a comment - Something smells off here. The signature is calculated on the controller and it should not matter what version of Java is used by the agent. (And if you are using the container step, which I would think you have to if you are using an official maven image, even the version of Java used by the agent is independent of the version of Java used by Maven.) Is this reproducible from scratch?

            Unassigned Unassigned
            fgarcia Federico Garcia
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: