From c9a22d7d49354f89606d9af04fbac233d71a7161 Mon Sep 17 00:00:00 2001 From: Liora Milbaum Date: Fri, 4 Oct 2024 15:01:54 +0300 Subject: [PATCH] standardize task and workspace names --- .tekton/bootc-image-builder-pull-request.yaml | 188 ++++++++++++++++-- .tekton/bootc-image-builder-push.yaml | 188 ++++++++++++++++-- 2 files changed, 338 insertions(+), 38 deletions(-) diff --git a/.tekton/bootc-image-builder-pull-request.yaml b/.tekton/bootc-image-builder-pull-request.yaml index fc424e25..8ab7f96c 100644 --- a/.tekton/bootc-image-builder-pull-request.yaml +++ b/.tekton/bootc-image-builder-pull-request.yaml @@ -55,7 +55,7 @@ spec: - name: pipelinerun-name value: $(context.pipelineRun.name) - name: git-url - value: $(tasks.clone-repository.results.url)?rev=$(tasks.clone-repository.results.commit) + value: $(tasks.clone-repository-amd64.results.url)?rev=$(tasks.clone-repository-amd64.results.commit) - name: image-url value: $(params.output-image) - name: build-task-status @@ -130,10 +130,10 @@ spec: value: $(tasks.build-container.results.IMAGE_DIGEST) - description: "" name: CHAINS-GIT_URL - value: $(tasks.clone-repository.results.url) + value: $(tasks.clone-repository-amd64.results.url) - description: "" name: CHAINS-GIT_COMMIT - value: $(tasks.clone-repository.results.commit) + value: $(tasks.clone-repository-amd64.results.commit) - description: "" name: JAVA_COMMUNITY_DEPENDENCIES value: $(tasks.build-container-amd64.results.JAVA_COMMUNITY_DEPENDENCIES) @@ -161,7 +161,7 @@ spec: - name: kind value: task resolver: bundles - - name: clone-repository + - name: clone-repository-amd64 params: - name: url value: $(params.git-url) @@ -185,7 +185,7 @@ spec: - "true" workspaces: - name: output - workspace: workspace + workspace: workspace-amd64 - name: basic-auth workspace: git-auth - name: clone-repository-arm64 @@ -216,12 +216,112 @@ spec: workspace: workspace-arm64 - name: basic-auth workspace: git-auth - - name: prefetch-dependencies + - name: clone-repository-ppc64le + params: + - name: url + value: $(params.git-url) + - name: revision + value: $(params.revision) + runAfter: + - init + taskRef: + kind: Task + params: + - name: name + value: git-clone + - name: bundle + value: quay.io/redhat-appstudio-tekton-catalog/task-git-clone:0.1@sha256:9e6c4db5a666ea0e1e747e03d63f46e5617a6b9852c26871f9d50891d778dfa2 + - name: kind + value: task + resolver: bundles + when: + - input: $(tasks.init.results.build) + operator: in + values: + - "true" + workspaces: + - name: output + workspace: workspace-ppc64le + - name: clone-repository-s390x + params: + - name: url + value: $(params.git-url) + - name: revision + value: $(params.revision) + runAfter: + - init + taskRef: + kind: Task + params: + - name: name + value: git-clone + - name: bundle + value: quay.io/redhat-appstudio-tekton-catalog/task-git-clone:0.1@sha256:9e6c4db5a666ea0e1e747e03d63f46e5617a6b9852c26871f9d50891d778dfa2 + - name: kind + value: task + resolver: bundles + when: + - input: $(tasks.init.results.build) + operator: in + values: + - "true" + workspaces: + - name: output + workspace: workspace-s390x + - name: basic-auth + workspace: git-auth + - name: prefetch-dependencies-amd64 + params: + - name: input + value: $(params.prefetch-input) + runAfter: + - clone-repository-amd64 + taskRef: + params: + - name: name + value: prefetch-dependencies + - name: bundle + value: quay.io/redhat-appstudio-tekton-catalog/task-prefetch-dependencies:0.1@sha256:610ba9e81465fdc5456ed2846503c6cb6f38413d1211e5c63ba152fd1ff2c3ee + - name: kind + value: task + resolver: bundles + when: + - input: $(params.hermetic) + operator: in + values: + - "true" + workspaces: + - name: source + workspace: workspace-amd64 + - name: prefetch-dependencies-arm64 + params: + - name: input + value: $(params.prefetch-input) + runAfter: + - clone-repository-arm64 + taskRef: + params: + - name: name + value: prefetch-dependencies + - name: bundle + value: quay.io/redhat-appstudio-tekton-catalog/task-prefetch-dependencies:0.1@sha256:610ba9e81465fdc5456ed2846503c6cb6f38413d1211e5c63ba152fd1ff2c3ee + - name: kind + value: task + resolver: bundles + when: + - input: $(params.hermetic) + operator: in + values: + - "true" + workspaces: + - name: source + workspace: workspace-arm64 + - name: prefetch-dependencies-ppc64le params: - name: input value: $(params.prefetch-input) runAfter: - - clone-repository + - clone-repository-ppc64le taskRef: params: - name: name @@ -238,7 +338,30 @@ spec: - "true" workspaces: - name: source - workspace: workspace + workspace: workspace-ppc64le + - name: prefetch-dependencies-s390x + params: + - name: input + value: $(params.prefetch-input) + runAfter: + - clone-repository-s390x + taskRef: + params: + - name: name + value: prefetch-dependencies + - name: bundle + value: quay.io/redhat-appstudio-tekton-catalog/task-prefetch-dependencies:0.1@sha256:610ba9e81465fdc5456ed2846503c6cb6f38413d1211e5c63ba152fd1ff2c3ee + - name: kind + value: task + resolver: bundles + when: + - input: $(params.hermetic) + operator: in + values: + - "true" + workspaces: + - name: source + workspace: workspace-s390x - name: build-container-amd64 params: - name: IMAGE @@ -254,9 +377,9 @@ spec: - name: IMAGE_EXPIRES_AFTER value: $(params.image-expires-after) - name: COMMIT_SHA - value: $(tasks.clone-repository.results.commit) + value: $(tasks.clone-repository-amd64.results.commit) runAfter: - - prefetch-dependencies + - prefetch-dependencies-amd64 taskRef: params: - name: name @@ -273,7 +396,7 @@ spec: - "true" workspaces: - name: source - workspace: workspace + workspace: workspace-amd64 - name: build-container-arm64 params: - name: IMAGE @@ -289,11 +412,11 @@ spec: - name: IMAGE_EXPIRES_AFTER value: $(params.image-expires-after) - name: COMMIT_SHA - value: $(tasks.clone-repository.results.commit) + value: $(tasks.clone-repository-arm64.results.commit) - name: PLATFORM value: linux/arm64 runAfter: - - clone-repository-arm64 + - prefetch-dependencies-arm64 taskRef: params: - name: name @@ -316,7 +439,7 @@ spec: - name: IMAGE value: $(params.output-image) - name: COMMIT_SHA - value: $(tasks.clone-repository.results.commit) + value: $(tasks.clone-repository-amd64.results.commit) - name: IMAGES value: - $(tasks.build-container-amd64.results.IMAGE_URL)@$(tasks.build-container-amd64.results.IMAGE_DIGEST) @@ -362,7 +485,7 @@ spec: - "false" workspaces: - name: source - workspace: workspace + workspace: workspace-amd64 - name: deprecated-base-image-check params: - name: IMAGE_URL @@ -406,8 +529,13 @@ spec: values: - "false" - name: sast-snyk-check + params: + - name: image-digest + value: $(tasks.build-container.results.IMAGE_DIGEST) + - name: image-url + value: $(tasks.build-container.results.IMAGE_URL) runAfter: - - clone-repository + - build-container taskRef: params: - name: name @@ -424,7 +552,7 @@ spec: - "false" workspaces: - name: workspace - workspace: workspace + workspace: workspace-amd64 - name: clamav-scan params: - name: image-digest @@ -470,11 +598,11 @@ spec: values: - "false" workspaces: - - name: workspace + - name: workspace-amd64 - name: git-auth optional: true workspaces: - - name: workspace + - name: workspace-amd64 volumeClaimTemplate: metadata: creationTimestamp: null @@ -496,6 +624,28 @@ spec: requests: storage: 1Gi status: {} + - name: workspace-ppc64le + volumeClaimTemplate: + metadata: + creationTimestamp: null + spec: + accessModes: + - ReadWriteOnce + resources: + requests: + storage: 1Gi + status: {} + - name: workspace-s390x + volumeClaimTemplate: + metadata: + creationTimestamp: null + spec: + accessModes: + - ReadWriteOnce + resources: + requests: + storage: 1Gi + status: {} - name: git-auth secret: secretName: "{{ git_auth_secret }}" diff --git a/.tekton/bootc-image-builder-push.yaml b/.tekton/bootc-image-builder-push.yaml index a4c37268..999cdeb3 100644 --- a/.tekton/bootc-image-builder-push.yaml +++ b/.tekton/bootc-image-builder-push.yaml @@ -52,7 +52,7 @@ spec: - name: pipelinerun-name value: $(context.pipelineRun.name) - name: git-url - value: $(tasks.clone-repository.results.url)?rev=$(tasks.clone-repository.results.commit) + value: $(tasks.clone-repository-amd64.results.url)?rev=$(tasks.clone-repository-amd64.results.commit) - name: image-url value: $(params.output-image) - name: build-task-status @@ -127,10 +127,10 @@ spec: value: $(tasks.build-container.results.IMAGE_DIGEST) - description: "" name: CHAINS-GIT_URL - value: $(tasks.clone-repository.results.url) + value: $(tasks.clone-repository-amd64.results.url) - description: "" name: CHAINS-GIT_COMMIT - value: $(tasks.clone-repository.results.commit) + value: $(tasks.clone-repository-amd64.results.commit) - description: "" name: JAVA_COMMUNITY_DEPENDENCIES value: $(tasks.build-container-amd64.results.JAVA_COMMUNITY_DEPENDENCIES) @@ -158,7 +158,7 @@ spec: - name: kind value: task resolver: bundles - - name: clone-repository + - name: clone-repository-amd64 params: - name: url value: $(params.git-url) @@ -182,7 +182,7 @@ spec: - "true" workspaces: - name: output - workspace: workspace + workspace: workspace-amd64 - name: basic-auth workspace: git-auth - name: clone-repository-arm64 @@ -213,12 +213,112 @@ spec: workspace: workspace-arm64 - name: basic-auth workspace: git-auth - - name: prefetch-dependencies + - name: clone-repository-ppc64le + params: + - name: url + value: $(params.git-url) + - name: revision + value: $(params.revision) + runAfter: + - init + taskRef: + kind: Task + params: + - name: name + value: git-clone + - name: bundle + value: quay.io/redhat-appstudio-tekton-catalog/task-git-clone:0.1@sha256:9e6c4db5a666ea0e1e747e03d63f46e5617a6b9852c26871f9d50891d778dfa2 + - name: kind + value: task + resolver: bundles + when: + - input: $(tasks.init.results.build) + operator: in + values: + - "true" + workspaces: + - name: output + workspace: workspace-ppc64le + - name: clone-repository-s390x + params: + - name: url + value: $(params.git-url) + - name: revision + value: $(params.revision) + runAfter: + - init + taskRef: + kind: Task + params: + - name: name + value: git-clone + - name: bundle + value: quay.io/redhat-appstudio-tekton-catalog/task-git-clone:0.1@sha256:9e6c4db5a666ea0e1e747e03d63f46e5617a6b9852c26871f9d50891d778dfa2 + - name: kind + value: task + resolver: bundles + when: + - input: $(tasks.init.results.build) + operator: in + values: + - "true" + workspaces: + - name: output + workspace: workspace-s390x + - name: basic-auth + workspace: git-auth + - name: prefetch-dependencies-amd64 + params: + - name: input + value: $(params.prefetch-input) + runAfter: + - clone-repository-amd64 + taskRef: + params: + - name: name + value: prefetch-dependencies + - name: bundle + value: quay.io/redhat-appstudio-tekton-catalog/task-prefetch-dependencies:0.1@sha256:610ba9e81465fdc5456ed2846503c6cb6f38413d1211e5c63ba152fd1ff2c3ee + - name: kind + value: task + resolver: bundles + when: + - input: $(params.hermetic) + operator: in + values: + - "true" + workspaces: + - name: source + workspace: workspace-amd64 + - name: prefetch-dependencies-arm64 + params: + - name: input + value: $(params.prefetch-input) + runAfter: + - clone-repository-arm64 + taskRef: + params: + - name: name + value: prefetch-dependencies + - name: bundle + value: quay.io/redhat-appstudio-tekton-catalog/task-prefetch-dependencies:0.1@sha256:610ba9e81465fdc5456ed2846503c6cb6f38413d1211e5c63ba152fd1ff2c3ee + - name: kind + value: task + resolver: bundles + when: + - input: $(params.hermetic) + operator: in + values: + - "true" + workspaces: + - name: source + workspace: workspace-arm64 + - name: prefetch-dependencies-ppc64le params: - name: input value: $(params.prefetch-input) runAfter: - - clone-repository + - clone-repository-ppc64le taskRef: params: - name: name @@ -235,7 +335,30 @@ spec: - "true" workspaces: - name: source - workspace: workspace + workspace: workspace-ppc64le + - name: prefetch-dependencies-s390x + params: + - name: input + value: $(params.prefetch-input) + runAfter: + - clone-repository-s390x + taskRef: + params: + - name: name + value: prefetch-dependencies + - name: bundle + value: quay.io/redhat-appstudio-tekton-catalog/task-prefetch-dependencies:0.1@sha256:610ba9e81465fdc5456ed2846503c6cb6f38413d1211e5c63ba152fd1ff2c3ee + - name: kind + value: task + resolver: bundles + when: + - input: $(params.hermetic) + operator: in + values: + - "true" + workspaces: + - name: source + workspace: workspace-s390x - name: build-container-amd64 params: - name: IMAGE @@ -251,9 +374,9 @@ spec: - name: IMAGE_EXPIRES_AFTER value: $(params.image-expires-after) - name: COMMIT_SHA - value: $(tasks.clone-repository.results.commit) + value: $(tasks.clone-repository-amd64.results.commit) runAfter: - - prefetch-dependencies + - prefetch-dependencies-amd64 taskRef: params: - name: name @@ -270,7 +393,7 @@ spec: - "true" workspaces: - name: source - workspace: workspace + workspace: workspace-amd64 - name: build-container-arm64 params: - name: IMAGE @@ -286,11 +409,11 @@ spec: - name: IMAGE_EXPIRES_AFTER value: $(params.image-expires-after) - name: COMMIT_SHA - value: $(tasks.clone-repository.results.commit) + value: $(tasks.clone-repository-amd64.results.commit) - name: PLATFORM value: linux/arm64 runAfter: - - clone-repository-arm64 + - prefetch-dependencies-arm64 taskRef: params: - name: name @@ -313,7 +436,7 @@ spec: - name: IMAGE value: $(params.output-image) - name: COMMIT_SHA - value: $(tasks.clone-repository.results.commit) + value: $(tasks.clone-repository-amd64.results.commit) - name: IMAGES value: - $(tasks.build-container-amd64.results.IMAGE_URL)@$(tasks.build-container-amd64.results.IMAGE_DIGEST) @@ -359,7 +482,7 @@ spec: - "false" workspaces: - name: source - workspace: workspace + workspace: workspace-amd64 - name: deprecated-base-image-check params: - name: IMAGE_URL @@ -403,8 +526,13 @@ spec: values: - "false" - name: sast-snyk-check + params: + - name: image-digest + value: $(tasks.build-container.results.IMAGE_DIGEST) + - name: image-url + value: $(tasks.build-container.results.IMAGE_URL) runAfter: - - clone-repository + - build-container taskRef: params: - name: name @@ -421,7 +549,7 @@ spec: - "false" workspaces: - name: workspace - workspace: workspace + workspace: workspace-amd64 - name: clamav-scan params: - name: image-digest @@ -467,11 +595,11 @@ spec: values: - "false" workspaces: - - name: workspace + - name: workspace-amd64 - name: git-auth optional: true workspaces: - - name: workspace + - name: workspace-amd64 volumeClaimTemplate: metadata: creationTimestamp: null @@ -493,6 +621,28 @@ spec: requests: storage: 1Gi status: {} + - name: workspace-ppc64le + volumeClaimTemplate: + metadata: + creationTimestamp: null + spec: + accessModes: + - ReadWriteOnce + resources: + requests: + storage: 1Gi + status: {} + - name: workspace-s390x + volumeClaimTemplate: + metadata: + creationTimestamp: null + spec: + accessModes: + - ReadWriteOnce + resources: + requests: + storage: 1Gi + status: {} - name: git-auth secret: secretName: "{{ git_auth_secret }}"