开发者

Copy changed files in Jenkins

开发者 https://www.devze.com 2023-04-02 23:16 出处:网络
I\'m using Jenkins for building my projects. I\'m using Ant to do the compilation itself. When build finishes I\'d like to copy files that were compiled in this build to s开发者_JS百科ome directory. I

I'm using Jenkins for building my projects. I'm using Ant to do the compilation itself. When build finishes I'd like to copy files that were compiled in this build to s开发者_JS百科ome directory. Is this possible?


Yes, you could do this as part of your Ant project using the Ant copy task. Best practice is to clean the directory containing your compiled binaries at the start of each build, so you should just be able to copy the whole directory without filtering the contents.


If you want to specifically find changed files, you could take a recursive md5 over your Target directory before and after your build, and only copy those files which do not match the prebuild checksum.

This being said, if you've got a clean build directory you should just copy everything over; changed files will get copied as needed, and unchanged files will copy but won't impact the application.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号