Deployment Details - artsy/snowplow GitHub Wiki
This page contains additional details on deployment of snowplow apps, for cases where running make deploy
(as listed here) is not enough.
scala-enrich-common
The process here is to push a *.jar
to the OSS Sonatype maven repository, signed with Pretty Good Privacy (pgp).
Why sign?
Sonatype signs packages to ensure the package you download from its central repository is the same as the one uploaded to it, and has not been tampered with.
Set up gpg for pgp (one time)
pgp is an encryption program, the sbt plugin for pgp signing uses Gnu Privacy Guard (gpg), an OpenPGP-compliant program, under the hood.
There is no installation for pgp, only for gpg. Install gpg with: brew update && brew install gpg
Grab the 2 following keys off of the "SecretKeys from Frank-The-Tank" secure note in 1Password, and run:
gpg --import artsyit_sonatype_public.key
gpg --allow-secret-key-import --import artsyit_sonatype_private.key
sbt setup (one time)
Assuming your code is able to compile to jar successfully after a sbt clean package
, you will need to make one file to add a plugin, and two files to store credentials, before publishing.
First, add the plugin. Create the file ~/.sbt/0.13/plugins/gpg.sbt
and type (on a single line without a new line):
addSbtPlugin("com.typesafe.sbt" % "sbt-pgp" % "0.8.3")
Second, add the passphrase for the private key we just imported, create the file ~/.sbt/0.13/pgp.sbt
and type (on a single line without a new line):
pgpPassphrase := Some(Array('p', 'a', 's', 's', 'w', 'o', 'r', 'd'))
Substituting the Passphrase
in 1Password under "gpg key sonatype snowplow" for the array of characters show here.
Third, create the file ~/.sbt/0.13/sonatype.sbt
and type (without a new line at the bottom):
credentials += Credentials("Sonatype Nexus Repository Manager",
"oss.sonatype.org",
"username",
"password")
Substituting username
and password
for the credentials in 1Password under "Sonatype". These are the same credentials used to log into the Sonatype website.
Publishing
Just run make deploy
in the root directory of the scala-common-enrich-master
branch or your version of it.
References
These steps are pulled from this blogpost