Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
81 changes: 45 additions & 36 deletions .tekton/docker-build.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
apiVersion: tekton.dev/v1
kind: Pipeline
metadata:
creationTimestamp:
creationTimestamp: null
labels:
pipelines.openshift.io/runtime: generic
pipelines.openshift.io/strategy: docker
Expand All @@ -11,29 +11,16 @@ spec:
description: |
This pipeline is ideal for building multi-arch container images from a Containerfile while maintaining trust after pipeline customization.

_Uses `buildah` to create a multi-platform container image leveraging [trusted artifacts](https://konflux-ci.dev/architecture/ADR/0036-trusted-artifacts.html). It also optionally creates a source image and runs some build-time tests. This pipeline requires that the [multi platform controller](https://github.com/konflux-ci/multi-platform-controller) is deployed and configured on your Konflux instance. Information is shared between tasks using OCI artifacts instead of PVCs. EC will pass the [`trusted_task.trusted`](https://enterprisecontract.dev/docs/ec-policies/release_policy.html#trusted_task__trusted) policy as long as all data used to build the artifact is generated from trusted tasks.
_Uses `buildah` to create a multi-platform container image leveraging [trusted artifacts](https://konflux-ci.dev/architecture/ADR/0036-trusted-artifacts.html). It also optionally creates a source image and runs some build-time tests. This pipeline requires that the [multi platform controller](https://github.com/konflux-ci/multi-platform-controller) is deployed and configured on your Konflux instance. Information is shared between tasks using OCI artifacts instead of PVCs. EC will pass the [`trusted_task.trusted`](https://conforma.dev/docs/policy/packages/release_trusted_task.html#trusted_task__trusted) policy as long as all data used to build the artifact is generated from trusted tasks.
This pipeline is pushed as a Tekton bundle to [quay.io](https://quay.io/repository/konflux-ci/tekton-catalog/pipeline-docker-build-multi-platform-oci-ta?tab=tags)_
finally:
- name: show-sbom
params:
- name: IMAGE_URL
value: $(tasks.build-image-index.results.IMAGE_URL)
taskRef:
params:
- name: name
value: show-sbom
- name: bundle
value: quay.io/konflux-ci/tekton-catalog/task-show-sbom:0.1@sha256:beb0616db051952b4b861dd8c3e00fa1c0eccbd926feddf71194d3bb3ace9ce7
- name: kind
value: task
resolver: bundles
params:
- default:
- linux/x86_64
- linux/arm64
- linux/ppc64le
- linux/s390x
description: List of platforms to build the container images on. The available set of values is determined by the configuration of the multi-platform-controller.
description: List of platforms to build the container images on. The available
set of values is determined by the configuration of the multi-platform-controller.
name: build-platforms
type: array
- default: --all-projects --org=3e1a4cca-ebfb-495f-b64c-3cc960d566b4 --exclude=test*,vendor,third_party
Expand All @@ -45,7 +32,8 @@ spec:
name: build-source-image
type: string
- default: "false"
description: 'Enable in-development package managers. WARNING: the behavior may change at any time without notice. Use at your own risk.'
description: 'Enable in-development package managers. WARNING: the behavior may
change at any time without notice. Use at your own risk.'
name: prefetch-input-dev-package-managers
- default: []
description: Additional image tags
Expand All @@ -62,11 +50,13 @@ spec:
name: output-image
type: string
- default: .
description: Path to the source code of an application's component from where to build image.
description: Path to the source code of an application's component from where
to build image.
name: path-context
type: string
- default: Dockerfile
description: Path to the Dockerfile inside the context specified by parameter path-context
description: Path to the Dockerfile inside the context specified by parameter
path-context
name: dockerfile
type: string
- default: "false"
Expand All @@ -82,16 +72,23 @@ spec:
name: hermetic
type: string
- default: ""
description: Build dependencies to be prefetched by Cachi2
description: Build dependencies to be prefetched
name: prefetch-input
type: string
- default: ""
description: Image tag expiration time, time values could be something like 1h, 2d, 3w for hours, days, and weeks, respectively.
description: Image tag expiration time, time values could be something like 1h,
2d, 3w for hours, days, and weeks, respectively.
name: image-expires-after
type: string
- default: "true"
description: Add built image into an OCI image index
name: build-image-index
type: string
- default: docker
description: The format for the resulting image's mediaType. Valid values are
oci or docker.
name: buildah-format
type: string
- default: []
description: Array of --build-arg values ("arg=value" strings) for buildah
name: build-args
Expand All @@ -101,7 +98,8 @@ spec:
name: build-args-file
type: string
- default: "false"
description: Whether to enable privileged mode, should be used only with remote VMs
description: Whether to enable privileged mode, should be used only with remote
VMs
name: privileged-nested
type: string
results:
Expand Down Expand Up @@ -267,6 +265,10 @@ spec:
value: $(params.build-args-file)
- name: PRIVILEGED_NESTED
value: $(params.privileged-nested)
- name: SOURCE_URL
value: $(tasks.clone-repository.results.url)
- name: BUILDAH_FORMAT
value: $(params.buildah-format)
- name: SOURCE_ARTIFACT
value: $(tasks.prefetch-dependencies.results.SOURCE_ARTIFACT)
- name: CACHI2_ARTIFACT
Expand Down Expand Up @@ -302,6 +304,8 @@ spec:
- name: IMAGES
value:
- $(tasks.build-images.results.IMAGE_REF[*])
- name: BUILDAH_FORMAT
value: $(params.buildah-format)
runAfter:
- build-images
taskRef:
Expand All @@ -322,12 +326,12 @@ spec:
params:
- name: BINARY_IMAGE
value: $(tasks.build-image-index.results.IMAGE_URL)
- name: BINARY_IMAGE_DIGEST
value: $(tasks.build-image-index.results.IMAGE_DIGEST)
- name: SOURCE_ARTIFACT
value: $(tasks.prefetch-dependencies.results.SOURCE_ARTIFACT)
- name: CACHI2_ARTIFACT
value: $(tasks.prefetch-dependencies.results.CACHI2_ARTIFACT)
- name: BINARY_IMAGE_DIGEST
value: $(tasks.build-image-index.results.IMAGE_DIGEST)
runAfter:
- build-image-index
taskRef:
Expand Down Expand Up @@ -370,7 +374,12 @@ spec:
operator: in
values:
- "false"
- name: clair-scan
- matrix:
params:
- name: image-platform
value:
- $(params.build-platforms)
name: clair-scan
params:
- name: image-digest
value: $(tasks.build-image-index.results.IMAGE_DIGEST)
Expand All @@ -392,7 +401,12 @@ spec:
operator: in
values:
- "false"
- name: ecosystem-cert-preflight-checks
- matrix:
params:
- name: platform
value:
- $(params.build-platforms)
name: ecosystem-cert-preflight-checks
params:
- name: image-url
value: $(tasks.build-image-index.results.IMAGE_URL)
Expand All @@ -412,12 +426,12 @@ spec:
operator: in
values:
- "false"
matrix:
- matrix:
params:
- name: platform
- name: image-arch
value:
- $(params.build-platforms)
- name: clamav-scan
name: clamav-scan
params:
- name: image-digest
value: $(tasks.build-image-index.results.IMAGE_DIGEST)
Expand All @@ -439,11 +453,6 @@ spec:
operator: in
values:
- "false"
matrix:
params:
- name: image-arch
value:
- $(params.build-platforms)
- name: sast-shell-check
params:
- name: image-digest
Expand Down Expand Up @@ -532,7 +541,7 @@ spec:
- name: name
value: rpms-signature-scan
- name: bundle
value: quay.io/konflux-ci/tekton-catalog/task-rpms-signature-scan:0.2@sha256:1b6c20ab3dbfb0972803d3ebcb2fa72642e59400c77bd66dfd82028bdd09e120
value: quay.io/konflux-ci/konflux-vanguard/task-rpms-signature-scan:0.2@sha256:06977232e67509e5540528ff6c3b081b23fc5bf3e40fb3e2d09a086d5c3243fc
- name: kind
value: task
resolver: bundles
Expand Down
2 changes: 1 addition & 1 deletion .tekton/kn-plugin-func-func-util-115-pull-request.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ spec:
- GO_RUNTIME=registry.access.redhat.com/ubi8/ubi-minimal
- JAVA_BUILDER=registry.access.redhat.com/ubi8/openjdk-21
- JAVA_RUNTIME=registry.access.redhat.com/ubi8/openjdk-21-runtime
- VERSION=1.35.1
- VERSION=1.35.2
- name: git-url
value: '{{source_url}}'
- name: hermetic
Expand Down
4 changes: 2 additions & 2 deletions .tekton/kn-plugin-func-func-util-115-push.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ spec:
- GO_RUNTIME=registry.access.redhat.com/ubi8/ubi-minimal
- JAVA_BUILDER=registry.access.redhat.com/ubi8/openjdk-21
- JAVA_RUNTIME=registry.access.redhat.com/ubi8/openjdk-21-runtime
- VERSION=1.35.1
- VERSION=1.35.2
- name: git-url
value: '{{source_url}}'
- name: hermetic
Expand All @@ -36,7 +36,7 @@ spec:
- name: additional-tags
value:
- $(context.pipelineRun.uid)-{{revision}}
- 1.35.1
- 1.35.2
- latest
- name: prefetch-input
value: '[{"type":"rpm"},{"path":".","type":"gomod"}]'
Expand Down
6 changes: 3 additions & 3 deletions openshift/ci-operator/build-image/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
# DO NOT EDIT! Generated Dockerfile.

FROM registry.ci.openshift.org/ocp/4.17:cli-artifacts as tools
FROM registry.ci.openshift.org/ocp/4.19:cli-artifacts as tools

# Dockerfile to bootstrap build and test in openshift-ci
FROM registry.ci.openshift.org/openshift/release:rhel-8-release-golang-1.22-openshift-4.17 as builder

ARG TARGETARCH

COPY --from=tools /usr/share/openshift/linux_$TARGETARCH/oc.rhel8 /usr/bin/oc
COPY --from=tools /usr/share/openshift/linux_$TARGETARCH/oc.rhel9 /usr/bin/oc

RUN ln -s /usr/bin/oc /usr/bin/kubectl

RUN yum install -y httpd-tools
RUN dnf install -y httpd-tools

RUN wget https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3 && \
chmod 700 ./get-helm-3
Expand Down
13 changes: 8 additions & 5 deletions openshift/ci-operator/knative-images/func-util/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# DO NOT EDIT! Generated Dockerfile for cmd/func-util.
ARG GO_BUILDER=registry.ci.openshift.org/openshift/release:rhel-8-release-golang-1.22-openshift-4.17
ARG GO_RUNTIME=registry.access.redhat.com/ubi8/ubi-minimal
ARG GO_RUNTIME=registry.access.redhat.com/ubi9/ubi-minimal

FROM $GO_BUILDER as builder

Expand All @@ -17,7 +17,7 @@ FROM $GO_RUNTIME

ARG VERSION=knative-nightly

RUN microdnf install socat tar
RUN microdnf install -y socat tar

COPY --from=builder /usr/bin/main /usr/bin/func-util
COPY LICENSE /licenses/
Expand All @@ -30,14 +30,17 @@ RUN ln -s /usr/bin/func-util /usr/local/bin/deploy && \
USER 65532

LABEL \
com.redhat.component="openshift-serverless-1-kn-plugin-func-func-util-rhel8-container" \
name="openshift-serverless-1/kn-plugin-func-func-util-rhel8" \
com.redhat.component="openshift-serverless-1-kn-plugin-func-func-util-rhel9-container" \
name="openshift-serverless-1/kn-plugin-func-func-util-rhel9" \
version=$VERSION \
summary="Red Hat OpenShift Serverless 1 Kn Plugin Func Func Util" \
maintainer="serverless-support@redhat.com" \
description="Red Hat OpenShift Serverless 1 Kn Plugin Func Func Util" \
io.k8s.display-name="Red Hat OpenShift Serverless 1 Kn Plugin Func Func Util" \
io.k8s.description="Red Hat OpenShift Serverless Kn Plugin Func Func Util" \
io.openshift.tags="func-util"
io.openshift.tags="func-util" \
vendor="Red Hat, Inc." \
release=$VERSION \
cpe="cpe:/a:redhat:openshift_serverless:::el9"

ENTRYPOINT ["/usr/bin/bash"]
Loading
Loading