github.com/diadata-org/diadata@v1.4.593/.tekton/Task.Kaniko.DeployToCluster.yaml (about)

     1  apiVersion: tekton.dev/v1beta1
     2  kind: Task
     3  metadata:
     4    namespace: tekton-pipelines
     5    name: deploy-application
     6  spec:
     7    inputs:
     8      resources:
     9        - name: git-source
    10          type: git
    11      params:
    12        - name: path-to-context
    13          description: The path to the build context, used by Kaniko - within the workspace
    14          default: .
    15        - name: image-url
    16          description: value should be like - us.icr.io/test_namespace/builtImageApp
    17        - name: image-tag
    18          description: Tag to apply to the built image
    19          default: "latest"
    20        - name: path-to-yaml-file
    21          description: The path to the yaml file to deploy within the git source
    22          default: deploy.yaml
    23    steps:
    24      - name: update-yaml
    25        image: alpine
    26        command: ["sed"]
    27        args:
    28          - "-i"
    29          - "-e"
    30          - "s;IMAGE;$(inputs.params.image-url):$(inputs.params.image-tag);g"
    31          - "$(inputs.resources.git-source.path)/$(inputs.params.path-to-context)/$(inputs.params.path-to-yaml-file)"
    32      - name: deploy-app
    33        image: lachlanevenson/k8s-kubectl
    34        command: ["kubectl"]
    35        args:
    36          - "apply"
    37          - "-f"
    38          - "$(inputs.resources.git-source.path)/$(inputs.params.path-to-context)/$(inputs.params.path-to-yaml-file)"