mirror of
https://github.com/tektoncd/catalog.git
synced 2024-11-21 05:55:35 +00:00
e763a4473e
With git-clone version 0.8 and onwards, it started running as non-root and GKE clusters were having some issues, so, we temporarily moved all tasks to use git-clone version 0.7. Ref: https://github.com/tektoncd/catalog/pull/1079 Since we have now moved to kind clusters in our CI, this issue is now resolved and thus moving all tasks to use latest version of git-clone Signed-off-by: vinamra28 <jvinamra776@gmail.com> |
||
---|---|---|
.. | ||
tests | ||
jib-maven.yaml | ||
README.md |
Jib Maven
This Task builds Java/Kotlin/Groovy/Scala source into a container image using Google's Jib tool.
Jib works with Maven and Gradle projects, and this template is for Maven projects.
Install the Task
kubectl apply -f https://api.hub.tekton.dev/v1/resource/tekton/task/jib-maven/0.3/raw
Parameters
- IMAGE: The name of the image to build
- MAVEN_IMAGE: The base image for maven (default:
gcr.io/cloud-builders/mvn
) - DIRECTORY: The directory in the source repository where source should be found. (default: .)
- CACHE: The name of the volume for caching Maven artifacts and base image layers (default: empty-dir-volume)
- INSECUREREGISTRY: Whether to allow insecure registry (default:
false
) - CACERTFILE: CA cert file name containing the certs for TLS verify (default:
service-ca.crt
)
Workspaces
- source: A Workspace containing the source to build.
- sslcertdir: An optional Workspace containing your custom SSL certificates to connect to the registry.
Results
- IMAGE_DIGEST: Digest of the image just built.
Platforms
The Task can be run on linux/amd64
platform.
Usage
This TaskRun runs the Task to fetch a Git repo, and build and push a container image using Jib (Maven)
apiVersion: tekton.dev/v1beta1
kind: TaskRun
metadata:
name: example-jib-maven
spec:
taskRef:
name: jib-maven
params:
- name: IMAGE
value: gcr.io/my-repo/my-image
- name: DIRECTORY
value: ./examples/helloworld
workspaces:
- name: source
persistentVolumeClaim:
claimName: my-source
If you would like to customize the container, configure the jib-maven-plugin
in your pom.xml
.
See setup instructions for Maven for more information.