Skip to content

Instantly share code, notes, and snippets.

@tzununbekov
Last active July 15, 2020 11:31
Show Gist options
  • Save tzununbekov/9e9d7ffc01b43f401aa785f41be1082d to your computer and use it in GitHub Desktop.
Save tzununbekov/9e9d7ffc01b43f401aa785f41be1082d to your computer and use it in GitHub Desktop.
apiVersion: tekton.dev/v1alpha1
kind: Task
metadata:
name: kaniko
spec:
params:
- name: IMAGE
description: The URI of the image to push, including registry host
default: ""
- name: DIRECTORY
description: The subdirectory of the workspace/repo
default: ""
- name: DOCKERFILE
description: File name to build docker image
default: Dockerfile
resources:
inputs:
- name: sources
targetPath: /workspace
type: git
steps:
- name: build-and-push
image: gcr.io/kaniko-project/executor:v0.8.0
args:
- --context=/workspace/workspace/$(inputs.params.DIRECTORY)
- --dockerfile=/workspace/workspace/$(inputs.params.DIRECTORY)/$(inputs.params.DOCKERFILE)
- --destination=$(inputs.params.IMAGE)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment