3 ms·
My tip for using Jenkins (or CI in general): have your build script produce a single-file artifact. You don't have a .war file, but what you can do is simply t
by masto 14y ago
My tip for using Jenkins (or CI in general): have your build script produce a single-file artifact. You don't have a .war file, but what you can do is simply tar or zip your project. I recommend having a source directory and a build directory, and writing your build script such that the source directory is untouched and the output files are placed in the build directory. At the end, zip up that build directory and call it your artifact. You don't HAVE to do this but that's my piece of advice.. it will make your life easier.
Once you've got a stable artifact-builder, you can write a nice script that takes that file and deploys it to the location of your choice.
As you point out, some work needs to be done to determine which files are copied in the build process. I'm not familiar with PHP, but I am involved in an HTML application that has a similar need. We're using RequireJS <http://requirejs.org/docs/optimization.html#wholeproject> http://requirejs.org/docs/optimization.html#wholeproject>..., which has the ability to do all of the copying and optimization in one step. In our build.js file, we specify some patterns to control which files are included and excluded.