This repository has been archived on 2025-11-20. You can view files and clone it, but cannot push or open issues or pull requests.
Files
kernel-configs/tekton-debian-kernel-build-image.yaml
2021-02-27 15:37:07 +01:00

91 lines
2.0 KiB
YAML

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