-
Bug
-
Resolution: Unresolved
-
Major
-
None
-
Red Hat Enterprise Linux release 9.3 (Plow)
jenkins v2.426.2
artifactory plugin v4.0.1
-
Powered by SuggestiMate
artifactory plugin v4.0.1 -> ERR
[Pipeline] newBuildInfo
[Pipeline] artifactoryMavenBuild
[Pipeline]
[Pipeline] // stage
[Pipeline] echo
Mark pipeline as FAILED due to exception: java.lang.RuntimeException: java.lang.RuntimeException: java.nio.file.NoSuchFileException: /PATH_WORKSPACE@tmp/artifactory/buildInfo16773654138834561428.properties
artifactory plugin v4.0.0 -> OK
[Pipeline] newBuildInfo
[Pipeline] artifactoryMavenBuild
Jenkins Artifactory Plugin version: 4.0.0
Artifactory integration is enabled
[JENKINS-72471] artifactory buildInfo file not found
Description |
Original:
artifactory plugin v4.0.1 -> ERR
[Pipeline] newBuildInfo[Pipeline] artifactoryMavenBuild[Pipeline] }[Pipeline] // stage[Pipeline] echoMark pipeline as FAILED due to exception: java.lang.RuntimeException: java.lang.RuntimeException: java.nio.file.NoSuchFileException: /PATH_WORKSPACE@tmp/artifactory/buildInfo16773654138834561428.properties artifactory plugin v4.0.0 -> OK [Pipeline] newBuildInfo[Pipeline] artifactoryMavenBuildJenkins Artifactory Plugin version: 4.0.0 Artifactory integration is enabled |
New:
artifactory plugin v4.0.1 -> ERR
{{[Pipeline] newBuildInfo}} {{[Pipeline] artifactoryMavenBuild}} [Pipeline] {{[Pipeline] // stage}} {{[Pipeline] echo}} {{Mark pipeline as FAILED due to exception: java.lang.RuntimeException: java.lang.RuntimeException: java.nio.file.NoSuchFileException: /PATH_WORKSPACE@tmp/artifactory/buildInfo16773654138834561428.properties}} artifactory plugin v4.0.0 -> OK {{[Pipeline] newBuildInfo}} {{[Pipeline] artifactoryMavenBuild}} {{Jenkins Artifactory Plugin version: 4.0.0}} {{Artifactory integration is enabled}} |
We also encountered this issue.
On Linux based slave nodes it seems that the buildinfoXXXXX.properties file is created but its size is 0 byte.
On Windows slave nodes, the file is not created and the error looks to fail silently since we don't see error in pipeline as if we were on linux; but then we have issues later when we try to promote a build, because builds ( ora at least build infos) are not on artifactory
We have to downgrade back to version 4.0.0 wainting for this to be fixed
EDIT:
To be more precise, we use JDK 17 and Gradle 7.6. The build info task is like:
build Info:
stage ('Config Build Info') { steps { script { env.CURRENT_STATUS = "${STAGE_NAME}" } echo ("Current status: ${env.CURRENT_STATUS}") rtBuildInfo ( captureEnv: true, includeEnvPatterns: ["*"], excludeEnvPatterns: ["DONT_COLLECT*"], buildName: "<BUILD_NAME>" ) } }
Then we publish:
stage ('Publish artifacts & build Info') { steps { echo ('Publishing artifacts...') rtGradleRun ( usesPlugin: true, useWrapper: true, rootDir: "${env.WORKSPACE}", tasks: "artifactoryPublish", deployerId: "GRADLE_DEPLOYER", resolverId: "GRADLE_RESOLVER", buildName: "<BUILD_NAME>" ) rtPublishBuildInfo ( serverId: "AR1", buildName: "<BUILD_NAME>" ) } }
and we got the error:
java.nio.file.NoSuchFileException: /home/jenkins/workspace/<PIPELINE_NAME>@tmp/artifactory/buildInfo4734844661446051754.properties at java.base/sun.nio.fs.UnixException.translateToIOException(UnixException.java:92) at java.base/sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:111) at java.base/sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:116) at java.base/sun.nio.fs.UnixFileSystemProvider.newByteChannel(UnixFileSystemProvider.java:219) at java.base/java.nio.file.spi.FileSystemProvider.newOutputStream(FileSystemProvider.java:478) at java.base/java.nio.file.Files.newOutputStream(Files.java:220) at org.jfrog.hudson.util.ExtractorUtils.savePropertiesToFile(ExtractorUtils.java:598) Caused: java.lang.RuntimeException at org.jfrog.hudson.util.ExtractorUtils.savePropertiesToFile(ExtractorUtils.java:609) at org.jfrog.hudson.util.ExtractorUtils.persistConfiguration(ExtractorUtils.java:577) at org.jfrog.hudson.pipeline.common.executors.EnvExtractor.persistConfiguration(EnvExtractor.java:96) at org.jfrog.hudson.pipeline.common.executors.EnvExtractor.execute(EnvExtractor.java:75) Also: org.jenkinsci.plugins.workflow.actions.ErrorAction$ErrorId: 4862f2a1-a6ff-4303-a67a-e2371fae8252 Caused: java.lang.RuntimeException at org.jfrog.hudson.pipeline.common.executors.EnvExtractor.execute(EnvExtractor.java:77) at org.jfrog.hudson.pipeline.common.executors.GradleExecutor.execute(GradleExecutor.java:73) at org.jfrog.hudson.pipeline.declarative.steps.gradle.GradleStep$Execution.runStep(GradleStep.java:128) at org.jfrog.hudson.pipeline.declarative.steps.gradle.GradleStep$Execution.runStep(GradleStep.java:113) at org.jfrog.hudson.pipeline.ArtifactorySynchronousNonBlockingStepExecution.run(ArtifactorySynchronousNonBlockingStepExecution.java:55) 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:829) Finished: FAILURE
but the file is there, just 0 byte.
On windows (a slightly different project but same pipeline structure, always JDK 17 and Gradle 7.6 ) we do something similar:
BuildInfo -> No Error
Publish Artifact -> No Error
Promotion:
stage('Promote to Integration stage') { steps { echo ('Promoting to integration stage...') rtPromote ( buildName: "<BUILD_NAME>", buildNumber: "${env.BUILD_NUMBER}", serverId: 'AR1', targetRepo: 'libs-integration-local', comment: 'Build promoted to INTEGRATION stage', status: 'INT_STAGE_PROMOTION', sourceRepo: 'libs-snapshot-local', includeDependencies: false, failFast: true, copy: false ) } }
Got Error:
19:41:25 Promoting to integration stage... [Pipeline] rtPromote 19:41:25 Promoting '<BUILD_NAME>' #306 to 'libs-integration-local' from 'libs-snapshot-local', with status: 'INT_STAGE_PROMOTION', with comment: 'Build promoted to INTEGRATION stage', failing on first error. 19:41:25 Performing dry run promotion (no changes are made during dry run) ... 19:41:25 ERROR: IOException: JFrog service failed. Received 400: { 19:41:25 "errors" : [ { 19:41:25 "status" : 400, 19:41:25 "message" : "Unable to find artifacts of build '<BUILD_NAME>' #306 from artifactory-build-info repo: aborting promotion." 19:41:25 } ] 19:41:25 }
and Build info and artifact are simply not on artifactory, even if Publish Artifact task completed without errors.
Same problem here. Also performed a downgrade to 4.0.0. That fixed it so our CI/CD works again.
Pieces of our logging:
[main] INFO org.apache.maven.cli.event.ExecutionEventLogger - --- maven-install-plugin:2.4:install (default-install) @ xxxx --- [main] INFO org.codehaus.plexus.PlexusContainer - Installing e:\jenkinsworkspaces\build Java xxxx\trunk\java-modules\xxxxx\target\xxxx-7.179.0-SNAPSHOT.jar to E:\maven-proxy-repository\xxxx\7.179.0-SNAPSHOT\xxxxx-7.179.0-SNAPSHOT.jar [main] INFO org.codehaus.plexus.PlexusContainer - Installing e:\jenkinsworkspaces\build Java xxxxx\trunk\java-modules\xxxxx\pom.xml to E:\maven-proxy-repository\xxxxx\7.179.0-SNAPSHOT\xxxxx-7.179.0-SNAPSHOT.pom [main] INFO org.codehaus.plexus.PlexusContainer - Installing e:\jenkinsworkspaces\build Java xxxxx\trunk\java-modules\xxxxx\target\xxxxx-7.179.0-SNAPSHOT-sources.jar to E:\maven-proxy-repository\xxxxx\7.179.0-SNAPSHOT\xxxxx-7.179.0-SNAPSHOT-sources.jar [main] INFO org.jfrog.build.extractor.maven.BuildDeploymentHelper - Artifactory Build Info Recorder: Saving Build Info to 'e:\jenkinsworkspaces\build Java xxxxx\trunk\java-modules\xxxxx\target\build-info.json' [main] INFO org.jfrog.build.extractor.maven.ArtifactoryManagerBuilder - Deploying artifact: https://jenkins-xxxxx.nl:9101/artifactory/geo_snapshot_local/xxxxx/7.179.0-SNAPSHOT/xxxxx-7.179.0-SNAPSHOT.jar [main] INFO org.jfrog.build.extractor.maven.ArtifactoryManagerBuilder - Deploying artifact: https://jenkins-xxxxx.nl:9101/artifactory/geo_snapshot_local/xxxxx/7.179.0-SNAPSHOT/xxxxx-7.179.0-SNAPSHOT-sources.jar [main] INFO org.jfrog.build.extractor.maven.ArtifactoryManagerBuilder - Deploying artifact: https://jenkins-xxxxx.nl:9101/artifactory/geo_snapshot_local/xxxxx/7.179.0-SNAPSHOT/xxxxx-7.179.0-SNAPSHOT.pom [main] INFO org.jfrog.build.extractor.maven.BuildDeploymentHelper - Artifactory Build Info Recorder: Deploying build info ... [main] INFO org.jfrog.build.extractor.maven.ArtifactoryManagerBuilder - Deploying build info... [main] ERROR org.jfrog.build.extractor.maven.ArtifactoryManagerBuilder - Could not build the build-info object. [main] ERROR org.jfrog.build.extractor.maven.BuildInfoRecorder - org.jfrog.build.extractor.maven.BuildInfoRecorder.sessionEnded() listener has failed: java.lang.RuntimeException: java.io.IOException: JFrog service failed. Received 404: Could not locate artifact 'artifactory-build-info:build Java xxxxx/5687-1704375973615.json'. at org.jfrog.build.extractor.maven.BuildDeploymentHelper.publishBuildInfo (BuildDeploymentHelper.java:83) at org.jfrog.build.extractor.maven.BuildDeploymentHelper.deploy (BuildDeploymentHelper.java:74) at org.jfrog.build.extractor.maven.BuildInfoRecorder.sessionEnded (BuildInfoRecorder.java:160) at org.apache.maven.lifecycle.internal.DefaultExecutionEventCatapult.fire (DefaultExecutionEventCatapult.java:64) at org.apache.maven.lifecycle.internal.DefaultExecutionEventCatapult.fire (DefaultExecutionEventCatapult.java:42) at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:137) at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:299) at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:193) at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:106) at org.apache.maven.cli.MavenCli.execute (MavenCli.java:963) at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:296) at org.apache.maven.cli.MavenCli.main (MavenCli.java:199) at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke (Method.java:498) at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:282) at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:225) at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:406) at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:347) Caused by: java.io.IOException: JFrog service failed. Received 404: Could not locate artifact 'artifactory-build-info:build Java xxxxx/5687-1704375973615.json'. at org.jfrog.build.extractor.clientConfiguration.client.JFrogService.throwException (JFrogService.java:49) at org.jfrog.build.extractor.clientConfiguration.client.artifactory.services.PublishBuildInfo.handleUnsuccessfulResponse (PublishBuildInfo.java:36) at org.jfrog.build.extractor.clientConfiguration.client.JFrogService.execute (JFrogService.java:121) at org.jfrog.build.extractor.clientConfiguration.client.artifactory.services.PublishBuildInfo.execute (PublishBuildInfo.java:59) at org.jfrog.build.extractor.clientConfiguration.client.artifactory.ArtifactoryManager.publishBuildInfo (ArtifactoryManager.java:158) at org.jfrog.build.extractor.retention.Utils.sendBuildAndBuildRetention (Utils.java:65) at org.jfrog.build.extractor.retention.Utils.sendBuildAndBuildRetention (Utils.java:56) at org.jfrog.build.extractor.retention.Utils.sendBuildAndBuildRetention (Utils.java:60) at org.jfrog.build.extractor.maven.BuildDeploymentHelper.publishBuildInfo (BuildDeploymentHelper.java:81) at org.jfrog.build.extractor.maven.BuildDeploymentHelper.deploy (BuildDeploymentHelper.java:74) at org.jfrog.build.extractor.maven.BuildInfoRecorder.sessionEnded (BuildInfoRecorder.java:160) at org.apache.maven.lifecycle.internal.DefaultExecutionEventCatapult.fire (DefaultExecutionEventCatapult.java:64) at org.apache.maven.lifecycle.internal.DefaultExecutionEventCatapult.fire (DefaultExecutionEventCatapult.java:42) at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:137) at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:299) at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:193) at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:106) at org.apache.maven.cli.MavenCli.execute (MavenCli.java:963) at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:296) at org.apache.maven.cli.MavenCli.main (MavenCli.java:199) at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke (Method.java:498) at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:282) at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:225) at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:406) at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:347) [main] ERROR org.apache.maven.cli.MavenCli - Internal error: java.lang.RuntimeException: org.jfrog.build.extractor.maven.BuildInfoRecorder.sessionEnded() listener has failed: java.io.IOException: JFrog service failed. Received 404: Could not locate artifact 'artifactory-build-info:build Java xxxxx/5687-1704375973615.json'. -> [Help 1] org.apache.maven.InternalErrorException: Internal error: java.lang.RuntimeException: org.jfrog.build.extractor.maven.BuildInfoRecorder.sessionEnded() listener has failed: at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:121) at org.apache.maven.cli.MavenCli.execute (MavenCli.java:963) at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:296) at org.apache.maven.cli.MavenCli.main (MavenCli.java:199) at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke (Method.java:498) at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:282) at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:225) at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:406) at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:347) Caused by: java.lang.RuntimeException: org.jfrog.build.extractor.maven.BuildInfoRecorder.sessionEnded() listener has failed: at org.jfrog.build.extractor.maven.BuildInfoRecorder.sessionEnded (BuildInfoRecorder.java:169) at org.apache.maven.lifecycle.internal.DefaultExecutionEventCatapult.fire (DefaultExecutionEventCatapult.java:64) at org.apache.maven.lifecycle.internal.DefaultExecutionEventCatapult.fire (DefaultExecutionEventCatapult.java:42) at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:137) at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:299) at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:193) at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:106) at org.apache.maven.cli.MavenCli.execute (MavenCli.java:963) at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:296) at org.apache.maven.cli.MavenCli.main (MavenCli.java:199) at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke (Method.java:498) at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:282) at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:225) at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:406) at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:347) Caused by: java.lang.RuntimeException: java.io.IOException: JFrog service failed. Received 404: Could not locate artifact 'artifactory-build-info:build Java xxxxx/5687-1704375973615.json'. at org.jfrog.build.extractor.maven.BuildDeploymentHelper.publishBuildInfo (BuildDeploymentHelper.java:83) at org.jfrog.build.extractor.maven.BuildDeploymentHelper.deploy (BuildDeploymentHelper.java:74) at org.jfrog.build.extractor.maven.BuildInfoRecorder.sessionEnded (BuildInfoRecorder.java:160) at org.apache.maven.lifecycle.internal.DefaultExecutionEventCatapult.fire (DefaultExecutionEventCatapult.java:64) at org.apache.maven.lifecycle.internal.DefaultExecutionEventCatapult.fire (DefaultExecutionEventCatapult.java:42) at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:137) at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:299) at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:193) at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:106) at org.apache.maven.cli.MavenCli.execute (MavenCli.java:963) at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:296) at org.apache.maven.cli.MavenCli.main (MavenCli.java:199) at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke (Method.java:498) at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:282) at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:225) at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:406) at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:347) Caused by: java.io.IOException: JFrog service failed. Received 404: Could not locate artifact 'artifactory-build-info:build Java xxxxx/5687-1704375973615.json'. at org.jfrog.build.extractor.clientConfiguration.client.JFrogService.throwException (JFrogService.java:49) at org.jfrog.build.extractor.clientConfiguration.client.artifactory.services.PublishBuildInfo.handleUnsuccessfulResponse (PublishBuildInfo.java:36) at org.jfrog.build.extractor.clientConfiguration.client.JFrogService.execute (JFrogService.java:121) at org.jfrog.build.extractor.clientConfiguration.client.artifactory.services.PublishBuildInfo.execute (PublishBuildInfo.java:59) at org.jfrog.build.extractor.clientConfiguration.client.artifactory.ArtifactoryManager.publishBuildInfo (ArtifactoryManager.java:158) at org.jfrog.build.extractor.retention.Utils.sendBuildAndBuildRetention (Utils.java:65) at org.jfrog.build.extractor.retention.Utils.sendBuildAndBuildRetention (Utils.java:56) at org.jfrog.build.extractor.retention.Utils.sendBuildAndBuildRetention (Utils.java:60) at org.jfrog.build.extractor.maven.BuildDeploymentHelper.publishBuildInfo (BuildDeploymentHelper.java:81) at org.jfrog.build.extractor.maven.BuildDeploymentHelper.deploy (BuildDeploymentHelper.java:74) at org.jfrog.build.extractor.maven.BuildInfoRecorder.sessionEnded (BuildInfoRecorder.java:160) at org.apache.maven.lifecycle.internal.DefaultExecutionEventCatapult.fire (DefaultExecutionEventCatapult.java:64) at org.apache.maven.lifecycle.internal.DefaultExecutionEventCatapult.fire (DefaultExecutionEventCatapult.java:42) at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:137) at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:299) at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:193) at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:106) at org.apache.maven.cli.MavenCli.execute (MavenCli.java:963) at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:296) at org.apache.maven.cli.MavenCli.main (MavenCli.java:199) at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke (Method.java:498) at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:282) at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:225) at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:406) at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:347) [main] ERROR org.apache.maven.cli.MavenCli - [main] ERROR org.apache.maven.cli.MavenCli - To see the full stack trace of the errors, re-run Maven with the -e switch. [main] ERROR org.apache.maven.cli.MavenCli - Re-run Maven using the -X switch to enable full debug logging. [main] ERROR org.apache.maven.cli.MavenCli - [main] ERROR org.apache.maven.cli.MavenCli - For more information about the errors and possible solutions, please read the following articles: [main] ERROR org.apache.maven.cli.MavenCli - [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/InternalErrorException ERROR: Couldn't execute Maven task. RuntimeException: Maven build failed with exit code 1 ERROR: Build step failed with exception java.lang.RuntimeException: Maven build failed with exit code 1 at org.jfrog.hudson.pipeline.common.Utils.launch(Utils.java:280) Caused: java.lang.RuntimeException: Maven build failed. Couldn't execute Maven task. RuntimeException: Maven build failed with exit code 1 at org.jfrog.hudson.pipeline.common.Utils.launch(Utils.java:285) at org.jfrog.hudson.maven3.Maven3Builder.RunMaven(Maven3Builder.java:121) at org.jfrog.hudson.maven3.Maven3Builder.perform(Maven3Builder.java:101) at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20) at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:818) at hudson.model.Build$BuildExecution.build(Build.java:199) at hudson.model.Build$BuildExecution.doRun(Build.java:164) at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:526) at hudson.model.Run.execute(Run.java:1895) at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:44) at hudson.model.ResourceController.execute(ResourceController.java:101) at hudson.model.Executor.run(Executor.java:442) Build step 'Invoke Artifactory Maven 3' marked build as failure Sending e-mails to: xxxxx Started calculate disk usage of build Finished Calculation of disk usage of build in 0 seconds Started calculate disk usage of workspace Finished Calculation of disk usage of workspace in 1 second Finished: FAILURE
I hope this helps...
I believe the issue is with ArtifactoryClientConfiguration.persistToPropertiesFile.
The body of that method uses java.io.File, which is unaware of remote vs local paths (Unlike hudson.FilePath). The file is given to it via configuration.setPropertiesFile(propertiesFile.getRemote());
The getRemote() call strips the information about which agent it runs on and returns a plain path, which is only valid on the same computer as that file.
--------------------
Note that ArtifactoryClientConfiguration.persistToEncryptedPropertiesFile likely doesn't have the same issue, as it uses an OutputStream directly.
I think that if I set skipEncryption to false (via usesPlugin: false?) then it is likely 4.0.3 would work for me. Perhaps this is how it slipped through testing? This bug requires a remote build agent && gradle build && usesPlugin: true.
Haven't been able to fully test this theory, but it seems sound so far.
Has anyone upgraded Artifactory Jenkins Plugin to 4.0.3 and checked if this issue has been resolved?
I am getting this issue using 4.0.3 too.
Verified reverting to 4.0.0 resolved the issue.
leoqa , have you tried to clear all agents' cache before running with 4.0.3? it is located in the workspace directory inside the Jenkins home directory. You will find the cache for all your agents there.
Do you mean the workspace for the pipeline I'm running on the agent? If so, the pipeline is configured to clean that workspace out at the end of each run. I've verified that that workspace folder is empty after every run.
Example:
- /opt/jenkins/workspace/TEST_JOB_NAME
If you mean what stored in directory '/opt/jenkins/caches/ ' that is also empty.
Additional update:
I did find a "/opt/jenkins/workspace/TEST_JOB_NAME@tmp" directory that did have the following file in it:
- /opt/jenkins/workspace/TEST_JOB_NAME@tmp/artifactory/artifactory-pipeline-cache/9/rtBuildInfo_TGVlX2FydGlmYWN0b3J5X2JpdGJ1Y2tldF90ZXN0LXNuYXBzaG90Xzk
I then proceeded to clear out the entire /opt/jenkins/workspace directory and tried running the pipeline again using the 4.0.3 version of the plugin.
This did generate an empty file: /opt/jenkins/workspace/TEST_JOB_NAME@tmp/artifactory/buildInfo5255470384553647519.properties
It still failed with the same issue noted previously though.
I then downgraded the plugin to 4.0.0 again, re-ran the pipeline and it once again completed successfully.
Have also encountered this issue. When looking at the filesystem after the build has failed, the missing file is present on the path mentioned, but the command fails nonetheless.