0

I am trying to solve the following dilemma:

If you are doing Continuous Integration, you build a lot of CI versions every day, which are all "release" versions in the sense of Maven. If they pass all tests, they end up in the artifact repository (Nexus, in our case). At some point, the hard disk is full (and "buying larger disks" is not an option).

Up to now, we are using a lot of SNAPSHOT versions which are deleted after some time, so the number of release versions is quite limited and the growth of the Nexus storage is manageable.

What would you do in the "CI world"? Do you delete old CI versions if they were not released into production? Do you avoid to put all CI versions into Nexus? What else could be a usable solution?

J Fabian Meier
  • 33,516
  • 10
  • 64
  • 142
  • I'm not sure I understand what a "CI version" is for you. On Jenkins for example, you can keep the latest N successul builds, making sure you don't run out of space. Versions are either snapshots or releases: snapshots are deleted with a policy (at most X, or time policy) while releases never are. – Tunaki Jan 31 '17 at 10:39
  • Maybe I misunderstood some concepts, but AFAIK, CI builds usually produce a unique release-like version number like 1.2.3-b324 and are not SNAPSHOT in the sense of Maven. – J Fabian Meier Jan 31 '17 at 10:41
  • Hmm, snapshots already are unique in the Maven sense. Maven 2 allowed non-unique snapshots, but [Maven 3 always has timestamped snapshots](http://stackoverflow.com/questions/4275466/how-do-you-deal-with-maven-3-timestamped-snapshots-efficiently). – Tunaki Jan 31 '17 at 10:42
  • I know, probably I should have cited a source, but I read at different places that Maven SNAPSHOTS are not suitable for a CI process because every artifact is a potential release and should be "stageable" to get into production. But of course, one could probably also build a CI-like process while using SNAPSHOT artifacts. – J Fabian Meier Jan 31 '17 at 10:45
  • 1
    we simply delete these versions after a while. projects that deliver docker-images often do not upload anything into nexus anymore. The ideal solution would be to look at the version in production and keep up to that version. But we don't have that. What you may be able to do is use a different proxy repo for prod deployments which proxies the CI repository. So deployed artifacts will be cached in that proxy repo. In our case: we can live with a simple forward strategy. So if something was wiped from nexus we simply build another version - we keep track of our interfaces - so its not pure hope – wemu Jan 31 '17 at 11:29
  • I'd challenge the statement that projects with docker-images do not upload anything into Nexus Repository anymore. If sharing dependencies amongst teams is important to you, you'll still be using Nexus Repository for jars, etc... and likely for Docker images. – DarthHater Feb 02 '17 at 12:12

0 Answers0