JIB
Plugin for building container images with JIB
@bjb-forge/nx-jib-project
Installation
npx forge add @bjb-forge/nx-jib-projectConfiguration
JIB reads configuration from forge- prefixed labels in your jib.yaml file.
apiVersion: jib/v1alpha1
kind: BuildFile
from:
image: ubuntu
labels:
forge-registry: docker.io/myuser
forge-claim: my-claim
forge-username: ${env.REGISTRY_USERNAME}
forge-password: ${env.REGISTRY_PASSWORD}Labels
| Label | Description |
|---|---|
forge-registry | The registry the OCI image will be pushed to. Defaults to docker.io. |
forge-claim | Optional registry path (claim) used when pushing the image. |
forge-username | Username for authentication with both target and base image registries. |
forge-password | Password for authentication with both target and base image registries. |
forge-fromUsername | Username for authentication with the base image registry. |
forge-fromPassword | Password for authentication with the base image registry. |
forge-toUsername | Username for authentication with the target image registry. |
forge-toPassword | Password for authentication with the target image registry. |
forge-parameters | Comma-separated key=value pairs to substitute in jib.yaml. The parameter projectRoot is always available. |
The built-in parameters projectRoot and version are injected automatically and do not need to be declared.
Inferred Targets
nx-release-publish
Builds and publishes a container image using JIB (Java Image Builder).
Condition: All projects containing a jib.yaml
Generators
jib-project
jib-project generator
nx g @bjb-forge/nx-jib-project:jib-project [options]| Option | Type | Required | Default | Description |
| ----------- | -------- | -------- | ------- | ------------------------------------------- | ------------------------------------------------------------------------------------------------------ |
| directory | string | Yes | - | A directory where the jib config is placed. |
| registry | string | null | No | null | The registry the OCI image will be pushed to. For example: 'docker.io/myuser. Defaults to 'docker.io'. |