Closed goeblj closed 4 years ago
Hi Jürgen,
I could reproduce the issue with locally when using the same maven docker image (maven:3.5.0-jdk-8).
When using a new one (maven:3.6-jdk-8) it worked. I think it is related to the maven version.
Could you please try to configure the maven docker image for the step mavenExecute (or nexusUplaod) and let us know whether the issue still persists?
Thanks.
Daniel
Hi Daniel,
after using the new docker image groupId and artifactId were correct determined. Now I run into a new error during nexus deployment.
Thanks, Jürgen
13:57:50 time="2020-04-27T11:57:49Z" level=info msg="[INFO] ------------------------------------------------------------------------" library=SAP/jenkins-library stepName=nexusUpload
13:57:50 time="2020-04-27T11:57:49Z" level=info msg="[INFO] Reactor Summary for ire-obligatory-capacity-management - Root 1.0-2020-04-27T115014UTC_c9e7ac2efde27cc238da975d358cace514dee5e4:" library=SAP/jenkins-library stepName=nexusUpload
13:57:50 time="2020-04-27T11:57:49Z" level=info msg="[INFO] " library=SAP/jenkins-library stepName=nexusUpload
13:57:50 time="2020-04-27T11:57:49Z" level=info msg="[INFO] ire-obligatory-capacity-management - Root .......... FAILURE [ 0.263 s]" library=SAP/jenkins-library stepName=nexusUpload
13:57:50 time="2020-04-27T11:57:49Z" level=info msg="[INFO] ire-obligatory-capacity-management - Application ... SKIPPED" library=SAP/jenkins-library stepName=nexusUpload
13:57:50 time="2020-04-27T11:57:49Z" level=info msg="[INFO] ire-obligatory-capacity-management - Unit Tests .... SKIPPED" library=SAP/jenkins-library stepName=nexusUpload
13:57:50 time="2020-04-27T11:57:49Z" level=info msg="[INFO] ire-obligatory-capacity-management - Integration Tests SKIPPED" library=SAP/jenkins-library stepName=nexusUpload
13:57:50 time="2020-04-27T11:57:49Z" level=info msg="[INFO] ------------------------------------------------------------------------" library=SAP/jenkins-library stepName=nexusUpload
13:57:50 time="2020-04-27T11:57:49Z" level=info msg="[INFO] BUILD FAILURE" library=SAP/jenkins-library stepName=nexusUpload
13:57:50 time="2020-04-27T11:57:49Z" level=info msg="[INFO] ------------------------------------------------------------------------" library=SAP/jenkins-library stepName=nexusUpload
13:57:50 time="2020-04-27T11:57:49Z" level=info msg="[INFO] Total time: 1.851 s" library=SAP/jenkins-library stepName=nexusUpload
13:57:50 time="2020-04-27T11:57:49Z" level=info msg="[INFO] Finished at: 2020-04-27T11:57:49Z" library=SAP/jenkins-library stepName=nexusUpload
13:57:50 time="2020-04-27T11:57:49Z" level=info msg="[INFO] ------------------------------------------------------------------------" library=SAP/jenkins-library stepName=nexusUpload
13:57:50 time="2020-04-27T11:57:49Z" level=info msg="[ERROR] Failed to execute goal org.apache.maven.plugins:maven-deploy-plugin:2.8.2:deploy-file (default-cli) on project ire-obligatory-capacity-management: Failed to deploy artifacts: Could not transfer artifact group.msg.ire:ire-obligatory-capacity-management-application:pom:1.0-2020-04-27T115014UTC_c9e7ac2efde27cc238da975d358cace514dee5e4 from/to remote-repository (I've changed this): Failed to transfer file I've changed this/group/msg/ire/ire-obligatory-capacity-management-application/1.0-2020-04-27T115014UTC_c9e7ac2efde27cc238da975d358cace514dee5e4/ire-obligatory-capacity-management-application-1.0-2020-04-27T115014UTC_c9e7ac2efde27cc238da975d358cace514dee5e4.pom with status code 401 -> [Help 1]" library=SAP/jenkins-library stepName=nexusUpload
13:57:50 time="2020-04-27T11:57:49Z" level=info msg="[ERROR] " library=SAP/jenkins-library stepName=nexusUpload
13:57:50 time="2020-04-27T11:57:49Z" level=info msg="[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch." library=SAP/jenkins-library stepName=nexusUpload
13:57:50 time="2020-04-27T11:57:49Z" level=info msg="[ERROR] Re-run Maven using the -X switch to enable full debug logging." library=SAP/jenkins-library stepName=nexusUpload
13:57:50 time="2020-04-27T11:57:49Z" level=info msg="[ERROR] " library=SAP/jenkins-library stepName=nexusUpload
13:57:50 time="2020-04-27T11:57:49Z" level=info msg="[ERROR] For more information about the errors and possible solutions, please read the following articles:" library=SAP/jenkins-library stepName=nexusUpload
13:57:50 time="2020-04-27T11:57:49Z" level=info msg="[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException" library=SAP/jenkins-library stepName=nexusUpload
13:57:50 time="2020-04-27T11:57:50Z" level=fatal msg="step execution failed" error="uploading artifacts for ID 'ire-obligatory-capacity-management-application' failed: failed to run executable, command: '[mvn -Dmaven.repo.local=s4hana_pipeline/maven_local_repo -Durl=http:''I've changed this'' -DgroupId=group.msg.ire -Dversion=1.0-2020-04-27T115014UTC_c9e7ac2efde27cc238da975d358cace514dee5e4 -DartifactId=ire-obligatory-capacity-management-application -Dfile=application/pom.xml -Dpackaging=pom -Dfiles=application/target/ire-obligatory-capacity-management-application.jar -Dclassifiers= -Dtypes=jar --batch-mode org.apache.maven.plugins:maven-deploy-plugin:2.8.2:deploy-file]', error: running command 'mvn' failed: cmd.Run() failed: exit status 1" library=SAP/jenkins-library stepName=nexusUpload
13:57:50 time="2020-04-27T11:57:50Z" level=info msg=ire-obligatory-capacity-management-application library=SAP/jenkins-library stepName=nexusUpload
13:57:50 time="2020-04-27T11:57:50Z" level=info msg=group.msg.ire library=SAP/jenkins-library stepName=nexusUpload
13:57:50 time="2020-04-27T11:57:50Z" level=info msg=1.0-2020-04-27T115014UTC_c9e7ac2efde27cc238da975d358cace514dee5e4 library=SAP/jenkins-library stepName=nexusUpload
13:57:50 time="2020-04-27T11:57:50Z" level=info msg=ire-obligatory-capacity-management-application library=SAP/jenkins-library stepName=nexusUpload
13:57:50 time="2020-04-27T11:57:50Z" level=info msg=jar library=SAP/jenkins-library stepName=nexusUpload
[Pipeline] }
[Pipeline] // withCredentials
[Pipeline] }
13:57:50 $ docker stop --time=1 06599283deacaefcabaeb0a786ad4d13cb8858fa41e16e01d666c9aebd12dc7f
13:57:51 $ docker rm -f 06599283deacaefcabaeb0a786ad4d13cb8858fa41e16e01d666c9aebd12dc7f
[Pipeline] // withDockerContainer
[Pipeline] libraryResource
[Pipeline] echo
13:57:51 ----------------------------------------------------------
13:57:51 --- An error occurred in the library step: dockerExecute
13:57:51 ----------------------------------------------------------
13:57:51
13:57:51 The following parameters were available to the step:
13:57:51 ***
13:57:51 *** to show step parameters, set verbose:true in general pipeline configuration
13:57:51 *** WARNING: this may reveal sensitive information. ***
13:57:51 ***
13:57:51
13:57:51 The error was:
13:57:51 ***
13:57:51 hudson.AbortException: script returned exit code 1
13:57:51 ***
13:57:51
13:57:51 Further information:
13:57:51 * Documentation of library step dockerExecute: https://sap.github.io/jenkins-library/steps/dockerExecute/
13:57:51 * Source code of library step dockerExecute: https://github.com/SAP/jenkins-library/blob/master/vars/dockerExecute.groovy
13:57:51 * Library documentation: https://sap.github.io/jenkins-library/
13:57:51 * Library repository: https://github.com/SAP/jenkins-library/
13:57:51
13:57:51 ----------------------------------------------------------
13:57:51 --- End library step of: dockerExecute ---
[Pipeline] }
[Pipeline] // withEnv
[Pipeline] libraryResource
[Pipeline] echo
13:57:51 ----------------------------------------------------------
13:57:51 --- An error occurred in the library step: nexusUpload
13:57:51 ----------------------------------------------------------
13:57:51
13:57:51 The following parameters were available to the step:
13:57:51 ***
13:57:51 *** to show step parameters, set verbose:true in general pipeline configuration
13:57:51 *** WARNING: this may reveal sensitive information. ***
13:57:51 ***
13:57:51
13:57:51 The error was:
13:57:51 ***
13:57:51 hudson.AbortException: script returned exit code 1
13:57:51 ***
13:57:51
13:57:51 Further information:
13:57:51 * Documentation of library step nexusUpload: https://sap.github.io/jenkins-library/steps/nexusUpload/
13:57:51 * Source code of library step nexusUpload: https://github.com/SAP/jenkins-library/blob/master/vars/nexusUpload.groovy
13:57:51 * Library documentation: https://sap.github.io/jenkins-library/
13:57:51 * Library repository: https://github.com/SAP/jenkins-library/
13:57:51
13:57:51 ----------------------------------------------------------
13:57:51 --- End library step of: nexusUpload ---
Somehow hidden, but I see Could not transfer artifact...with status code 401
. Just to be sure, have you checked the credentials?
Hi Daniel,
yes, we have checked the credentials.
Regards Marcus
Hi Daniel, with V30 the credentials work. In https://github.com/SAP/jenkins-library/blob/master/vars/nexusUpload.groovy nexusCredentialsId is used. Is there anything to change in our config? Regards Jürgen
nexusCredentialsId is used but there is an alias which will convert what you have convert to this key. This works. See also: Config: [...:, nexusCredentialsId:IRE-NEXUS]
It looks like the credentials are not passed to the nexusUpload step. We will investigate what the reason could be and come back to you.
I think I found the issue. Should be solved with: https://github.com/SAP/jenkins-library/pull/1480
Hi Daniel,
thanks for solving the issue! Do you need to update the pipeline-lib to use v1.26.0 of piper? With the current version I can see in the logs that v1.24.0 of piper is loaded which doesn't contain the fix.
Best regards Jürgen
Hi @goeblj,
I've updated the library to v1.26.0, so in the master branch of the pipeline it should work now.
In general, we don't recommend to change the version of the "piper" library manually as there might be incompatible changes.
Looking forward to your feedback. Please let me know if we can close this issue.
Best, Florian
Hi @fwilhe, everything works fine again. Thanks for your help and best regards, Jürgen
Issue Description
The pipeline is failing in the stage: Artifact Deployment
In version V32 the nexus artifact deployment will not work anymore with this configuration:
We tried to add the optional attribute groupId but then an other issue comes up that the artifactId must not be empty. Seems to be an issue to determine the groupId and artifactId from pom.xml
Thanks for your help Jürgen
Log Output
Search for existing solution beforehand
Project Details