feat: added kaniko task

This commit is contained in:
eding 2026-02-12 11:50:59 +01:00
parent 665b6d737a
commit 4f5872c707

34
tasks/kaniko.yaml Normal file
View file

@ -0,0 +1,34 @@
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