hoarder icon indicating copy to clipboard operation
hoarder copied to clipboard

Upload cached compilation to sftp server after CI?

Open jvican opened this issue 8 years ago • 2 comments

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.

jvican avatar Mar 25 '17 20:03 jvican

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?

jvican avatar Mar 25 '17 20:03 jvican

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

romanowski avatar Mar 28 '17 08:03 romanowski