2
0
Files
openwrt-configs/openwrt-build-image.yaml
2021-04-12 09:42:19 +02:00

75 lines
1.7 KiB
YAML

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