test
This commit is contained in:
34
k8s/tekton/task-build.yaml
Normal file
34
k8s/tekton/task-build.yaml
Normal file
@ -0,0 +1,34 @@
|
||||
#task-build.yaml
|
||||
apiVersion: tekton.dev/v1
|
||||
kind: Task
|
||||
metadata:
|
||||
name: build-and-push
|
||||
namespace: tekton-demo
|
||||
spec:
|
||||
params:
|
||||
- name: IMAGE
|
||||
type: string
|
||||
description: "Target image"
|
||||
- name: GIT_URL
|
||||
type: string
|
||||
- name: GIT_REVISION
|
||||
type: string
|
||||
default: "main"
|
||||
steps:
|
||||
- name: git-clone
|
||||
image: alpine/git
|
||||
script: |
|
||||
#!/bin/sh
|
||||
git clone $(params.GIT_URL) source
|
||||
cd source
|
||||
git checkout $(params.GIT_REVISION)
|
||||
|
||||
- name: build-image
|
||||
image: gcr.io/kaniko-project/executor:latest
|
||||
args:
|
||||
- "--dockerfile=source/Dockerfile"
|
||||
- "--context=source/"
|
||||
- "--destination=$(params.IMAGE)"
|
||||
- "--insecure"
|
||||
- "--skip-tls-verify"
|
||||
|
Reference in New Issue
Block a user