Closed VincentPT closed 5 years ago
Looks like a bug in the plugin, @markgalpin let me know how to proceed/report to the team.
Need the version of the jenkins artifactory plugin, and then I can open a JIRA on it. Would be ideal, if @VincentPT hasn't done so already, to update to the latest version (2.16.2) of that plugin and reproduce using the latest version. Thanks!
@markgalpin , my Jenkins is already installed Artifactory Plugin 2.16.2.
I am not sure what is creating the error here. Maybe the path is wrong but don't think so as this is working file with other examples.
java.io.IOException: Failed to set the timestamp of D:\Program Files (x86)\Jenkins\workspace\conan-sample@tmp\conan.tmp1349675751210500070\.conan\artifacts.properties to 0
Maybe collecting the build info after install does not make much sense here or am I missing something?
def b = client.run(command: "install ..")
server.publishBuildInfo b
Will need some feedback here about the status of this. Was it reported to the ecosystem team @markgalpin ?
What action should be taken @lasote?
@danimtb it was reported to @eyalbe4 but may have gotten missed. I pinged him again and will have him update here.
The exception is thrown from the persistBuildProperties method in the RunCommandStep class in the Jenkins Artifactory Plugin.
This is the line which throws the exception (this is a Jenkins API which create the buildProperties file on the current build agent.
buildProperties.touch(0);
I'm not sure why this exception is thrown, and more interesting, why it doesn't happen for some builds.
I suggest we try not to set a zero timestamp on the file, and replace this line with:
buildProperties.touch(System.currentTimeMillis());
Here's a download link to a snapshot version of the Artifactory Plugin, which includes this change:
https://oss.jfrog.org/oss-snapshot-local/org/jenkins-ci/plugins/artifactory/3.2.x-SNAPSHOT/artifactory-3.2.x-20190303.095407-9.hpi
Will you guys be able to try it and let us know if it resolves the issue?
Thanks
It may be a weird build because this error is not the first error happened. I remembered I must to create temp folder for logs manually because the tool failed to create it.
After that, this error happened and I don't know how to fix it by myself. @eyalbe4 Anyway, What should I do with this file artifactory-3.2.x-20190303.095407-9.hpi?
@VincentPT,
Could it be that the error happens when the artifacts.properties file already exists in the .conan directory created by the Jenkins job? Can you see if removing the file, before running the build, resolves the issue?
As for your question, artifactory-3.2.x-20190303.095407-9.hpi is a new version of the Jenkina Artifactory Plugin. Here's how you install it:
@eyalbe4 I can't delete file artifacts.properties because it is created each build times. However, I've installed the plugin follow your instructions, the issue was resolved.
Awesome news @VincentPT! Thanks! This snapshot version is safe and you can keep using it. The fix will be included in the upcoming patch release of the Jenkins Plugin. We'll let you know when it is available.
ping @eyalbe4 , we need to know if the fix is already included in the released version of the plugin in order to close this issue. Thanks!
New release v3.4.0
of the Artifactory-Jenkins plugin after these changes were committed to master
. The problem should be fixed, if not, please open it again. Thanks everybody for your support and feedback.
I have followed conan sample to configure build my C++ project on Jenkins but it met a trouble.
"java.io.IOException: Failed to set the timestamp of ...artifacts.properties to 0" I think the problem is the plugin try to set an invalid timestamp(0) to a file.
System information: OS: Windows 10 pro, x64 Jenkins 2.138.3 Artifactory 6.5.1 Conan version 1.9.2 Python 3.7 jdk1.8.0_191 jre1.8.0_191
Here is issue details: Jenkins pipeline script
and here is execution result.