Deliverables Analyzer is a RESTful Web Service that uses the Build Finder library to scan a given URL containing a software distribution and return the list of builds.
The main way to use the service is as follows:
- Perform an HTTP POST passing the
urlof a deliverable to/api/analyze. A deliverable should be an archive, such as a.zipor.jarfile, which contains a product version. For example, if your product isjbossfooand your version is1.0, then you might have a file calledjbossfoo-1.0.zipto analyze. Theurlmust be using protocolhttporhttps. You may also optionally setconfigto override some of the default configuration settings. Theconfigis the JSON representation oforg.jboss.pnc.build.finder.core.BuildConfig. - The
/api/analyzeendpoint will return the status code201 Createdwith aLocationheader. The location will be set to/api/analyze/results/<id>where<id>is an identifier corresponding to theurl. The results will be cached, but will eventually expire. You may fetch the configuration used by accessing the/api/analyze/configs/<id>endpoint. - The
/api/analyze/results/<id>endpoint will return status code404 Not Foundif<id>doesn't exist. It will return503 Service Unavailableif the results exist, but are not yet ready. It will return200 OKif the results exist and are ready. In case there is an error getting the results, it will return500 Server Error. - The
/api/analyze/statuses/<id>endpoint will return the current status (percent done) of the analysis and may be polled once the analysis has started.
The service supports the MicroProfile /q/health endpoint (and also
/q/health/live and /q/health/ready).
The service will reply to /api/version with a version string in
plaintext containing information about the service as well as the
version of Build Finder
being used.
To build with Maven and run the tests:
$ mvn -Ddistribution.url=<url> clean install
Deliverables Analyzer can be configured by setting the various configuration keys listed below. They can be defined by setting the configuration key in:
- system property (
-Dkey=value) - environment variable
.envfile in the working directoryapplication.propertiesfile
| Configuration Key | Description | Example |
|---|---|---|
| koji.hub.url | The Koji Hub URL to find builds | http://brewhub.localhost/brewhub |
| koji.web.url | The Koji Web URL | http://brewweb.localhost/brew |
| pnc.url | The PNC URL to find builds | http://pnc.localhost |
| infinispan.mode | Define whether to use Infinispan in EMBEDDED (default) or REMOTE |
EMBEDDED |
If the infinispan.mode is set to REMOTE, the following configuration keys need to be defined:
| Configuration Key | Description | Example |
|---|---|---|
| quarkus.infinispan-client.hosts | Comma-delimited Infinispan server list (<hostname>[:<port>]) | localhost:11222 |
| quarkus.infinispan-client.username | Username for the Infinispan server | admin |
| quarkus.infinispan-client.password | Password for the Infinispan server | password |
The following caches also need to be present in the Infinispan server:
- builds
- builds-pnc
- checksums-md5
- checksums-pnc-md5
- checksums-pnc-sha1
- checksums-pnc-sha256
- checksums-sha1
- checksums-sha256
- files-md5
- files-sha1
- files-sha256
- rpms-md5
- rpms-sha1
- rpms-sha256
| Configuration Key | Description | Example |
|---|---|---|
| quarkus.otel.exporter.otlp.endpoint | OTLP endpoint to send telemetry data to | http://localhost:4317 |
| quarkus.otel.resource.attributes | Attributes to add to the exported trace | "service.name=pnc-deliverable-analyzer,deployment.environment=staging" |
To also build the Docker image, add -Pdocker to the mvn arguments.
This is the equivalent of manually running:
$ docker-compose pull
$ docker-compose up --build
$ docker-compose down --rmi --remove-orphans -v