apiVersion: tekton.dev/v1alpha1 kind: PipelineResource metadata: name: chaos-kernel-configs-git spec: type: git params: - name: revision value: master - name: url value: http://git-ui.lan/chaos/kernel-configs.git --- apiVersion: tekton.dev/v1alpha1 kind: PipelineResource metadata: name: img-debian-kernel-build spec: type: image params: - name: url value: cr.lan/debian-kernel-build-stable --- apiVersion: tekton.dev/v1beta1 kind: Task metadata: name: build-debian-kernel-build spec: params: - name: pathToContainerFile type: string default: $(resources.inputs.source.path)/Dockerfile - name: pathToContext type: string default: $(resources.inputs.source.path) resources: inputs: - name: source type: git outputs: - name: builtImage type: image steps: - name: build-and-push image: gcr.io/kaniko-project/executor:arm64 command: - /kaniko/executor args: - --dockerfile=$(params.pathToContainerFile) - --destination=$(resources.outputs.builtImage.url) - --context=$(params.pathToContext) - --snapshotMode=redo - --skip-tls-verify #- name: cleanup-workspace-post # image: alpine # command: # - rm # args: # - -rf # - /workspace/kernel-configs* #workspaces: # - name: workspace # mountPath: /workspace --- apiVersion: tekton.dev/v1beta1 kind: TaskRun metadata: name: img-debian-kernel-build spec: #serviceAccountName: dockerhub-service taskRef: name: build-debian-kernel-build params: - name: pathToContainerFile value: Dockerfile resources: inputs: - name: source resourceRef: name: chaos-kernel-configs-git outputs: - name: builtImage resourceRef: name: img-debian-kernel-build # workspaces: # - name: workspace # persistentVolumeClaim: # claimName: tektoncd-workspaces # subPath: workspaces