How can I set up builds of Play apps and (custom) Play modules in a CI system so that when a module’s build is good, the build installs the module artifacts in a local repository and/or deploys them to a remote repository, and the apps use the artifacts in that repository?
The solution should also work well for a developer who’s working locally.
I’m using Jenkins, and running in trouble whatever way I try to do this.
Before I elaborate on all the problems I’ve encountered, I’ll wait, because it is laborious, and maybe someone else can offer how they do it.
I have a setup in jenkins that works well from dev to production.
First here is the configuration in the dependencies.yml for the custom module repository
With this developers and jenkins search firstly in the same repository to see if a module is present and if not, got to the nexus repository to download the artifact.
To build my module in jenkins I use a custom sh script like this
With this script you are able to push your module to nexus on each jenkins build. This is not really what I do. I use jenkins release module to push it only when I build a release. For a release I have a special script
This script put a tag in our svn repository, push the module to nexus and update dependencies.yml file.
With this jenkins can build an app which depends on a local version of the module while it is not released and after that can build the app by downloading the module artifcat from the nexus repository. It is the same thing for developers