Skip to content

Latest commit

 

History

History
47 lines (26 loc) · 1.93 KB

users.adoc

File metadata and controls

47 lines (26 loc) · 1.93 KB

Users Guide

Warning
This is preliminary documentation

CLI

The CLI is currently distributed as a docker image. To use it create the following alias:

alias jbs='docker run --mount type=bind,source=$HOME/.kube/config,target=/kube --mount type=bind,source=$HOME/.github,target=/root/.github --env KUBECONFIG=/kube  -it --rm   quay.io/redhat-appstudio/hacbs-jvm-cli:latest'

You may also wish to create an update alias to update to the latest version:

alias update-jbs='docker  pull quay.io/redhat-appstudio/hacbs-jvm-cli:latest'

To use the CLI you need to have logged into the server using oc, as the CLI uses Kubernetes APIs.

The CLI supports tab completion and all the commands have a --help option to show usage.

To use commands that modify build recipes you will need to create a $HOME/.github file as specified at https://github-api.kohsuke.org/.

User Commands

End users can interact with the JVM Build Service using annotations on various objects. These annotations are detailed below.

ArtifactBuild Annotations

jvmbuildservice.io/rebuild

This annotation can be used to trigger a rebuild of an ArtifactBuild. It has two possible values, true and failed. If this is true a rebuild will always be triggered. For failed a rebuild is only triggered if the build was not successful.

For example to rebuild all failed dependencies you can use:

kubectl annotate artifactbuilds.jvmbuildservice.io --all jvmbuildservice.io/rebuild=failed

To rebuild a single specific dependency you can use:

kubectl annotate artifactbuilds.jvmbuildservice.io agroal.api.1.15-401ad867 jvmbuildservice.io/rebuild=true

JBSConfig Annotations

jvmbuildservice.io/clear-cache

The annotation can be used to clear the caches local filesystem. This can use useful if the cache has become corrupted somehow, or if you want to force it to re-fetch any dependencies.

kubectl annotate jbsconfig jvmbuildservice.io/clear-cache=true --all