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

Use explicit types for Custom WAR Packager settings #129

Merged

Conversation

darxriggs
Copy link
Contributor

This better describes the settings.
In case of jdk this also improves the user experience.
If an Integer is provided, it is converted to a String.
This is required for the runMaven(...) call to work correctly.

@jenkinsadmin
Copy link

Build failed; the context from the latest run is:

Expand to view
[2019-12-30T23:12:21.826Z]    infra.withDockerCredentials(groovy.lang.Closure)
[2019-12-30T23:12:21.826Z]       infra.withCredentials([{$class=ZipFileBinding, credentialsId=jenkins-dockerhub, variable=DOCKER_CONFIG}], groovy.lang.Closure)
[2019-12-30T23:12:21.826Z]    infra.checkout(foo.git)
[2019-12-30T23:12:21.826Z]    infra.withDockerCredentials(groovy.lang.Closure)
[2019-12-30T23:12:21.826Z]       infra.echo(Cannot use Docker credentials outside of jenkins infra environment)
[2019-12-30T23:12:21.826Z] [WARNING] Tests run: 8, Failures: 0, Errors: 0, Skipped: 1, Time elapsed: 0.544 s - in InfraStepTests
[2019-12-30T23:12:22.391Z] [INFO] 
[2019-12-30T23:12:22.391Z] [INFO] Results:
[2019-12-30T23:12:22.391Z] [INFO] 
[2019-12-30T23:12:22.391Z] [ERROR] Errors: 
[2019-12-30T23:12:22.391Z] [ERROR]   CustomWARPackagerStepTests.test_default_config:144 » MissingProperty No such p...
[2019-12-30T23:12:22.391Z] [ERROR]   CustomWARPackagerStepTests.test_without_bom_config:131 » MissingProperty No su...
[2019-12-30T23:12:22.391Z] [INFO] 
[2019-12-30T23:12:22.391Z] [ERROR] Tests run: 45, Failures: 0, Errors: 2, Skipped: 1
[2019-12-30T23:12:22.391Z] [INFO] 
[2019-12-30T23:12:22.391Z] [INFO] ------------------------------------------------------------------------
[2019-12-30T23:12:22.391Z] [INFO] BUILD FAILURE
[2019-12-30T23:12:22.391Z] [INFO] ------------------------------------------------------------------------
[2019-12-30T23:12:22.391Z] [INFO] Total time:  15.138 s
[2019-12-30T23:12:22.391Z] [INFO] Finished at: 2019-12-30T23:12:22Z
[2019-12-30T23:12:22.391Z] [INFO] ------------------------------------------------------------------------
[2019-12-30T23:12:22.391Z] [ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:3.0.0-M3:test (default-test) on project pipeline-library: There are test failures.
[2019-12-30T23:12:22.391Z] [ERROR] 
[2019-12-30T23:12:22.391Z] [ERROR] Please refer to /home/jenkins/workspace/Infra_pipeline-library_PR-129/target/surefire-reports for the individual test results.
[2019-12-30T23:12:22.391Z] [ERROR] Please refer to dump files (if any exist) [date].dump, [date]-jvmRun[N].dump and [date].dumpstream.
[2019-12-30T23:12:22.391Z] [ERROR] -> [Help 1]
[2019-12-30T23:12:22.391Z] [ERROR] 
[2019-12-30T23:12:22.391Z] [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[2019-12-30T23:12:22.391Z] [ERROR] Re-run Maven using the -X switch to enable full debug logging.
[2019-12-30T23:12:22.391Z] [ERROR] 
[2019-12-30T23:12:22.391Z] [ERROR] For more information about the errors and possible solutions, please read the following articles:
[2019-12-30T23:12:22.391Z] [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException
[2019-12-30T23:12:22.972Z] Post stage
[2019-12-30T23:12:23.020Z] [Pipeline] junit
[2019-12-30T23:12:23.032Z] Recording test results
[2019-12-30T23:12:23.939Z] [Pipeline] }
[2019-12-30T23:12:23.996Z] [Pipeline] // stage
[2019-12-30T23:12:24.052Z] [Pipeline] }
[2019-12-30T23:12:24.087Z] [Pipeline] // timestamps
[2019-12-30T23:12:24.114Z] [Pipeline] }
[2019-12-30T23:12:24.186Z] [Pipeline] // withEnv
[2019-12-30T23:12:24.214Z] [Pipeline] }
[2019-12-30T23:12:24.269Z] [Pipeline] // node
[2019-12-30T23:12:24.313Z] [Pipeline] End of Pipeline
[2019-12-30T23:12:25.838Z] 
[2019-12-30T23:12:25.838Z] GitHub has been notified of this commit’s build result
[2019-12-30T23:12:25.838Z] 
[2019-12-30T23:12:25.838Z] ERROR: script returned exit code 1
[2019-12-30T23:12:25.838Z] Finished: FAILURE

