Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

snippet generator generates faulty code (File and IncludePathPattern cannot be used together) #283

Open
m8ram opened this issue Aug 25, 2021 · 0 comments
Labels

Comments

@m8ram
Copy link

m8ram commented Aug 25, 2021

Version report

Jenkins and plugins versions report:

Jenkins 2.263.3
pipeline-aws-plugin version 1.43

  • What Operating System are you using (both controller, and any agents involved in the problem)?

Master and agent run RHEL8

Reproduction steps

  • Install plugin
  • Generate pipeline script using the pipeline snippet snippet generator.

Results

Expected result:

Working code that runs without exception.

Actual result:

s3Upload acl: 'Private', bucket: 'awsbucket', cacheControl: '', excludePathPattern: '', file: 'testfile', includePathPattern: '', metadatas: [''], redirectLocation: '', sseAlgorithm: '', tags: '', text: '', workingDir: ''

Results in

java.lang.IllegalArgumentException: File and IncludePathPattern cannot be used together
	at com.google.common.base.Preconditions.checkArgument(Preconditions.java:88)
	at de.taimos.pipeline.aws.S3UploadStep$Execution.run(S3UploadStep.java:349)
	at de.taimos.pipeline.aws.S3UploadStep$Execution.run(S3UploadStep.java:295)
	at org.jenkinsci.plugins.workflow.steps.SynchronousNonBlockingStepExecution.lambda$start$0(SynchronousNonBlockingStepExecution.java:47)
	at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
	at java.base/java.lang.Thread.run(Thread.java:834)
Finished: FAILURE

If the file and includePathPattern are mutually exclusive the snippet generator should not write both of them

Thanks in advance

Bram

@m8ram m8ram added the bug label Aug 25, 2021
@m8ram m8ram changed the title snippet generator generates faulty code snippet generator generates faulty code (File and IncludePathPattern cannot be used together) Aug 25, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant