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-16 17:09:30 +01:00

84 lines
2.1 KiB
YAML

apiVersion: tekton.dev/v1alpha1
kind: PipelineResource
metadata:
name: debian-kernel-build-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: debian-kernel-build-image
spec:
type: image
params:
- name: url
value: docker-registry.lan/debian-kernel-build-stable
- name:
---
apiVersion: tekton.dev/v1beta1
kind: Task
metadata:
name: build-debian-kernel-build-from-source
spec:
params:
- name: pathToContainerFile
type: string
description: The path to the dockerfile to build
default: $(resources.inputs.container-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.container-source.path)
resources:
inputs:
- name: container-source
type: git
outputs:
- name: builtImage
type: image
steps:
- name: build-and-push
image: gcr.io/kaniko-project/executor:arm64
# 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.pathToContainerFile)
- --destination=$(resources.outputs.builtImage.url)
- --context=$(params.pathToContext)
- --skip-tls-verify
---
apiVersion: tekton.dev/v1beta1
kind: TaskRun
metadata:
name: build-container-image-from-git-source-task-run
spec:
#serviceAccountName: dockerhub-service
taskRef:
name: build-debian-kernel-build-from-source
params:
- name: pathToContainerFile
value: Dockerfile
resources:
inputs:
- name: container-source
resourceRef:
name: debian-kernel-build-git
outputs:
- name: builtImage
resourceRef:
name: debian-kernel-build-image