awslabs / aws-codepipeline-plugin-for-jenkins

Use this plugin to integrate your Jenkins project with a pipeline in AWS CodePipeline. For more information and step-by-step directions on how to install and configure this plugin, follow the Four Stage Pipeline Tutorial. http://docs.aws.amazon.com/codepipeline/latest/userguide/getting-started-4.html
Apache License 2.0
82 stars 68 forks source link

Fails in publishing artifact, but succeeds on CodePipeline #40

Closed bilzard closed 4 years ago

bilzard commented 4 years ago

I am suffering from the following problem that sometimes occur:

I know that root cause is a Java VM issue, but I think that the correct behavior is that if a plugin fails to push an artifact to S3, it will be judged as a failure on CodePipeline.

Any workarounds or tips on this issue would be appreciated. Thanks.

Error message on Jenkins console

18:48:05 [AWS CodePipeline Plugin] Publishing artifacts
18:48:08 [AWS CodePipeline Plugin] Compressing directory '/var/lib/jenkins/workspace/PayReleaseSandboxProvisioningPartnerapi' as a 'Zip' archive
18:50:35 [AWS CodePipeline Plugin] Build succeeded, calling PutJobSuccessResult
18:50:36 FATAL: GC overhead limit exceeded
18:50:36 java.lang.OutOfMemoryError: GC overhead limit exceeded
18:50:36    at org.apache.commons.io.IOUtils.copy(IOUtils.java:2270)
18:50:36    at org.apache.commons.io.IOUtils.copyLarge(IOUtils.java:2291)
18:50:36    at org.apache.commons.io.IOUtils.copy(IOUtils.java:2246)
18:50:36    at hudson.util.IOUtils.copy(IOUtils.java:507)
18:50:36    at com.amazonaws.codepipeline.jenkinsplugin.CompressionTools.compressArchive(CompressionTools.java:166)
18:50:36    at com.amazonaws.codepipeline.jenkinsplugin.CompressionTools.compressZipFile(CompressionTools.java:99)
18:50:36    at com.amazonaws.codepipeline.jenkinsplugin.CompressionTools.compressFile(CompressionTools.java:64)
18:50:36    at com.amazonaws.codepipeline.jenkinsplugin.PublisherCallable.uploadDirectory(PublisherCallable.java:142)
18:50:36    at com.amazonaws.codepipeline.jenkinsplugin.PublisherCallable.invoke(PublisherCallable.java:108)
18:50:36    at com.amazonaws.codepipeline.jenkinsplugin.PublisherCallable.invoke(PublisherCallable.java:38)
18:50:36    at hudson.FilePath.act(FilePath.java:1078)
18:50:36    at hudson.FilePath.act(FilePath.java:1061)
18:50:36    at com.amazonaws.codepipeline.jenkinsplugin.AWSCodePipelinePublisher.callPublish(AWSCodePipelinePublisher.java:199)
18:50:36    at com.amazonaws.codepipeline.jenkinsplugin.AWSCodePipelinePublisher.perform(AWSCodePipelinePublisher.java:161)
18:50:36    at hudson.tasks.BuildStepMonitor$2.perform(BuildStepMonitor.java:32)
18:50:36    at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:741)
18:50:36    at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:690)
18:50:36    at hudson.model.Build$BuildExecution.post2(Build.java:186)
18:50:36    at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:635)
18:50:36    at hudson.model.Run.execute(Run.java:1840)
18:50:36    at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
18:50:36    at hudson.model.ResourceController.execute(ResourceController.java:97)
18:50:36    at hudson.model.Executor.run(Executor.java:429)
18:50:36 [WS-CLEANUP] Deleting project workspace...
18:50:36 [WS-CLEANUP] Deferred wipeout is used...
18:50:36 [WS-CLEANUP] done
18:50:36 Finished: FAILURE

Codepipeline screen capture

codepipeline
galmeida commented 4 years ago

Thanks for bringing this up, I will take a look

galmeida commented 4 years ago

The fix should be available in version 0.42 of the plugin, available for download in a couple of hours once jenkinsci plugin caches are populated.

bilzard commented 4 years ago

Thank you for responding at explosive speed!