Upload cached compilation to sftp server after CI?
Hey @romanowski,
Glad this project is moving forward. I think it would be interesting to see how Hoarder could accomodate this use case. I'd like to upload the cached compiled jars and analysis files produced by every successful CI run to a sftp server automatically from within sbt.
In the long run, more protocols could be supported. I think that sftp can be leveraged in a lot of platforms, S3 and others, as well as local clusters.
I think this could be a game changer in the way we interact with PRs, especifically in projects that take long to compile.
I was quite inspired by https://medium.com/@posco/build-part-1-reproducibility-d0de8142e583#.22v66wkgj.
Another use case I'd like to see: being able to fetch the cached artifacts from sbt with a task. To take less space in the servers, Hoarder could compress and uncompress class files.
Does this sound appealing to you?
Hi @jvican
I am working on it right now. The idea is to create all sbt parts in hoarder and the only thing that users will need to define is CiSetup:
trait Setup {
def shouldPublishCaches(): Boolean
def shouldUseCache(): Boolean
def invalidateCache(): Unit
def exportCachePart(op: Path => Unit): Unit
def loadCachePart(op: Path => Unit): Unit
def exportCache(op: Path => Unit): Unit
def loadCache(op: Path => Unit): Unit
}
I don't have documentation (I hope methods are self describing) yet since first I want to make it work with Travis caches (in #27)
I will keep you updated.
- @chipsenkbeil