From 422dcbb93b1ad5a492116d835f7b363fe14a5ffb Mon Sep 17 00:00:00 2001 From: Pete Savage Date: Tue, 17 Dec 2024 14:37:06 +0000 Subject: [PATCH] Fixed test --- .tekton/clowder-pull-request.yaml | 64 +++---------------------------- 1 file changed, 5 insertions(+), 59 deletions(-) diff --git a/.tekton/clowder-pull-request.yaml b/.tekton/clowder-pull-request.yaml index f8b1ff87a..46ebe992e 100644 --- a/.tekton/clowder-pull-request.yaml +++ b/.tekton/clowder-pull-request.yaml @@ -244,22 +244,14 @@ spec: operator: in values: - "true" - - name: make-template + - name: make-template-tests params: # New parameter to use the Trusted Artifact from the git-clone Task. - name: SOURCE_ARTIFACT value: $(tasks.clone-repository.results.SOURCE_ARTIFACT) - - name: ociStorage - value: $(params.output-image).make-template-kustomize - - name: IMAGE_EXPIRES_AFTER - value: $(params.image-expires-after) runAfter: - prefetch-dependencies taskSpec: - results: - - name: TEMPLATE_ARTIFACT - type: array - description: Template artifact params: - description: The Trusted Artifact URI pointing to the artifact with the application source code. name: SOURCE_ARTIFACT @@ -277,60 +269,14 @@ spec: - $(params.SOURCE_ARTIFACT)=/var/workdir/source - name: make-template image: registry.access.redhat.com/ubi8/go-toolset:1.22.7-5.1731464728 - workingDir: /opt/app-root/src + workingDir: /var/workdir script: | - set -xe && cp /var/workdir/source/* /opt/app-root/src -Rv && cd /opt/app-root/src && make release && make build-template-kustomize - - name: create-template-manifest-trusted-artifact - image: quay.io/redhat-appstudio/build-trusted-artifacts:latest@sha256:81c4864dae6bb11595f657be887e205262e70086a05ed16ada827fd6391926ac - args: - - create - - manifest=/opt/app-root/src/manifest.yaml - - deploy-kustomize=/opt/app-root/src/deploy-kustomize.yaml - - --store - - $(params.ociStorage) - volumes: - # New volume to store a copy of the source code accessible only to this Task. - - name: workdir - emptyDir: {} - - name: run-template-tests - params: - # 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: - - make-template - taskSpec: - params: - - description: The Trusted Artifact URI pointing to the artifact with the application source code. - name: SOURCE_ARTIFACT - type: string - - description: The Trusted Artifact URI pointing to the artifact with the template. - name: TEMPLATE_ARTIFACT - type: array - 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: use-trusted-artifact-template - image: quay.io/redhat-appstudio/build-trusted-artifacts:latest@sha256:81c4864dae6bb11595f657be887e205262e70086a05ed16ada827fd6391926ac - args: - - use - - $(params.TEMPLATE_ARTIFACT[0])=/tmp/manifest.yaml - - $(params.TEMPLATE_ARTIFACT[1])=/tmp/deploy-kustomize.yaml + set -xe && make release && make build-template-kustomize - name: test-template image: registry.access.redhat.com/ubi8/ubi:8.10-1132.1732635159 - workingDir: /opt/app-root/src + workingDir: /var/workdir script: | - set -xe && cp /var/workdir/source/* /opt/app-root/src -Rv && cp /tmp/manifest.yaml /opt/app-root/src/ && cp /tmp/deploy-kustomize.yaml /opt/app-root/src/ && cd /opt/app-root/src && make test-template + set -xe && make test-template volumes: # New volume to store a copy of the source code accessible only to this Task. - name: workdir