Skip to content

Commit

Permalink
Create deploy-task.yaml
Browse files Browse the repository at this point in the history
  • Loading branch information
daniyalj committed Nov 14, 2019
1 parent c194b62 commit e886f71
Showing 1 changed file with 36 additions and 0 deletions.
36 changes: 36 additions & 0 deletions kubernetes/tekton/deploy-task.yaml
@@ -0,0 +1,36 @@
apiVersion: tekton.dev/v1alpha1
kind: Task
metadata:
name: deploy-using-kubectl
spec:
inputs:
resources:
- name: source
type: git
- name: image
type: image
params:
- name: path
type: string
description: Path to the manifest to apply
- name: yamlPathToImage
type: string
description:
The path to the image to replace in the yaml manifest (arg to yq)
steps:
- name: replace-image
image: mikefarah/yq
command: ["yq"]
args:
- "w"
- "-i"
- "$(inputs.params.path)"
- "$(inputs.params.yamlPathToImage)"
- "$(inputs.resources.image.url)"
- name: run-kubectl
image: lachlanevenson/k8s-kubectl
command: ["kubectl"]
args:
- "apply"
- "-f"
- "$(inputs.params.path)"

0 comments on commit e886f71

Please sign in to comment.