简体   繁体   中英

cwrsync isn't working under jenkins

I'm using cwrsync with cygdrive notation to refer disk drives. In usual cmd (or batch file) it works perfectly, but when bat-file with rsync invocation is used inside jenkins environment (I mean when jenkins slave runs this bat-file) rsync gives errors like:

rsync: change_dir "/cygdrive/q/build" failed: No such file or directory (2)

In which direction should I dig?

PS. rsync version is 3.1.1, bundled-in cygwin 1.7.32; on windows server 2012.

UPD. Q is related to network-mapped drive.

I figured out that network drives in windows is kind of user-related. And as long as jenkins doesn't use regular user you're working from -- it won't see any network-mapped drives if they're not somehow is globally-visible.

So, solution is to automatically execute command to map network drive as SYSTEM user (which is used by jenkins): so that purpose I created bat file which does following:

net use Q: \\host\sharename /persistent:no

and launch it from SYSTEM user by scheduled task (triggered by network becoming available) -- see this question .

NOTE: /persistent:yes is not working for some reason.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM