0

I was trying to copy a .dll file from "C:\Tests" to "C:\Windows\System32" by COPY command like COPY "C:\Tests\windows\test.dll" "C:\Windows\System32\test.dll"

Jenkin job output says file copied and I tried printing and checking for existence of file in the same job and everything works.

But After the job completes , when I check for the file in the system32 , file doesn't exists.

What can be the issue ?? Is it any cleanup settings of jenkins ? or some permission issue?

Cœur
  • 37,241
  • 25
  • 195
  • 267
Sreevalsa E
  • 905
  • 5
  • 17
  • 39

1 Answers1

0

When Jenkins executes something on the filesystem, that happens on the master or slave node's filesystem, not the filesystem of the user who is browing/triggering the job.

Are you sure your are checking for the existence of the file on the same node that the job ran on?

Slav
  • 27,057
  • 11
  • 80
  • 104
  • Yes . I am restricting the job to be run only on my slave machine and I am checking in the same system – Sreevalsa E Apr 07 '15 at 17:47
  • A few things to be noted: I'm also performing a copy in another folder (this happens neatly). Furthermore i can print the contents of the file in the current job, do a wait and print the contents again, however between the two prints when i check the slave the file in the system32 dir is missing while the file exists in the other location – Sreevalsa E Apr 08 '15 at 04:34
  • Do this test: after last successful run of the job (where you can print the content in-job), change the job configuration to print the content of system32 file **before** the copy command. If the file persisted there from the last run, it would be able to print at the very beginning of this run – Slav Apr 08 '15 at 13:11
  • Thanks for the reply :) I got the solution as it was copying to syswow64. It's a windows feature to redirect to syswow64 dy default when running from a 32 bit cmd. and by default system launches the 32 bit cmd – Sreevalsa E Apr 08 '15 at 14:08