1
0
mirror of https://github.com/tektoncd/catalog.git synced 2024-11-21 05:55:35 +00:00
catalog/task/jib-maven/0.1
vinamra28 1c7fd558fd Deprecate tasks which are using PipelineResources
few Tasks still uses PipelineResources which is no longer available
in latest version of pipelines hence marking them as deprecated

Signed-off-by: vinamra28 <jvinamra776@gmail.com>
2023-09-27 12:52:25 +01:00
..
tests Use latest git-clone in Task's tests 2023-09-22 09:32:22 +01:00
jib-maven.yaml Deprecate tasks which are using PipelineResources 2023-09-27 12:52:25 +01:00
README.md [TEP-0110] Update Tekton Catalog installation instructions 2022-08-16 16:25:52 +01:00

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.1/raw

Parameters

  • 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)

Workspaces

  • source: A Workspace containing the source to build.

Resources

Outputs

  • image: The Docker image name to apply to the newly built image.

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: PipelineResource
metadata:
  name: example-image
spec:
  type: image
  params:
  - name: url
    value: gcr.io/tekton-task-project/my-image
apiVersion: tekton.dev/v1beta1
kind: TaskRun
metadata:
  name: example-jib-maven
spec:
  taskRef:
    name: jib-maven
  params:
  - name: DIRECTORY
    value: ./examples/helloworld
  workspaces:
  - name: source
    persistentVolumeClaim:
      claimName: my-source
  resources:
    outputs:
    - name: image
      resourceRef:
        name: example-image

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.