From 93008b6d61c6a0baa098e50f0f3c17f2f84a148b Mon Sep 17 00:00:00 2001 From: Pete Savage Date: Mon, 16 Dec 2024 17:39:14 +0000 Subject: [PATCH] Added new trusted artifact --- .tekton/clowder-pull-request.yaml | 52 +++++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) diff --git a/.tekton/clowder-pull-request.yaml b/.tekton/clowder-pull-request.yaml index 3f948571e..685e1bcdc 100644 --- a/.tekton/clowder-pull-request.yaml +++ b/.tekton/clowder-pull-request.yaml @@ -244,6 +244,48 @@ spec: operator: in values: - "true" + - name: make-template + params: + # New parameter to use the Trusted Artifact from the git-clone Task. + - name: SOURCE_ARTIFACT + value: $(tasks.clone-repository.results.SOURCE_ARTIFACT) + runAfter: + - prefetch-dependencies + taskSpec: + results: + - name: TEMPLATE_ARTIFACTS + type: array + description: Template artifact + params: + - description: The Trusted Artifact URI pointing to the artifact with the application source code. + name: SOURCE_ARTIFACT + type: string + stepTemplate: + volumeMounts: + - mountPath: /var/workdir + name: workdir + steps: + # New step to fetch the Trusted Artifact and make it available to the next steps. + - name: use-trusted-artifact + image: quay.io/redhat-appstudio/build-trusted-artifacts:latest@sha256:81c4864dae6bb11595f657be887e205262e70086a05ed16ada827fd6391926ac + args: + - use + - $(params.SOURCE_ARTIFACT)=/var/workdir/source + - name: make-template + image: registry.access.redhat.com/ubi8/go-toolset:1.22.7-5.1731464728 + workingDir: /var/workdir/source + script: set -xe && make manifest && make build-template + - name: create-template-manifest-trusted-artifact + image: quay.io/redhat-appstudio/build-trusted-artifacts:latest@sha256:81c4864dae6bb11595f657be887e205262e70086a05ed16ada827fd6391926ac + args: + - create + - manifest=manifest.yaml + - deploy=deploy.yaml + - deploy-mutate=deploy-mutate.yaml + volumes: + # New volume to store a copy of the source code accessible only to this Task. + - name: workdir + emptyDir: {} - name: run-unit-tests params: # New parameter to use the Trusted Artifact from the git-clone Task. @@ -280,8 +322,11 @@ spec: # New parameter to use the Trusted Artifact from the git-clone Task. - name: SOURCE_ARTIFACT value: $(tasks.clone-repository.results.SOURCE_ARTIFACT) + - name: TEMPLATE_ARTIFACT + value: $(tasks.make-template.results.TEMPLATE_ARTIFACT) runAfter: - build-container + - make-template taskSpec: params: - description: The Trusted Artifact URI pointing to the artifact with the application source code. @@ -298,6 +343,13 @@ spec: args: - use - $(params.SOURCE_ARTIFACT)=/var/workdir/source + - name: use-trusted-artifact + image: quay.io/redhat-appstudio/build-trusted-artifacts:latest@sha256:81c4864dae6bb11595f657be887e205262e70086a05ed16ada827fd6391926ac + args: + - use + - $(params.TEMPLATE_ARTIFACT[0])=/var/workdir/source/manifest.yaml + - $(params.TEMPLATE_ARTIFACT[1])=/var/workdir/source/deploy.yaml + - $(params.TEMPLATE_ARTIFACT[2])=/var/workdir/source/deploy-mutate.yaml - name: e2e-tests image: registry.access.redhat.com/ubi8/ubi:8.10-1132.1732635159 workingDir: /var/workdir/source