Building

We use Apache Maven as the build tool of choice.

We use gitbook to build the documentation.

Tests Execution

This section instructs how to execute locally project's tests, if you are not interested (for example, considering that these tests are part of the GitHub CI process) you can skip to the next section

Docker images building

Keep in mind that Kapua Docker images are hosted under Kapua DockerHub account. If your interest is to build Kapua Docker images by yourself, and you didn't do it in the previous step, execute Maven build with docker profile enabled:

mvn clean install -Pdocker -DskipTests

Add the console profile to generate also the Web Console docker image:

mvn clean install -Pdocker,console -DskipTests

If you want to speed up the build process you can ask Maven to ignore -SNAPSHOT updates force it to use only locally present artifacts with the dev profile.

mvn clean install -Pdocker,dev -DskipTests

Again, don't forget the console profile if the Web Console image is needed:

mvn clean install -Pdocker,dev,console -DskipTests

Security Scan

You can perform the CVE scan of the project by running with the following command:

mvn verify -DskipTests -Psecurity-scan

Currently, is configured to run the scan and produce reports but not to fail in case of CVEs detected. Reports can be found in the target/security-scan/ directory of each module.

Documentation

Before you can build documentation, you need to install gitbook

gitbook

To install gitbook run

$ npm install -g gitbook-cli

If you don't have npm installed then you would need to install it first.

Install npm On Fedora

$ yum install npm

Install npm On Fedora 24

This is what you should do if you are using Fedora 24+.

$ dnf install nodejs

Install npm On Mac-OS

The easiest way would be through brew brew

You first install brew using the instructions on the Brew website.

After you installed brew you can install npm by:

brew install npm

Building the docs

To build documentation, run gitbook build from either docs/developer-guide/en or docs/user-manual/en

Continuous integration

Kapua is running CI builds in the following public environments:

  • GitHub Actions GitHub Actions CI
  • Eclipse Hudson Hudson

Please be sure that both environments are "green" (i.e. all tests pass) after you commit any changes into develop branch.

We also use CI server sponsored by Red Hat to automatically push latest Docker images to Kapua DockerHub account. Red Hat CI server checks for code changes every 15 minutes and pushes updated version of images if needed.

Docker images

Kapua Docker images are hosted under Kapua DockerHub account. The latest snapshots of images are updated every 15 minutes.

In order to build Kapua Docker images yourself, execute Maven build with docker profile enabled:

mvn clean install -Pdocker

Just like building Kapua from the source code, also add the console profile to generate the Web Console docker image:

mvn clean install -Pdocker,console

If you want to speed up the build process you can ask Maven to ignore -SNAPSHOT updates force it to use only locally present artifacts with the dev profile. You can also skip unit tests to speed things even more.

mvn clean install -Pdocker,dev -DskipTests

Again, don't forget the console profile if the Web Console image is needed:

mvn clean install -Pdocker,dev,console -DskipTests

Pushing docker images

Pushing with default settings:

mvn -Pdocker deploy

Pushing to a specific docker registry:

mvn -Pdocker deploy -Ddocker.push.registry=registry.hub.docker.com

Pushing to a specific docker registry under a specific account:

mvn -Pdocker deploy -Ddocker.push.registry=registry.hub.docker.com -Ddocker.account=eclipse

Don't forget to add the console Maven profile to the console above if you're interested in pushing the Web Console image as well.

By default Kapua applies the following tags to the published images:

  • latest
  • daily timestamp in format YYYY-MM-DD
  • current project version (for example 0.0.1 or 0.1.2-SNAPSHOT)

results matching ""

    No results matching ""