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

     1  apiVersion: tekton.dev/v1beta1
     2  kind: Task
     3  metadata:
     4    name: kaniko-build-docker
     5    namespace: tekton-pipelines
     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: path-to-dockerfile
    16          description: The path to the dockerfile to build
    17          default: Dockerfile
    18        - name: image-url
    19          description: value should be like - us.icr.io/test_namespace/builtImageApp
    20        - name: image-tag
    21          description: Tag to apply to the built image
    22    steps:
    23  #    - name: pwd
    24  #      image: alpine
    25  #      script: |
    26  #        pwd
    27  #    - name: ls
    28  #      image: alpine
    29  #      script: |
    30  #        ls -la
    31  #    - name: ls-src
    32  #      image: alpine
    33  #      script: |
    34  #        ls -la /workspace/git-source/build
    35      - name: build-and-push
    36        image: gcr.io/kaniko-project/executor
    37        env:
    38            - name: DOCKER_CONFIG
    39              value: /tekton/home/.docker
    40        securityContext:
    41          runAsUser: 0
    42        command:
    43          - /kaniko/executor
    44        args:
    45          - "--dockerfile=$(params.path-to-context)/$(params.path-to-dockerfile)"
    46          - "--destination=$(params.image-url):$(params.image-tag)"
    47          - "--context=$(params.path-to-context)/"
    48          - "--no-push"