We are using IVY on our project and I have recently setup a Jenkins server so that every time a trunk check in is performed the following happens.
- Jenkins SCM poll detects change and notifies IVY plugin.
- IVY plugin triggers ANT build for changed module and triggers build of downstream modules.
- Built modules are then published to central IVY repo versioned as 1.0-SNAPSHOT
Each module ivy.xml on trunk declares dependencies using rev="latest.integration" and the ivysettings.xml file declares the resolver as follows. This ensures later SNAPSHOTS are pulled down to the local IVY repo.
<resolvers>
<chain name="chained" returnFirst="true">
<filesystem name="libraries" changingPattern="1.0-SNAPSHOT" changingMatcher="exact" checkmodified="true">
<ivy pattern="${ivy.repo.dir}/[organisation]/[module]/[revision]/ivy.xml"/>
<artifact pattern="${ivy.repo.dir}/[organisation]/[module]/[revision]/[artifact].[ext]"/>
</filesystem>
</chain>
</resolvers>
Now this works fine whilst developing on trunk, but I am confused on how to take this forward so that we can publish release artifacts. If I am correct SNAPSHOTS should never be used in a production deployment?
I was thinking whether to implement a weekly build that runs at the weekend and performs the following.
- Tears down the Jenkins workspace.
- Checks out trunk from SVN.
- Runs a full build and executes all unit tests.
- If 3 runs to success for ALL modules then publish versioned artifacts eg -WKYY.1 to IVY repo.
Now if steps 1-4 are correct, do I then TAG SVN and create branches for ALL modules so that the IVY.xml files can be checked in which state the correct dependency version numbers?