Browse Source

add example

devoxx-france-2025
Nicolas Massé 8 months ago
parent
commit
801407e395
  1. 4
      examples/bootc/src/Containerfile
  2. 87
      examples/bootc/tekton/pipeline.yaml
  3. 51
      examples/bootc/tekton/pipelinerun.yaml

4
examples/bootc/src/Containerfile

@ -0,0 +1,4 @@
FROM quay.io/fedora/fedora-bootc:41
RUN dnf install -y htop \
&& dnf clean all

87
examples/bootc/tekton/pipeline.yaml

@ -0,0 +1,87 @@
apiVersion: tekton.dev/v1beta1
kind: Pipeline
metadata:
name: bootc
spec:
workspaces:
- name: source-workspace
- name: oci-images
- name: registry-token
params:
- name: git-url
type: string
- name: git-revision
type: string
default: main
- name: image-name
type: string
- name: context-dir
type: string
default: "."
- name: containerfile-path
type: string
default: "Containerfile"
tasks:
- name: clone-repo
taskRef:
kind: Task
name: git-clone
params:
- name: url
value: $(params.git-url)
- name: revision
value: $(params.git-revision)
workspaces:
- name: output
workspace: source-workspace
- name: build-x86-64
runAfter: ["clone-repo"]
taskRef:
name: buildah-build
params:
- name: context-dir
value: $(params.context-dir)
- name: containerfile-path
value: $(params.containerfile-path)
workspaces:
- name: source-workspace
workspace: source-workspace
- name: oci-images
workspace: oci-images
- name: build-aarch64
runAfter: ["clone-repo"]
taskRef:
name: buildah-build
params:
- name: context-dir
value: $(params.context-dir)
- name: containerfile-path
value: $(params.containerfile-path)
workspaces:
- name: source-workspace
workspace: source-workspace
- name: oci-images
workspace: oci-images
- name: push-image
runAfter: ["build-x86-64", "build-aarch64"]
taskRef:
name: buildah-push
params:
- name: image-name
value: $(params.image-name)
- name: architectures
value:
- x86_64
- aarch64
workspaces:
- name: oci-images
workspace: oci-images
- name: dockerconfig
workspace: registry-token

51
examples/bootc/tekton/pipelinerun.yaml

@ -0,0 +1,51 @@
apiVersion: tekton.dev/v1
kind: PipelineRun
metadata:
generateName: bootc-
spec:
pipelineRef:
name: bootc
params:
- name: git-url
value: https://github.com/nmasse-itix/tekton-pipeline-multiarch.git
- name: git-revision
value: devoxx-france-2025
- name: image-name
value: quay.io/nmasse-redhat/fedora-with-htop
- name: context-dir
value: examples/bootc/src
- name: containerfile-path
value: "examples/bootc/src/Containerfile"
workspaces:
- name: oci-images
volumeClaimTemplate:
spec:
storageClassName: efs-csi
accessModes:
- ReadWriteMany
resources:
requests:
storage: 10Gi
- name: source-workspace
volumeClaimTemplate:
spec:
storageClassName: efs-csi
accessModes:
- ReadWriteMany
resources:
requests:
storage: 1Gi
- name: registry-token
secret:
secretName: quay-authentication
taskRunTemplate:
serviceAccountName: buildbot
taskRunSpecs:
- pipelineTaskName: build-aarch64
podTemplate:
nodeSelector:
beta.kubernetes.io/arch: arm64
tolerations:
- key: "emea-open-demo.redhat.com/arm64-architecture"
operator: "Exists"
effect: "NoSchedule"
Loading…
Cancel
Save