Compare commits
2 Commits
9b652618e1
...
eaa301118b
| Author | SHA1 | Date | |
|---|---|---|---|
| eaa301118b | |||
| 1a58057821 |
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@@ -0,0 +1 @@
|
||||
.project
|
||||
9
Dockerfile
Normal file
9
Dockerfile
Normal file
@@ -0,0 +1,9 @@
|
||||
FROM debian:stable-slim
|
||||
|
||||
RUN apt-get update && apt-get install -y \
|
||||
procps build-essential dpkg-dev dpkg-cross \
|
||||
devscripts make && \
|
||||
apt-get clean -y && \
|
||||
rm -rf /var/lib/apt/lists/* && \
|
||||
rm -rf /var/cache/apt/*
|
||||
|
||||
91
tekton-debian-kernel-build-image.yaml
Normal file
91
tekton-debian-kernel-build-image.yaml
Normal file
@@ -0,0 +1,91 @@
|
||||
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: debug-print
|
||||
image: busybox
|
||||
command:
|
||||
- echo
|
||||
args:
|
||||
- ockerfile: $(params.pathToContainerFile)
|
||||
- contextPath: $(params.pathToContext)
|
||||
- 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
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user