1
0
mirror of https://github.com/containers/ramalama.git synced 2026-02-05 15:47:26 +01:00
Files
ramalama/.tekton/integration/tasks/init-snapshot.yaml
Mike Bonnet 5b78694273 stop building the bats image
Remove the Tekton pipelines for building the bats image, and the bats-integration
test. Run tests as part of the ramalama image build using the e2e image.

Signed-off-by: Mike Bonnet <mikeb@redhat.com>
2026-01-29 18:17:44 -08:00

96 lines
3.5 KiB
YAML

apiVersion: tekton.dev/v1
kind: Task
metadata:
name: init-snapshot
spec:
description: Extract information from the SNAPSHOT and make it available as Tekton results
params:
- name: SNAPSHOT
description: >-
Information about the components included in the current snapshot under test.
results:
- name: event-type
description: The type of event that triggered the pipeline
- name: snapshot-type
description: The type of Snapshot that is being tested.
- name: release-tags
description: A space-separated list of tags that should be applied to the release
- name: e2e-image
description: URI of the e2e image included in the snapshot
- name: ramalama-image
description: URI of the ramalama image included in the snapshot
- name: ramalama-rag-image
description: URI of the ramalama-rag image included in the snapshot
- name: stack-image
description: URI of the llama-stack image included in the snapshot
- name: cuda-image
description: URI of the cuda image included in the snapshot
- name: cuda-rag-image
description: URI of the cuda-rag image included in the snapshot
- name: TEST_OUTPUT
description: Test result in json format
steps:
- name: process
image: registry.access.redhat.com/ubi10/ubi:latest
env:
- name: SNAPSHOT
value: $(params.SNAPSHOT)
- name: EVENT_TYPE
valueFrom:
fieldRef:
fieldPath: metadata.labels['pac.test.appstudio.openshift.io/event-type']
- name: SNAPSHOT_TYPE
valueFrom:
fieldRef:
fieldPath: metadata.labels['test.appstudio.openshift.io/type']
- name: RELEASE_TAGS
valueFrom:
fieldRef:
fieldPath: metadata.annotations['custom.appstudio.openshift.io/release-tags']
- name: RESULTS_EVENT_TYPE_PATH
value: $(results.event-type.path)
- name: RESULTS_SNAPSHOT_TYPE_PATH
value: $(results.snapshot-type.path)
- name: RESULTS_RELEASE_TAGS_PATH
value: $(results.release-tags.path)
- name: RESULTS_E2E_IMAGE_PATH
value: $(results.e2e-image.path)
- name: RESULTS_RAMALAMA_IMAGE_PATH
value: $(results.ramalama-image.path)
- name: RESULTS_RAMALAMA_RAG_IMAGE_PATH
value: $(results.ramalama-rag-image.path)
- name: RESULTS_STACK_IMAGE_PATH
value: $(results.stack-image.path)
- name: RESULTS_CUDA_IMAGE_PATH
value: $(results.cuda-image.path)
- name: RESULTS_CUDA_RAG_IMAGE_PATH
value: $(results.cuda-rag-image.path)
- name: RESULTS_TEST_OUTPUT_PATH
value: $(results.TEST_OUTPUT.path)
script: |
#!/bin/bash -ex
dnf -y install jq
echo -n "$EVENT_TYPE" | tee "$RESULTS_EVENT_TYPE_PATH"
echo
echo -n "$SNAPSHOT_TYPE" | tee "$RESULTS_SNAPSHOT_TYPE_PATH"
echo
echo -n "$RELEASE_TAGS" | tee "$RESULTS_RELEASE_TAGS_PATH"
echo
component_image() {
jq -j --arg name "$1" '.components[] | select(.name == $name) | .containerImage' <<< "$SNAPSHOT"
}
component_image e2e | tee "$RESULTS_E2E_IMAGE_PATH"
echo
component_image ramalama | tee "$RESULTS_RAMALAMA_IMAGE_PATH"
echo
component_image ramalama-rag | tee "$RESULTS_RAMALAMA_RAG_IMAGE_PATH"
echo
component_image llama-stack | tee "$RESULTS_STACK_IMAGE_PATH"
echo
component_image cuda | tee "$RESULTS_CUDA_IMAGE_PATH"
echo
component_image cuda-rag | tee "$RESULTS_CUDA_RAG_IMAGE_PATH"
echo
jq -jnc '{result: "SUCCESS", timestamp: now | todateiso8601, failures: 0, successes: 1, warnings: 0}' | tee "$RESULTS_TEST_OUTPUT_PATH"
echo