Skip to content

How to set up your CI

Will Sargent edited this page May 3, 2020 · 9 revisions

Set up your CI

In general, setting up your CI involves adding your publishing credentials to the secret management system that your CI has. The publishing credentials consist of:

  1. The {Bintray, Sonatype} username and password, or both if you them altogether.
  2. The PGP password that couples with the secrets that you have set up in your sbt build.

This configuration is typically done via environment variables that the sbt plugin looks for when the build is executed. Note that this process is sensitive and I encourage you to read up on How to set up secure releases before proceeding.

Bintray credentials

Remember that your Bintray account has to be successfully set up. In particular, make sure that it has publishing rights to whatever organization or user's repository is publishing to. Double-check it by reading the Bintray instructions and by checking your account's profile settings. If you've successfully used this account before, ignore this step.

ENVIRONMENT VARIABLE DESCRIPTION
BINTRAY_USER The username of your bintray account.
BINTRAY_PASS The API Key of your bintray account.

Remember that you need to opt in to publish to Maven Central via Bintray's UI. Read up on the Bintray instructions if you don't know how to do so.

Sonatype credentials

Remember that your Sonatype account has to be successfully set up. Double-check it by reading the Sonatype instructions. If you've successfully used this account before, ignore this step.

ENVIRONMENT VARIABLE DESCRIPTION
SONATYPE_USER or SONA_USER The username of your Sonatype account.
SONATYPE_PASSWORD or SONA_PASS The password of your Sonatype account.

GPG credentials

To correctly set up the gpg credentials, make sure you've read the How to create a GPG key and already created your public and secret gpg keys (each one in an independent armored ASCII file). After that, make sure that:

  1. You add them to your CI and they are readable so that the build can access them; and,
  2. Your build configuration correctly points to them via pgpPublicRing and pgpSecretRing. More info in the How to set up your CI guide.
DESCRIPTION
PGP_PASSWORD or PGP_PASS The PGP password tied to your public and secret key files.