Skip to content

Latest commit

 

History

History
112 lines (77 loc) · 3.73 KB

RELEASING.md

File metadata and controls

112 lines (77 loc) · 3.73 KB

Releasing the CloudWatch exporter

Only maintainers can do this. The process is based on the java_client release process.

Requirements

Access to the OSS Sonatype repository

Sign up through Sonatype JIRA if you don't have an account already. File a Publishing Support ticket (example) to gain access to the io.prometheus group in the Sonatype OSSRH. The same login will be used for the repository.

Verify that you can log into OSSRH. The CloudWatch Exporter is at io.prometheus.cloudwatch.

Set up Maven publishing, specifically the <server> block in ~/.m2/settings.xml. Fetch your user token according to these instructions. A minimal config:

<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0
  https://maven.apache.org/xsd/settings-1.0.0.xsd">

  <servers>
    <server>
      <id>ossrh</id>
      <!-- Update these following the instructions at https://central.sonatype.org/publish/generate-token/ -->
      <username>token-user</username>
      <password>token-password</password>
    </server>
  </servers>
</settings>

The project setup is already done.

Push a snapshot

To push a snapshot, check out the latest main branch and run

mvn clean deploy

This should succeed.

Start a release

To prepare a release:

mvn release:clean release:prepare

This will

  1. prompt for the version
  2. update pom.xml with this version
  3. create and push a git tag
  4. build everything
  5. GPG-sign the artifacts

To actually release:

mvn release:perform

This will upload everything to OSSRH into a staging repository. To locate it, log into Sonatype OSS, then open Staging Repositories. If it spins forever, open the main page and log in first. If nothing shows up, you probably forgot to mvn release:perform.

Press "Close" to promote the release.

The staging repository will show "Activity: Operation in progress" for a few seconds. Refresh or check the Activity tab to see what's going on.

Once closing is done, the "Release" button unlocks. Press it.

This runs for a while, and the new version should become available on OSSRH. It usually appears immediately after the release process is done, but can take a few hours to show up.

Docker images

As part of the release process, mvn will create the git tag. This tag is picked up by CircleCI, which builds and pushes the Docker images.

GitHub Release

Create a new GitHub release. Select the tag for this version that Maven pushed.

Use the format A.B.C / YYYY-MM-DD as the release title. Summarize the changes.

The release files and signatures are available in target/checkout/target/. Upload the .jar and .jar.asc files to the GitHub release.

Publish the release.

Announcement

Announce the changes to prometheus-announce, linking to OSSRH and the GitHub release.