Inline the test pipeline.

This commit is contained in:
Tom Alexander 2023-12-22 19:18:30 -05:00
parent 457ff9e759
commit 4447f1ed4a
Signed by: talexander
GPG Key ID: D3A179C9A53C0EDE

View File

@ -81,9 +81,34 @@ spec:
workspace: docker-credentials
runAfter:
- fetch-repository
- name: run-image
taskRef:
name: run-docker-image
- name: run-cargo-test
taskSpec:
metadata: {}
params:
- name: docker-image
type: string
description: Docker image to run.
default: alpine:3.18
stepTemplate:
image: alpine:3.18
name: ""
resources:
requests:
cpu: 10m
memory: 600Mi
workingDir: /workspace/source
workspaces:
- name: source
mountPath: /source
- name: cargo-cache
mountPath: /usr/local/cargo/registry
optional: true
steps:
- name: run
image: $(params.docker-image)
workingDir: "$(workspaces.source.path)"
command: [cargo, test, --no-fail-fast]
args: []
workspaces:
- name: source
workspace: git-source
@ -92,8 +117,6 @@ spec:
runAfter:
- build-image
params:
- name: command
value: [cargo, test, --no-fail-fast]
- name: docker-image
value: "$(params.image-name):$(tasks.fetch-repository.results.commit)"
finally: