2
0

our own build-env image

This commit is contained in:
2021-04-12 09:42:19 +02:00
parent b45ffcf9cb
commit 4318121e05
3 changed files with 100 additions and 26 deletions

75
openwrt-build-image.yaml Normal file
View File

@@ -0,0 +1,75 @@
apiVersion: tekton.dev/v1alpha1
kind: PipelineResource
metadata:
name: openwrt-configs-git
spec:
type: git
params:
- name: revision
value: master
- name: url
value: http://git-ui.lan/chaos/openwrt-configs.git
---
apiVersion: tekton.dev/v1alpha1
kind: PipelineResource
metadata:
name: img-debian-stable-openwrt-build
spec:
type: image
params:
- name: url
value: cr.lan/debian-stable-openwrt-build
---
apiVersion: tekton.dev/v1beta1
kind: Task
metadata:
name: build-debian-stable-openwrt-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
---
apiVersion: tekton.dev/v1beta1
kind: TaskRun
metadata:
name: img-debian-stable-openwrt-build
spec:
taskRef:
name: build-debian-stable-openwrt-build
params:
- name: pathToContainerFile
value: Dockerfile
resources:
inputs:
- name: source
resourceRef:
name: openwrt-configs-git
outputs:
- name: builtImage
resourceRef:
name: img-debian-stable-openwrt-build