Skip to content

Commit

Permalink
refactor: push tekton to use -oci-ta tasks
Browse files Browse the repository at this point in the history
Refactor push tekton pipeline to be aligned
with ADR-0036.

Signed-off-by: Alejandro Visiedo <[email protected]>
  • Loading branch information
avisiedo committed Dec 16, 2024
1 parent 28b2c42 commit 6931590
Showing 1 changed file with 40 additions and 26 deletions.
66 changes: 40 additions & 26 deletions .tekton/idmsvc-frontend-push.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,12 @@ spec:
value: build/package/Dockerfile
- name: path-context
value: .
- name: build-platforms
value:
- linux/x86_64
# - linux/arm64
# - linux/ppc63le
# - linux/s390x
pipelineSpec:
description: |
This pipeline is ideal for building container images from a Containerfile while reducing network traffic.
Expand Down Expand Up @@ -163,14 +169,16 @@ spec:
value: $(params.git-url)
- name: revision
value: $(params.revision)
- name: ociStorage
value: $(params.output-image).git
runAfter:
- init
taskRef:
params:
- name: name
value: git-clone
value: git-clone-oci-ta
- name: bundle
value: quay.io/konflux-ci/tekton-catalog/task-git-clone:0.1@sha256:d091a9e19567a4cbdc5acd57903c71ba71dc51d749a4ba7477e689608851e981
value: quay.io/konflux-ci/tekton-catalog/task-git-clone-oci-ta:0.1@sha256:4bf48d038ff12d25bdeb5ab3e98dc2271818056f454c83d7393ebbd413028147
- name: kind
value: task
resolver: bundles
Expand All @@ -180,33 +188,32 @@ spec:
values:
- "true"
workspaces:
- name: output
workspace: workspace
- name: basic-auth
workspace: git-auth
- name: prefetch-dependencies
params:
- name: dev-package-managers
value: "true"
- name: input
value: $(params.prefetch-input)
- name: SOURCE_ARTIFACT
value: $(tasks.clone-repository.results.SOURCE_ARTIFACT)
- name: ociStorage
value: $(params.output-image).prefetch
- name: ociArtifactExpiresAfter
value: $(params.image-expires-after)
runAfter:
- clone-repository
taskRef:
params:
- name: name
value: prefetch-dependencies
value: prefetch-dependencies-oci-ta
- name: bundle
value: quay.io/konflux-ci/tekton-catalog/task-prefetch-dependencies:0.1@sha256:53fc6d82b06534878e509f3e37f05b818f38fba01729dd1fbee6f97a9562c1ed
value: quay.io/konflux-ci/tekton-catalog/task-prefetch-dependencies-oci-ta:0.1@sha256:4072f732119864d12ec8e2ff075f01487aaee9df4440166dbe85fdd447865161
- name: kind
value: task
resolver: bundles
when:
- input: $(params.prefetch-input)
operator: notin
values:
- ""
workspaces:
- name: source
workspace: workspace
- name: git-basic-auth
workspace: git-auth
- name: netrc
Expand Down Expand Up @@ -345,7 +352,12 @@ spec:

# npm install
# npm test
- name: build-container
- name: build-images
matrix:
params:
- name: PLATFORM
value:
- $(params.build-platforms)
params:
- name: IMAGE
value: $(params.output-image)
Expand All @@ -366,15 +378,21 @@ spec:
- $(params.build-args[*])
- name: BUILD_ARGS_FILE
value: $(params.build-args-file)
- name: SOURCE_ARTIFACT
value: $(tasks.prefetch-dependencies.results.SOURCE_ARTIFACT)
- name: CACHI2_ARTIFACT
value: $(tasks.prefetch-dependencies.results.CACHI2_ARTIFACT)
- name: IMAGE_APPEND_PLATFORM
value: "true"
runAfter:
- prefetch-dependencies
- create-frontend-dockerfile
taskRef:
params:
- name: name
value: buildah
value: buildah-remote-oci-ta
- name: bundle
value: quay.io/konflux-ci/tekton-catalog/task-buildah:0.2@sha256:23883131ea90adb2b8e411420084e13e1dd4d2a9350ee567200a60360e820d10
value: quay.io/konflux-ci/tekton-catalog/task-buildah-remote-oci-ta:0.2@sha256:2a3e27910c933d39ec1580dde6c48c61763ba28311a36f38bc2d58ec8b87eece
- name: kind
value: task
resolver: bundles
Expand All @@ -383,9 +401,6 @@ spec:
operator: in
values:
- "true"
workspaces:
- name: source
workspace: workspace
- name: build-image-index
params:
- name: IMAGE
Expand All @@ -398,9 +413,9 @@ spec:
value: $(params.build-image-index)
- name: IMAGES
value:
- $(tasks.build-container.results.IMAGE_URL)@$(tasks.build-container.results.IMAGE_DIGEST)
- $(tasks.build-images.results.IMAGE_REF[*])
runAfter:
- build-container
- build-images
taskRef:
params:
- name: name
Expand Down Expand Up @@ -578,20 +593,19 @@ spec:
value: $(params.dockerfile)
- name: CONTEXT
value: $(params.path-context)
- name: SOURCE_ARTIFACT
value: $(tasks.prefetch-dependencies.results.SOURCE_ARTIFACT)
runAfter:
- build-image-index
taskRef:
params:
- name: name
value: push-dockerfile
value: push-dockerfile-oci-ta
- name: bundle
value: quay.io/konflux-ci/tekton-catalog/task-push-dockerfile:0.1@sha256:48bb2ee92ea528b28c0814c9cc126021e499a081b69431987a774561e9ac8047
value: quay.io/konflux-ci/tekton-catalog/task-push-dockerfile-oci-ta:0.1@sha256:80d48a1b9d2707490309941ec9f79338533938f959ca9a207b481b0e8a5e7a93
- name: kind
value: task
resolver: bundles
workspaces:
- name: workspace
workspace: workspace
- name: rpms-signature-scan
params:
- name: image-url
Expand Down

0 comments on commit 6931590

Please sign in to comment.