Powered by the Comment Logger

This better describes the settings.
In case of `jdk` this also improves the user experience.
If an `Integer` is provided, it is converted to a `String`.
This is required for the `runMaven(...)` call to work correctly.
@darxriggs
Copy link
Contributor Author

darxriggs commented Dec 31, 2019

This change is also required for the upcoming pull request #130 to simplify the Infra mock for testing. The goal there is to use the same types in the method signatures as in the real implementation.

@oleg-nenashev oleg-nenashev changed the title Use types for custom war packager settings Use explicit types for custom war packager settings Dec 31, 2019
@jenkinsadmin
Copy link

Build failed; the context from the latest run is:

Expand to view
[2019-12-31T19:44:31.702Z] [Pipeline] checkout
[2019-12-31T19:44:33.279Z] using credential github-access-token
[2019-12-31T19:44:33.592Z] Cloning the remote Git repository
[2019-12-31T19:44:33.593Z] Cloning with configured refspecs honoured and without tags
[2019-12-31T19:44:34.927Z] [Pipeline] }
[2019-12-31T19:44:34.958Z] [Pipeline] // stage
[2019-12-31T19:44:34.984Z] [Pipeline] }
[2019-12-31T19:44:35.013Z] [Pipeline] // node
[2019-12-31T19:44:35.058Z] [Pipeline] End of Pipeline
[2019-12-31T19:44:36.660Z] 
[2019-12-31T19:44:36.660Z] GitHub has been notified of this commit’s build result
[2019-12-31T19:44:36.660Z] 
[2019-12-31T19:44:36.661Z] java.nio.channels.ClosedChannelException
[2019-12-31T19:44:36.661Z] Also:   hudson.remoting.Channel$CallSiteStackTrace: Remote call to JNLP4-connect connection from 40.70.128.70/40.70.128.70:11202
[2019-12-31T19:44:36.661Z] 		at hudson.remoting.Channel.attachCallSiteStackTrace(Channel.java:1743)
[2019-12-31T19:44:36.661Z] 		at hudson.remoting.Request.call(Request.java:202)
[2019-12-31T19:44:36.661Z] 		at hudson.remoting.Channel.call(Channel.java:956)
[2019-12-31T19:44:36.661Z] 		at org.jenkinsci.plugins.gitclient.RemoteGitImpl$CommandInvocationHandler.execute(RemoteGitImpl.java:146)
[2019-12-31T19:44:36.661Z] 		at jdk.internal.reflect.GeneratedMethodAccessor869.invoke(Unknown Source)
[2019-12-31T19:44:36.661Z] 		at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[2019-12-31T19:44:36.661Z] 		at java.base/java.lang.reflect.Method.invoke(Method.java:566)
[2019-12-31T19:44:36.661Z] 		at org.jenkinsci.plugins.gitclient.RemoteGitImpl$CommandInvocationHandler.invoke(RemoteGitImpl.java:132)
[2019-12-31T19:44:36.661Z] 		at com.sun.proxy.$Proxy685.execute(Unknown Source)
[2019-12-31T19:44:36.661Z] 		at hudson.plugins.git.GitSCM.retrieveChanges(GitSCM.java:1152)
[2019-12-31T19:44:36.661Z] 		at hudson.plugins.git.GitSCM.checkout(GitSCM.java:1192)
[2019-12-31T19:44:36.661Z] 		at org.jenkinsci.plugins.workflow.steps.scm.SCMStep.checkout(SCMStep.java:124)
[2019-12-31T19:44:36.661Z] 		at org.jenkinsci.plugins.workflow.steps.scm.SCMStep$StepExecutionImpl.run(SCMStep.java:93)
[2019-12-31T19:44:36.661Z] 		at org.jenkinsci.plugins.workflow.steps.scm.SCMStep$StepExecutionImpl.run(SCMStep.java:80)
[2019-12-31T19:44:36.661Z] 		at org.jenkinsci.plugins.workflow.steps.SynchronousNonBlockingStepExecution.lambda$start$0(SynchronousNonBlockingStepExecution.java:47)
[2019-12-31T19:44:36.661Z] 		at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
[2019-12-31T19:44:36.661Z] 		at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
[2019-12-31T19:44:36.661Z] Caused: hudson.remoting.RequestAbortedException
[2019-12-31T19:44:36.661Z] 	at hudson.remoting.Request.abort(Request.java:340)
[2019-12-31T19:44:36.661Z] 	at hudson.remoting.Channel.terminate(Channel.java:1040)
[2019-12-31T19:44:36.661Z] 	at org.jenkinsci.remoting.protocol.impl.ChannelApplicationLayer.onReadClosed(ChannelApplicationLayer.java:209)
[2019-12-31T19:44:36.661Z] 	at org.jenkinsci.remoting.protocol.ApplicationLayer.onRecvClosed(ApplicationLayer.java:222)
[2019-12-31T19:44:36.661Z] 	at org.jenkinsci.remoting.protocol.ProtocolStack$Ptr.onRecvClosed(ProtocolStack.java:816)
[2019-12-31T19:44:36.661Z] 	at org.jenkinsci.remoting.protocol.FilterLayer.onRecvClosed(FilterLayer.java:287)
[2019-12-31T19:44:36.661Z] 	at org.jenkinsci.remoting.protocol.impl.SSLEngineFilterLayer.onRecvClosed(SSLEngineFilterLayer.java:172)
[2019-12-31T19:44:36.661Z] 	at org.jenkinsci.remoting.protocol.ProtocolStack$Ptr.onRecvClosed(ProtocolStack.java:816)
[2019-12-31T19:44:36.661Z] 	at org.jenkinsci.remoting.protocol.NetworkLayer.onRecvClosed(NetworkLayer.java:154)
[2019-12-31T19:44:36.661Z] 	at org.jenkinsci.remoting.protocol.impl.NIONetworkLayer.ready(NIONetworkLayer.java:142)
[2019-12-31T19:44:36.661Z] 	at org.jenkinsci.remoting.protocol.IOHub$OnReady.run(IOHub.java:795)
[2019-12-31T19:44:36.661Z] 	at jenkins.util.ContextResettingExecutorService$1.run(ContextResettingExecutorService.java:28)
[2019-12-31T19:44:36.661Z] 	at jenkins.security.ImpersonatingExecutorService$1.run(ImpersonatingExecutorService.java:59)
[2019-12-31T19:44:36.661Z] 	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
[2019-12-31T19:44:36.661Z] 	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
[2019-12-31T19:44:36.661Z] 	at java.base/java.lang.Thread.run(Thread.java:834)
[2019-12-31T19:44:36.661Z] Finished: FAILURE

Powered by the Comment Logger

@oleg-nenashev
Copy link
Contributor

Restarted the build

@oleg-nenashev oleg-nenashev changed the title Use explicit types for custom war packager settings Use explicit types for Custom WAR Packager settings Dec 31, 2019
@oleg-nenashev oleg-nenashev merged commit 847fe41 into jenkins-infra:master Dec 31, 2019
@darxriggs darxriggs deleted the types-for-war-packager branch January 1, 2020 11:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants