Compare commits

...

2 Commits

Author SHA1 Message Date
eaa301118b it has to be dockerfile? 2021-02-16 16:57:24 +01:00
1a58057821 ignore eclipse files 2021-02-16 16:57:14 +01:00
3 changed files with 101 additions and 0 deletions

1
.gitignore vendored Normal file
View File

@@ -0,0 +1 @@
.project

9
Dockerfile Normal file
View 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/*

View 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