-
Bug
-
Resolution: Unresolved
-
Minor
-
None
-
Jenkins 1.625.1
Artifactory Plugin 2.3.1
Linux 2.6.32-431.1.2.el6.x86_64
JDK 1.8.0_25x64
Gradle 2.2
When leveraging the Artifactory plugin to publish artifacts (jar, war, etc.) from a Gradle build (i.e., the Gradle-Artifactory Integration option is enabled), the temporary files containing the build information and Gradle/Artifactory stub that are created in /tmp are not cleaned up after the build completes (regardless of success/failure).
1. Before the build:
$ ls -la /tmp total 48 drwxrwxrwt. 4 root root 32768 Oct 28 18:18 . dr-xr-xr-x. 22 root root 4096 May 14 13:31 .. drwxrwxrwt 2 root root 4096 May 14 13:31 .ICE-unix drwx------ 2 root root 4096 Jun 19 15:44 .ssh_script_automation_9600.tmp
2. <Kick off a single build>
3. After the build has successfully completed:
$ ls -la /tmp total 196 drwxrwxrwt. 5 root root 32768 Oct 28 18:17 . dr-xr-xr-x. 22 root root 4096 May 14 13:31 .. -rw-rw-r-- 1 jenkins jenkins 4304 Oct 28 18:17 buildInfo2754263552212503876.properties -rw-rw-r-- 1 jenkins jenkins 4306 Oct 28 18:17 buildInfo3094215615494783413.properties -rw-rw-r-- 1 jenkins jenkins 4306 Oct 28 18:17 buildInfo4563259066817889305.properties -rw-rw-r-- 1 jenkins jenkins 4173 Oct 28 18:16 buildInfo4840690737184691532.properties -rw-rw-r-- 1 jenkins jenkins 4173 Oct 28 18:17 buildInfo4867868067522153588.properties -rw-rw-r-- 1 jenkins jenkins 4173 Oct 28 18:17 buildInfo5161010698629287103.properties -rw-rw-r-- 1 jenkins jenkins 4306 Oct 28 18:16 buildInfo5453726483552054197.properties -rw-rw-r-- 1 jenkins jenkins 4305 Oct 28 18:17 buildInfo5527867601058892184.properties -rw-rw-r-- 1 jenkins jenkins 4173 Oct 28 18:17 buildInfo6737751503841270964.properties -rw-rw-r-- 1 jenkins jenkins 4306 Oct 28 18:16 buildInfo7055270731756693827.properties -rw-rw-r-- 1 jenkins jenkins 4306 Oct 28 18:17 buildInfo8135505113497629230.properties -rw-rw-r-- 1 jenkins jenkins 4306 Oct 28 18:17 buildInfo8254801048238679777.properties drwxr-xr-x 2 jenkins jenkins 4096 Oct 28 18:17 hsperfdata_jenkins drwxrwxrwt 2 root root 4096 May 14 13:31 .ICE-unix -rw-rw-r-- 1 jenkins jenkins 798 Oct 28 18:17 init-artifactory11184285959621809gradle -rw-rw-r-- 1 jenkins jenkins 798 Oct 28 18:16 init-artifactory1527093786774486333gradle -rw-rw-r-- 1 jenkins jenkins 798 Oct 28 18:17 init-artifactory183972521235824332gradle -rw-rw-r-- 1 jenkins jenkins 798 Oct 28 18:17 init-artifactory2327215488458291841gradle -rw-rw-r-- 1 jenkins jenkins 798 Oct 28 18:16 init-artifactory2418733176174666728gradle -rw-rw-r-- 1 jenkins jenkins 798 Oct 28 18:17 init-artifactory2660007329172251838gradle -rw-rw-r-- 1 jenkins jenkins 798 Oct 28 18:16 init-artifactory3222368236967924379gradle -rw-rw-r-- 1 jenkins jenkins 798 Oct 28 18:17 init-artifactory3415711751868865261gradle -rw-rw-r-- 1 jenkins jenkins 798 Oct 28 18:17 init-artifactory4463086551357442236gradle -rw-rw-r-- 1 jenkins jenkins 798 Oct 28 18:17 init-artifactory7109448943276826421gradle -rw-rw-r-- 1 jenkins jenkins 798 Oct 28 18:17 init-artifactory7489101883991264269gradle -rw-rw-r-- 1 jenkins jenkins 798 Oct 28 18:17 init-artifactory7984552170437924807gradle drwx------ 2 root root 4096 Jun 19 15:44 .ssh_script_automation_9600.tmp
Additionally, why are so many temporary files needed? Inspecting /tmp of a build in progress that has not yet reached the call to artifactoryPublish yields the following:
- 3x buildInfo property files
- 3x Gradle/Artifactory stubs that are identical
Why are these temporary files generated more than once?
$ ls -la /tmp/ total 144 drwxrwxrwt. 5 root root 32768 Oct 28 18:27 . dr-xr-xr-x. 22 root root 4096 May 14 13:31 .. -rw-rw-r-- 1 jenkins jenkins 4306 Oct 28 18:27 buildInfo1821576763934831813.properties -rw-rw-r-- 1 jenkins jenkins 4173 Oct 28 18:27 buildInfo4975622035295525250.properties -rw-rw-r-- 1 jenkins jenkins 4306 Oct 28 18:27 buildInfo8012130816670517709.properties -rw-rw-r-- 1 jenkins jenkins 9846 Oct 28 18:27 gradle5420419914561357285.bin -rw-rw-r-- 1 jenkins jenkins 38375 Oct 28 18:27 gradle8161707877142539639.bin drwxr-xr-x 2 jenkins jenkins 4096 Oct 28 18:27 hsperfdata_jenkins -rw-rw-r-- 1 jenkins jenkins 1140 Oct 28 18:27 hudson2097506487650294896.sh drwxrwxrwt 2 root root 4096 May 14 13:31 .ICE-unix -rw-rw-r-- 1 jenkins jenkins 798 Oct 28 18:27 init-artifactory4449508792010456265gradle -rw-rw-r-- 1 jenkins jenkins 798 Oct 28 18:27 init-artifactory8424354013631046874gradle -rw-rw-r-- 1 jenkins jenkins 798 Oct 28 18:27 init-artifactory8754970206261602270gradle drwx------ 2 root root 4096 Jun 19 15:44 .ssh_script_automation_9600.tmp
I also have this issue