geotrellis / maml

Map Algebra Modeling Language: It's what we and whales are.
https://geotrellis.github.io/maml/
Apache License 2.0
16 stars 10 forks source link

Add automated releases to Sonatype Nexus through CI #98

Closed rbreslow closed 5 years ago

rbreslow commented 5 years ago

Overview

Resolves #86

Checklist

Notes

We're using sbt-gpg instead of sbt-pgp because the CircleCI build environment is using GnuPG 2.x, and there's no way for sbt-pgp to read a GnuPG 2.x private key.

This came with a few challenges:

Also, I have a concern that the cache could possibly grow forever. For example, if we are restoring the old cache, dependencies change, and then we cache the whole ~/.ivy2 directory again, when do the old artifacts ever get cleaned? It's possible sbt is intelligent enough that it is already doing this.

Finally, I am not sure the best approach to resolving the line item:

WIP PR commits can be optionally (via a commit message signal) released as SNAPSHOTS with a Git SHA suffixes; bypass tests flag

It isn't clear cut in the CircleCI configuration how you'd filter based on PR/commit names, etc. This may require additional logic in the STRTA. I think it deserves it's own issue to fully explore.

Testing Instructions

There isn't a way to test automated releases to Maven Central without cutting a real release. I think the best way to do this would be to walk through the release checklist together after merging this PR.

I have tested that if the value of version in ThisBuild does not end with -SNAPSHOT, the publish task will publish artifacts to the staging repository. I discarded the artifacts after doing this. From here, if I had ran sonatypeRelease, the staging repository would sync with Maven Central.

For everything else, see CI checks below.

hectcastro commented 5 years ago

@rbreslow, there are some conflicts in this PR now. It might be good to resolve them. Afterwards, @echeipesh, we would appreciate a review.