34 lines
886 B
YAML
34 lines
886 B
YAML
apiVersion: tekton.dev/v1beta1
|
|
kind: Task
|
|
metadata:
|
|
name: kaniko
|
|
namespace: tekton-pipelines
|
|
spec:
|
|
params:
|
|
- name: IMAGE
|
|
description: Name of the image to build
|
|
- name: DOCKERFILE
|
|
default: ./Dockerfile
|
|
- name: CONTEXT
|
|
default: ./
|
|
workspaces:
|
|
- name: source
|
|
steps:
|
|
- name: build-and-push
|
|
image: gcr.io/kaniko-project/executor:latest
|
|
workingDir: $(workspaces.source.path)
|
|
args:
|
|
- --dockerfile=$(params.DOCKERFILE)
|
|
- --context=$(workspaces.source.path)/$(params.CONTEXT)
|
|
- --destination=$(params.IMAGE)
|
|
- --digest-file=$(terminations.log.path)
|
|
volumeMounts:
|
|
- name: docker-config
|
|
mountPath: /kaniko/.docker
|
|
volumes:
|
|
- name: docker-config
|
|
secret:
|
|
secretName: ghcr-auth
|
|
items:
|
|
- key: .dockerconfigjson
|
|
path: config.json |