Skip to content
This repository has been archived by the owner on Feb 27, 2024. It is now read-only.

create 2 tekton pipelines for testing tekton + kaniko inside ARM #6

Open
jstrachan opened this issue Sep 1, 2020 · 4 comments
Open
Assignees

Comments

@jstrachan
Copy link
Member

lets create 2 simple PipelineRun / TaskRun YAML files for

  • hello world tekton to just echo hello world
  • run a kaniko build to create an image

which we can use to perform an integration test of tekton and tekton + kaniko on arm

@yyunk
Copy link
Contributor

yyunk commented Sep 15, 2020

hello world tekton to just echo hello world is successful

@yyunk
Copy link
Contributor

yyunk commented Sep 15, 2020

run a kaniko build to create an image

When i following the https://github.com/tektoncd/pipeline/blob/master/docs/tutorial.md
i hava issue

kubectl describe pod/build-docker-image-from-git-source-task-run-pod-wj5ls
Events:
Type Reason Age From Message


Normal Scheduled 16m default-scheduler Successfully assigned jx/build-docker-image-from-git-source-task-run-pod-wj5ls to host-16-0-0-198
Normal Pulled 16m kubelet, host-16-0-0-198 Container image "entrypoint:test2" already present on machine
Normal Created 16m kubelet, host-16-0-0-198 Created container place-tools
Normal Started 15m kubelet, host-16-0-0-198 Started container place-tools
Normal Pulling 15m kubelet, host-16-0-0-198 Pulling image "busybox"
Normal Pulled 15m kubelet, host-16-0-0-198 Successfully pulled image "busybox"
Normal Created 15m kubelet, host-16-0-0-198 Created container step-create-dir-builtimage-z2vp8
Normal Started 15m kubelet, host-16-0-0-198 Started container step-create-dir-builtimage-z2vp8
Normal Pulled 15m kubelet, host-16-0-0-198 Container image "git-init:test2" already present on machine
Normal Created 15m kubelet, host-16-0-0-198 Created container step-git-source-docker-source-mghkt
Normal Started 15m kubelet, host-16-0-0-198 Started container step-git-source-docker-source-mghkt
Normal Pulled 15m kubelet, host-16-0-0-198 Container image "kaniko-executable:test" already present on machine
Normal Created 15m kubelet, host-16-0-0-198 Created container step-build-and-push
Normal Started 15m kubelet, host-16-0-0-198 Started container step-build-and-push
Normal Pulled 15m kubelet, host-16-0-0-198 Container image "imagedigestexporter:test2" already present on machine
Normal Created 15m kubelet, host-16-0-0-198 Created container step-image-digest-exporter-862k8
Normal Started 15m kubelet, host-16-0-0-198 Started container step-image-digest-exporter-862k8

kubectl logs pod/build-docker-image-from-git-source-task-run-pod-wj5ls -c step-create-dir-builtimage-z2vp8
standard_init_linux.go:211: exec user process caused "no such file or directory"

tkn taskrun logs build-docker-image-from-git-source-task-run
[create-dir-builtimage-z2vp8] standard_init_linux.go:211: exec user process caused "no such file or directory"

container step-create-dir-builtimage-z2vp8 has failed

@rawlingsj
Copy link
Member

Task used

apiVersion: tekton.dev/v1beta1
kind: Task
metadata:
  name: build-docker-image-from-git-source
spec:
  params:
    - name: pathToDockerFile
      type: string
      description: The path to the dockerfile to build
      default: $(resources.inputs.docker-source.path)/Dockerfile
    - name: pathToContext
      type: string
      description: |
        The build context used by Kaniko
        (https://github.com/GoogleContainerTools/kaniko#kaniko-build-contexts)
      default: $(resources.inputs.docker-source.path)
  resources:
    inputs:
      - name: docker-source
        type: git
    outputs:
      - name: builtImage
        type: image
  steps:
    - name: build-and-push
      image: gcr.io/kaniko-project/executor:v0.16.0
      # specifying DOCKER_CONFIG is required to allow kaniko to detect docker credential
      env:
        - name: "DOCKER_CONFIG"
          value: "/tekton/home/.docker/"
      command:
        - /kaniko/executor
      args:
        - --dockerfile=$(params.pathToDockerFile)
        - --destination=$(resources.outputs.builtImage.url)
        - --context=$(params.pathToContext)

@jenkins-x-bot
Copy link

Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale.
Stale issues rot after an additional 30d of inactivity and eventually close.
If this issue is safe to close now please do so with /close.
Provide feedback via https://jenkins-x.io/community.
/lifecycle stale

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants