/insights-schemas-java

Schemas for Java apps on cloud.redhat.com

Primary LanguageJavaApache License 2.0Apache-2.0

Red Hat Insights schemas Java code

A repository with schema code that can be used in java based projects.

Import notification schemas in your java project like:

   <dependency>
      <groupId>com.redhat.cloud.common</groupId>
      <artifactId>insights-notification-schemas-java</artifactId>
      <version>0.1-SNAPSHOT</version>
   </dependency>

Releasing

There are no automatic releases at this point. To do a manual release the following must be done:

Pre-requisites

  1. Configure your public key for pushing to github.com

  2. Add your engineering account to maven config (see below)

    1. The account needs to have permissions for pushing to jboss.staging

Adding your engineering account

Open your maven settings file (usually on ~/.m2/settings.xml) and add the server and your credentials inside the settings tag or anywhere where it can be activated. Replace with your username and password.

<servers>
  <server>
    <id>jboss.staging</id>
    <username>my-engineering-account</username>
    <password>nohack</password>
  </server>
</servers>

Doing a release

  1. Checkout latest code and checkout master branch locally. e.g. git checkout master && git fetch upstream && git reset --hard upstream/master

  2. Do a dry run by running the following commands:

    mvn clean release:clean
    mvn release:prepare -DdryRun=true
  3. If everything worked fine, run the following command to release:

    mvn clean release:clean
    mvn release:prepare
    mvn release:perform

    It will prompt you with the next versions for the build and snapshot. Defaults are usually fine.

    A new build will start, creating the commits to update and tag the versions accordingly, it will then try to push the commits. If there is any error, you can always retry the command and it should pick up where it left.

  4. Go to https://repository.jboss.org/nexus/index.html#stagingRepositories.

    1. Find your build and select it - You can sort by Updated to check the newer ones.

    2. Click on Close action and Confirm

    3. Once the process is done (you might need to wait a bit and/or refresh the page) you should be able to select Release and Confirm. Defaults are OK.

    4. That’s it! Now you have to wait until it reaches Central (could take a while) before you can use it (dependabot PR’s might confirm it is available).